Well, as most of us probably agree, library plugins is quite a needed thing for Compiz / Beryl, and having a proper way to do that can remove code duplication in different plugins (for example, text plugin), and make a consistent plugin behavior (for example, consistent animation physics)... On IRC, onestone came up with an idea which I want to share for discussion... Here is the general idea: struct CompLibraryFunction { CompLibraryFunction *next; CompLibraryFunction *prev; char *name; void *function; } The CompDisplay structure gets a new member "CompLibraryFunction *libFunctions;". Each plugin's vtable gets an additional function pointer: "void libraryFunctionUpdated(CompDisplay *d, char *name, void *function);" Additionally, there would be two new functions in core: A function "void addLibraryFunction(CompDisplay *d, char *name, void *function);" and a function "void removeLibraryFunction(CompDisplay *d, char *name);" Both functions would call libraryFunctionUpdated to ensure other plugins know about loading/unloading of functions. Also, add a void * getLibraryFunction(CompDisplay *d, char* name) function. Each plugin will save pointers to the function it will use (it will find them with getLibraryFunction on plugin load), and update them in libraryFunctionUpdated. The typedef of the shared function will be saved in a header in beryl-plugins/include so that other plugins have access to it. One additional thing i'd like to add to this idea is wrapping / unwrapping library functions, but i'm not sure how this should be done... What do you think?