]> 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 a47052e4d8a023d9595ed942545c18850a0d52c6..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,8 +156,6 @@ void plugin_loadall()
 
     if (io == NULL) {
         /* load the default plugins */
-        plugin_open("keyboard");
-        plugin_open("mouse");
         plugin_open("placement");
         plugin_open("resistance");
 
@@ -180,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);
 
@@ -194,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.025206 seconds and 4 git commands to generate.