X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fplugin.c;h=e95d03e9444a4100ce8f64552766e9352ef4cb3f;hb=c90da6da781932c2d178bfb7e39ec1d5003543b7;hp=a5055de9a1088a27dd2a227219b277d605d6000f;hpb=a8a4a2cca30602b66b7a7f68bb9f3fffd34e92c9;p=chaz%2Fopenbox diff --git a/openbox/plugin.c b/openbox/plugin.c index a5055de9..e95d03e9 100644 --- a/openbox/plugin.c +++ b/openbox/plugin.c @@ -1,12 +1,8 @@ +#include "plugins/interface.h" + #include #include -typedef void (*PluginSetupConfig)(); -typedef void (*PluginStartup)(); -typedef void (*PluginShutdown)(); -typedef void *(*PluginCreate)(/* TODO */); -typedef void (*PluginDestroy)(void *); - typedef struct { GModule *module; char *name; @@ -160,10 +156,11 @@ void plugin_loadall() if (io == NULL) { /* load the default plugins */ - plugin_open("keyboard"); - plugin_open("mouse"); plugin_open("placement"); plugin_open("resistance"); + + /* XXX rm me when the parser loads me magically */ + plugin_open("client_menu"); } else { /* load the plugins in the rc file */ while (g_io_channel_read_line(io, &name, NULL, NULL, &err) == @@ -177,7 +174,7 @@ void plugin_loadall() } } -void *plugin_create(char *name /* TODO */) +void *plugin_create(char *name, void *data) { Plugin *p = (Plugin *)g_datalist_get_data(&plugins, name); @@ -191,7 +188,7 @@ void *plugin_create(char *name /* TODO */) return NULL; } - return p->create(); + return p->create(data); } void plugin_destroy(char *name, void *data)