]> Dogcows Code - chaz/openbox/blobdiff - openbox/plugin.c
move the keyboard and mouse plugins into the kernel for mucho sexiness.
[chaz/openbox] / openbox / plugin.c
index a5055de9a1088a27dd2a227219b277d605d6000f..e95d03e9444a4100ce8f64552766e9352ef4cb3f 100644 (file)
@@ -1,12 +1,8 @@
+#include "plugins/interface.h"
+
 #include <glib.h>
 #include <gmodule.h>
 
-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)
This page took 0.025596 seconds and 4 git commands to generate.