All pastes #383821 Raw Edit

Something

public text v1 · immutable
·published 2007-03-06 17:10 UTC
rendered paste body
Index: beryl-core/src/display.c
===================================================================
--- beryl-core/src/display.c	(Revision 4370)
+++ beryl-core/src/display.c	(Arbeitskopie)
@@ -2361,6 +2361,8 @@
 	d->fileToImage = fileToImage;
 	d->imageToFile = imageToFile;
 
+	d->libFunctions = NULL;
+
 	d->reloadSettingsAtom=XInternAtom(dpy,"_BERYL_SETTINGS_RELOAD",0);
 
 	d->berylDesktopManaged = XInternAtom(dpy, "_BERYL_DESKTOP_MANAGED", 0);
Index: beryl-core/src/Makefile.am
===================================================================
--- beryl-core/src/Makefile.am	(Revision 4370)
+++ beryl-core/src/Makefile.am	(Arbeitskopie)
@@ -39,6 +39,7 @@
 	syscheck.h	    \
 	beryl-private.h     \
 	fsp.h		    \
+	library.c \
 	blog.c
 
 
Index: beryl-core/include/beryl.h
===================================================================
--- beryl-core/include/beryl.h	(Revision 4370)
+++ beryl-core/include/beryl.h	(Arbeitskopie)
@@ -102,6 +102,7 @@
 typedef struct _CompProgram			CompProgram;
 typedef struct _CompFunction		CompFunction;
 typedef struct _CompFunctionData	CompFunctionData;
+typedef struct _CompLibraryFunction CompLibraryFunction;
 typedef struct _FragmentAttrib		FragmentAttrib;
 
 /* virtual modifiers */
@@ -851,6 +852,8 @@
     FileToImageProc fileToImage;
     ImageToFileProc imageToFile;
 
+	CompLibraryFunction *libFunctions;
+
     CompPrivate *privates;
 
     int lastPointerX;
@@ -2709,7 +2712,27 @@
 setDesktopForWindow (CompWindow   *w,
 		     unsigned int desktop);
 
+/* library.c */
 
+typedef void (*UpdateLibraryFunctionProc) (CompDisplay *d, CompLibraryFunction *func);
+
+struct _CompLibraryFunction {
+	CompLibraryFunction *prev;
+	CompLibraryFunction *next;
+
+	char *name;
+	void *function;
+};
+
+void
+addLibraryFunction (CompDisplay *d, char *name,	void *function);
+
+void
+removeLibraryFunction (CompDisplay *d, char *name);
+
+void*
+getLibraryFunction (CompDisplay *d, char* name);
+
 /* plugin.c */
 
 typedef Bool (*InitPluginProc) (CompPlugin *plugin);
@@ -2766,6 +2789,8 @@
     GetScreenOptionsProc  getScreenOptions;
     SetScreenOptionProc   setScreenOption;
 
+	UpdateLibraryFunctionProc updateLibrayFunction;
+
     CompPluginDep *deps;
     int           nDeps;
 
@@ -2883,7 +2908,6 @@
 void
 closeSession (void);
 
-
 /* fragment.c */
 
 #define MAX_FRAGMENT_FUNCTIONS 16