diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-08-28 05:44:13 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-08-28 05:44:13 +0000 |
| commit | 615cbd96075905d75533f9b615c4ee6a75f4f9a4 (patch) | |
| tree | d57954f576d41f36ff30df6df1dad2264c13dcbd /openbox/plugin.c | |
| parent | 9290376bbbb8b29411f59a35e5477f25304fe205 (diff) | |
change the menu plugin interface, no need for the create/destroy functions any more.
redo the client-menu plugin to work with the new menu api
Diffstat (limited to 'openbox/plugin.c')
| -rw-r--r-- | openbox/plugin.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/openbox/plugin.c b/openbox/plugin.c index 411eb6fb..b8d9be4b 100644 --- a/openbox/plugin.c +++ b/openbox/plugin.c @@ -11,8 +11,6 @@ typedef struct { PluginSetupConfig config; PluginStartup startup; PluginShutdown shutdown; - PluginCreate create; - PluginDestroy destroy; } Plugin; static gpointer load_sym(GModule *module, char *name, char *symbol, @@ -58,9 +56,6 @@ static Plugin *plugin_new(char *name) FALSE); p->shutdown = (PluginShutdown)load_sym(p->module, name, "plugin_shutdown", FALSE); - p->create = (PluginCreate)load_sym(p->module, name, "plugin_create", TRUE); - p->destroy = (PluginDestroy)load_sym(p->module, name, "plugin_destroy", - TRUE); if (p->config == NULL || p->startup == NULL || p->shutdown == NULL) { g_module_close(p->module); @@ -174,41 +169,3 @@ void plugin_loadall(ObParseInst *i) g_io_channel_unref(io); } } - -void *plugin_create(char *name, void *data) -{ - Plugin *p = (Plugin *)g_datalist_get_data(&plugins, name); - - if (p == NULL) { - g_warning("Unable to find plugin for create: %s", name); - return NULL; - } - - if (p->create == NULL || p->destroy == NULL) { - g_critical("Unsupported create/destroy: %s", name); - return NULL; - } - - return p->create(data); -} - -void plugin_destroy(char *name, void *data) -{ - Plugin *p = (Plugin *)g_datalist_get_data(&plugins, name); - - if (p == NULL) { - g_critical("Unable to find plugin for destroy: %s", name); - /* really shouldn't happen, but attempt to free something anyway? */ - g_free(data); - return; - } - - if (p->destroy == NULL || p->create == NULL) { - g_critical("Unsupported create/destroy: %s", name); - /* really, really shouldn't happen, but attempt to free anyway? */ - g_free(data); - return; - } - - p->destroy(data); -} |
