[Xfce4-commits] <xfce4-panel:devel> * Add GTypeModule layer to the wrapper for the object plugins. This also cleans the module loading code a bit. * Some small fixes
Nick Schermer
nick at xfce.org
Tue Aug 11 20:22:12 CEST 2009
Updating branch refs/heads/devel
to 30832eca84e77cea04419957e3bcf6ccb73f55c2 (commit)
from 0409f765d19fdfc5c518f71ea3e6f40e4a103f91 (commit)
commit 30832eca84e77cea04419957e3bcf6ccb73f55c2
Author: Nick Schermer <nick at xfce.org>
Date: Wed Jun 18 22:03:14 2008 +0200
* Add GTypeModule layer to the wrapper for the object plugins. This
also cleans the module loading code a bit.
* Some small fixes
panel/main.c | 6 +-
panel/panel-application.c | 2 +-
panel/panel-module.c | 17 ++--
panel/panel-plugin-external.c | 46 +++++++---
plugins/clock/clock.c | 2 +
wrapper/Makefile.am | 2 +
wrapper/main.c | 81 ++++++++---------
wrapper/wrapper-module.c | 203 +++++++++++++++++++++++++++++++++++++++++
wrapper/wrapper-module.h | 50 ++++++++++
9 files changed, 343 insertions(+), 66 deletions(-)
diff --git a/panel/main.c b/panel/main.c
index db814c1..4946fb3 100644
--- a/panel/main.c
+++ b/panel/main.c
@@ -44,7 +44,7 @@ static gboolean opt_restart = FALSE;
static gboolean opt_quit = FALSE;
static gboolean opt_version = FALSE;
static gchar *opt_client_id = NULL;
-static gchar **arguments = NULL;
+static gchar **opt_arguments = NULL;
@@ -59,7 +59,7 @@ static const GOptionEntry option_entries[] =
{ "quit", 'q', 0, G_OPTION_ARG_NONE, &opt_quit, N_("Quit the running panel instance"), NULL },
{ "version", 'v', 0, G_OPTION_ARG_NONE, &opt_version, N_("Print version information and exit"), NULL },
{ "sm-client-id", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_client_id, NULL, NULL },
- { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &arguments, NULL, NULL },
+ { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &opt_arguments, NULL, NULL },
{ NULL }
};
@@ -145,7 +145,7 @@ main (gint argc, gchar **argv)
gdk_notify_startup_complete ();
/* send a add new item signal to the running instance */
- result = panel_dbus_client_add_new_item (opt_add, arguments, &error);
+ result = panel_dbus_client_add_new_item (opt_add, opt_arguments, &error);
goto dbus_return;
}
diff --git a/panel/panel-application.c b/panel/panel-application.c
index 519d7dd..5ea5914 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -842,7 +842,7 @@ panel_application_add_new_item (PanelApplication *application,
/* add the panel to the end of the choosen window */
panel_application_insert_plugin (application, window, gtk_widget_get_screen (GTK_WIDGET (window)),
- plugin_name, NULL, arguments, FROM_DESKTOP_FILE, -1);
+ plugin_name, NULL, arguments, /* FROM_DESKTOP_FILE */ FORCE_EXTERNAL, -1);
}
else
{
diff --git a/panel/panel-module.c b/panel/panel-module.c
index 618e9bd..892280c 100644
--- a/panel/panel-module.c
+++ b/panel/panel-module.c
@@ -151,8 +151,8 @@ panel_module_finalize (GObject *object)
static gboolean
panel_module_load (GTypeModule *type_module)
{
- PanelModule *module = PANEL_MODULE (type_module);
- PluginRegisterTypesFunc register_func;
+ PanelModule *module = PANEL_MODULE (type_module);
+ PluginRegisterTypesFunc register_func;
panel_return_val_if_fail (PANEL_IS_MODULE (module), FALSE);
panel_return_val_if_fail (G_IS_TYPE_MODULE (module), FALSE);
@@ -177,7 +177,7 @@ panel_module_load (GTypeModule *type_module)
return FALSE;
}
- /* run the register function if available */
+ /* run the type register function if available */
if (g_module_symbol (module->library, "xfce_panel_plugin_register_types", (gpointer) ®ister_func))
(*register_func) (type_module);
@@ -219,8 +219,9 @@ panel_module_item_finalized (gpointer user_data,
module->use_count--;
/* unuse the library if the plugin runs internal */
- if (!xfce_panel_plugin_provider_is_external (XFCE_PANEL_PLUGIN_PROVIDER (item)))
- g_type_module_unuse (G_TYPE_MODULE (module));
+ /* TODO this needs to be fixed */
+ //if (!xfce_panel_plugin_provider_is_external (XFCE_PANEL_PLUGIN_PROVIDER (item)))
+ // g_type_module_unuse (G_TYPE_MODULE (module));
/* emit signal unique signal in the factory */
if (module->is_unique)
@@ -258,7 +259,7 @@ panel_module_new_from_desktop_file (const gchar *filename,
/* build the module path */
path = g_module_build_path (directory, module_name);
- /* test if the module exists */
+ /* test if the library exists */
if (G_LIKELY (g_file_test (path, G_FILE_TEST_EXISTS)))
{
/* create new module */
@@ -332,8 +333,8 @@ panel_module_create_plugin (PanelModule *module,
panel_return_val_if_fail (PANEL_IS_MODULE (module), NULL);
panel_return_val_if_fail (G_IS_TYPE_MODULE (module), NULL);
panel_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
- panel_return_val_if_fail (name != NULL, NULL);
- panel_return_val_if_fail (id != NULL, NULL);
+ panel_return_val_if_fail (name != NULL && *name != '\0', NULL);
+ panel_return_val_if_fail (id != NULL && *id != '\0', NULL);
panel_return_val_if_fail (exo_str_is_equal (name, G_TYPE_MODULE (module)->name), NULL);
/* return null if the module is not usable (unique and already used) */
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index dd0d6bf..c9e6c5e 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -66,16 +66,19 @@ struct _PanelPluginExternal
GtkSocket __parent__;
/* plugin information */
- gchar *id;
+ gchar *id;
+
+ /* startup arguments */
+ gchar **arguments;
/* the module */
- PanelModule *module;
+ PanelModule *module;
/* the plug window id */
- GdkNativeWindow plug_window_id;
+ GdkNativeWindow plug_window_id;
/* message queue */
- GSList *queue;
+ GSList *queue;
};
typedef struct
@@ -127,6 +130,7 @@ panel_plugin_external_init (PanelPluginExternal *external)
external->module = NULL;
external->plug_window_id = 0;
external->queue = NULL;
+ external->arguments = NULL;
g_signal_connect (G_OBJECT (external), "notify::sensitive", G_CALLBACK (panel_plugin_external_set_sensitive), NULL);
}
@@ -154,6 +158,7 @@ panel_plugin_external_finalize (GObject *object)
/* cleanup */
g_free (external->id);
+ g_strfreev (external->arguments);
/* release the module */
g_object_unref (G_OBJECT (external->module));
@@ -166,12 +171,13 @@ panel_plugin_external_finalize (GObject *object)
static void
panel_plugin_external_realize (GtkWidget *widget)
{
- PanelPluginExternal *external = PANEL_PLUGIN_EXTERNAL (widget);
- gchar *argv[12];
- GPid pid;
- GError *error = NULL;
- gboolean succeed;
- gchar *socket_id;
+ PanelPluginExternal *external = PANEL_PLUGIN_EXTERNAL (widget);
+ gchar **argv;
+ GPid pid;
+ GError *error = NULL;
+ gboolean succeed;
+ gchar *socket_id;
+ gint i, argc = 12;
/* realize the socket first */
(*GTK_WIDGET_CLASS (panel_plugin_external_parent_class)->realize) (widget);
@@ -179,7 +185,14 @@ panel_plugin_external_realize (GtkWidget *widget)
/* get the socket id in a string */
socket_id = g_strdup_printf ("%d", gtk_socket_get_id (GTK_SOCKET (widget)));
- /* construct the argv */
+ /* add the number of arguments to the argv count */
+ if (G_UNLIKELY (external->arguments != NULL))
+ argc += g_strv_length (external->arguments);
+
+ /* allocate argv */
+ argv = g_new0 (gchar *, argc);
+
+ /* setup the basic argv */
argv[0] = LIBEXECDIR "/xfce4-panel-wrapper";
argv[1] = "-n";
argv[2] = (gchar *) panel_module_get_internal_name (external->module);
@@ -191,13 +204,21 @@ panel_plugin_external_realize (GtkWidget *widget)
argv[8] = (gchar *) panel_module_get_library_filename (external->module);
argv[9] = "-s";
argv[10] = socket_id;
- argv[11] = NULL;
+
+ /* append the arguments */
+ if (G_UNLIKELY (external->arguments != NULL))
+ for (i = 0; external->arguments[i] != NULL; i++)
+ argv[i + 11] = external->arguments[i];
+
+ /* close the argv */
+ argv[argc - 1] = NULL;
/* spawn the proccess */
succeed = gdk_spawn_on_screen (gdk_screen_get_default (), NULL, argv, NULL, 0, NULL, NULL, &pid, &error);
/* cleanup */
g_free (socket_id);
+ g_free (argv);
/* handle problem */
if (G_UNLIKELY (succeed == FALSE))
@@ -475,6 +496,7 @@ panel_plugin_external_new (PanelModule *module,
/* set name, id and module */
external->id = g_strdup (id);
external->module = g_object_ref (G_OBJECT (module));
+ external->arguments = g_strdupv (arguments);
return XFCE_PANEL_PLUGIN_PROVIDER (external);
}
diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
index 8e57c38..feb7a10 100644
--- a/plugins/clock/clock.c
+++ b/plugins/clock/clock.c
@@ -728,6 +728,8 @@ xfce_clock_widget_update_mode (XfceClock *clock)
G_MODULE_EXPORT void
xfce_panel_plugin_register_types (XfcePanelModule *panel_module)
{
+ panel_return_if_fail (G_IS_TYPE_MODULE (panel_module));
+
/* register the types */
xfce_clock_register_type (panel_module);
xfce_clock_analog_register_type (panel_module);
diff --git a/wrapper/Makefile.am b/wrapper/Makefile.am
index ba42406..aa0a7b6 100644
--- a/wrapper/Makefile.am
+++ b/wrapper/Makefile.am
@@ -16,6 +16,8 @@ libexec_PROGRAMS = \
xfce4_panel_wrapper_SOURCES = \
main.c \
+ wrapper-module.c \
+ wrapper-module.h \
wrapper-plug.c \
wrapper-plug.h
diff --git a/wrapper/main.c b/wrapper/main.c
index df61206..1c9e4e7 100644
--- a/wrapper/main.c
+++ b/wrapper/main.c
@@ -27,20 +27,21 @@
#endif
#include <gtk/gtk.h>
-#include <gmodule.h>
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
+#include <wrapper/wrapper-module.h>
#include <wrapper/wrapper-plug.h>
-static gchar *opt_name = NULL;
-static gchar *opt_display_name = NULL;
-static gchar *opt_id = NULL;
-static gchar *opt_filename = NULL;
-static gint opt_socket_id = 0;
+static gchar *opt_name = NULL;
+static gchar *opt_display_name = NULL;
+static gchar *opt_id = NULL;
+static gchar *opt_filename = NULL;
+static gint opt_socket_id = 0;
+static gchar **opt_arguments = NULL;
@@ -51,6 +52,7 @@ static const GOptionEntry option_entries[] =
{ "id", 'i', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_id, NULL, NULL },
{ "filename", 'f', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_filename, NULL, NULL },
{ "socket-id", 's', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_INT, &opt_socket_id, NULL, NULL },
+ { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &opt_arguments, NULL, NULL },
{ NULL }
};
@@ -60,10 +62,10 @@ gint
main (gint argc, gchar **argv)
{
GError *error = NULL;
- GModule *library;
- PluginConstructFunc construct_func;
- XfcePanelPluginProvider *provider = NULL;
+ XfcePanelPluginProvider *provider;
GtkWidget *plug;
+ WrapperModule *module;
+ gboolean succeed = FALSE;
/* set translation domain */
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
@@ -76,7 +78,7 @@ main (gint argc, gchar **argv)
g_thread_init (NULL);
/* initialize gtk */
- if (!gtk_init_with_args (&argc, &argv, "", (GOptionEntry *) option_entries, GETTEXT_PACKAGE, &error))
+ if (!gtk_init_with_args (&argc, &argv, _("[ARGUMENTS...]"), (GOptionEntry *) option_entries, GETTEXT_PACKAGE, &error))
{
/* print error */
g_critical ("Failed to initialize GTK+: %s", error ? error->message : "Unable to open display");
@@ -90,7 +92,7 @@ main (gint argc, gchar **argv)
}
/* check arguments */
- if (opt_filename == NULL || opt_socket_id == 0 || opt_name == NULL || opt_id == NULL)
+ if (opt_filename == NULL || opt_socket_id == 0 || opt_name == NULL || opt_id == NULL || opt_display_name == NULL)
{
/* print error */
g_critical ("One of the required arguments for the wrapper is missing");
@@ -99,43 +101,38 @@ main (gint argc, gchar **argv)
return EXIT_FAILURE;
}
- /* try to open the library */
- library = g_module_open (opt_filename, 0);
- if (G_LIKELY (library != NULL))
+ /* try to create a wrapper module */
+ module = wrapper_module_new (opt_filename, opt_name);
+ if (G_LIKELY (module != NULL))
{
- /* try to ling the plugin init func */
- if (g_module_symbol (library, "xfce_panel_plugin_init", (gpointer) &construct_func))
+ /* try to create the panel plugin */
+ provider = wrapper_module_create_plugin (module, opt_name, opt_id, opt_display_name, opt_arguments);
+ if (G_LIKELY (provider != NULL))
{
- /* create the panel plugin */
- provider = (*construct_func) (opt_name, opt_id, NULL, NULL, gdk_screen_get_default ());
- }
- else
- {
- /* print warning */
- g_critical ("Plugin '%s' lacks required symbol: %s", opt_display_name, g_module_error ());
- }
- }
+ /* create the plug */
+ plug = wrapper_plug_new (opt_socket_id, provider);
+ gtk_container_add (GTK_CONTAINER (plug), GTK_WIDGET (provider));
+ gtk_widget_show (plug);
- if (G_LIKELY (provider != NULL))
- {
- /* create the plug */
- plug = wrapper_plug_new (opt_socket_id, provider);
- gtk_container_add (GTK_CONTAINER (plug), GTK_WIDGET (provider));
- gtk_widget_show (plug);
+ /* show the plugin */
+ gtk_widget_show (GTK_WIDGET (provider));
- /* show the plugin */
- gtk_widget_show (GTK_WIDGET (provider));
+ /* everything worked fine */
+ succeed = TRUE;
- /* enter the mainloop */
- gtk_main ();
+ /* enter the mainloop */
+ gtk_main ();
- /* destroy the plug (and provider) */
- gtk_widget_destroy (plug);
- }
+ /* destroy the plug (and provider) */
+ gtk_widget_destroy (plug);
+
+ /* decrease the module use count */
+ g_type_module_unuse (G_TYPE_MODULE (module));
+ }
- /* close the library */
- if (G_LIKELY (library != NULL))
- g_module_close (library);
+ /* g_object_unref for the module doesn't work,
+ * so we don't do that... */
+ }
- return EXIT_SUCCESS;
+ return succeed ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/wrapper/wrapper-module.c b/wrapper/wrapper-module.c
new file mode 100644
index 0000000..723fca8
--- /dev/null
+++ b/wrapper/wrapper-module.c
@@ -0,0 +1,203 @@
+/* $Id$ */
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gdk/gdk.h>
+#include <gmodule.h>
+#include <libxfce4util/libxfce4util.h>
+#include <libxfce4panel/libxfce4panel.h>
+#include <libxfce4panel/xfce-panel-plugin-provider.h>
+
+#include <wrapper/wrapper-module.h>
+
+
+
+static void wrapper_module_class_init (WrapperModuleClass *klass);
+static void wrapper_module_init (WrapperModule *module);
+static gboolean wrapper_module_load (GTypeModule *type_module);
+static void wrapper_module_unload (GTypeModule *type_module);
+
+
+
+struct _WrapperModuleClass
+{
+ GTypeModuleClass __parent__;
+};
+
+struct _WrapperModule
+{
+ GTypeModule __parent__;
+
+ /* plugin library */
+ GModule *library;
+
+ /* plugin init function */
+ PluginConstructFunc construct_func;
+
+ /* the library location */
+ const gchar *filename;
+};
+
+
+
+G_DEFINE_TYPE (WrapperModule, wrapper_module, G_TYPE_TYPE_MODULE);
+
+
+
+static void
+wrapper_module_class_init (WrapperModuleClass *klass)
+{
+ GTypeModuleClass *gtype_module_class;
+
+ gtype_module_class = G_TYPE_MODULE_CLASS (klass);
+ gtype_module_class->load = wrapper_module_load;
+ gtype_module_class->unload = wrapper_module_unload;
+}
+
+
+
+static void
+wrapper_module_init (WrapperModule *module)
+{
+ /* initialize */
+ module->library = NULL;
+ module->construct_func = NULL;
+ module->filename = NULL;
+}
+
+
+
+static gboolean
+wrapper_module_load (GTypeModule *type_module)
+{
+ WrapperModule *module = WRAPPER_MODULE (type_module);
+ PluginRegisterTypesFunc register_func;
+
+ panel_return_val_if_fail (WRAPPER_IS_MODULE (module), FALSE);
+ panel_return_val_if_fail (G_IS_TYPE_MODULE (module), FALSE);
+
+ /* load the module */
+ module->library = g_module_open (module->filename, G_MODULE_BIND_LOCAL);
+ if (G_UNLIKELY (module->library == NULL))
+ {
+ g_critical ("Failed to load plugin '%s': %s", type_module->name, g_module_error ());
+
+ return FALSE;
+ }
+
+ /* link the required construct function */
+ if (!g_module_symbol (module->library, "xfce_panel_plugin_construct", (gpointer) &module->construct_func))
+ {
+ g_critical ("Plugin '%s' lacks required symbol: %s", type_module->name, g_module_error ());
+
+ /* unload */
+ wrapper_module_unload (type_module);
+
+ return FALSE;
+ }
+
+ /* run the type register function if available */
+ if (g_module_symbol (module->library, "xfce_panel_plugin_register_types", (gpointer) ®ister_func))
+ (*register_func) (type_module);
+
+ return TRUE;
+}
+
+
+
+static void
+wrapper_module_unload (GTypeModule *type_module)
+{
+ WrapperModule *module = WRAPPER_MODULE (type_module);
+
+ panel_return_if_fail (WRAPPER_IS_MODULE (module));
+ panel_return_if_fail (G_IS_TYPE_MODULE (module));
+
+ /* unload the library */
+ g_module_close (module->library);
+
+ /* reset plugin state */
+ module->library = NULL;
+ module->construct_func = NULL;
+}
+
+
+
+WrapperModule *
+wrapper_module_new (const gchar *filename,
+ const gchar *name)
+{
+ WrapperModule *module = NULL;
+
+ panel_return_val_if_fail (filename != NULL && *filename != '\0', NULL);
+
+ /* test if the library exists */
+ if (G_LIKELY (g_file_test (filename, G_FILE_TEST_EXISTS)))
+ {
+ /* create new module */
+ module = g_object_new (WRAPPER_TYPE_MODULE, NULL);
+
+ /* set the module name */
+ g_type_module_set_name (G_TYPE_MODULE (module), name);
+
+ /* set library location */
+ module->filename = filename;
+ }
+
+ return module;
+}
+
+
+
+XfcePanelPluginProvider *
+wrapper_module_create_plugin (WrapperModule *module,
+ const gchar *name,
+ const gchar *id,
+ const gchar *display_name,
+ gchar **arguments)
+{
+ XfcePanelPluginProvider *provider = NULL;
+
+ panel_return_val_if_fail (WRAPPER_IS_MODULE (module), NULL);
+ panel_return_val_if_fail (name != NULL && *name != '\0', NULL);
+ panel_return_val_if_fail (id != NULL && *id != '\0', NULL);
+
+ /* increase the module use count */
+ g_type_module_use (G_TYPE_MODULE (module));
+
+ if (G_LIKELY (module->library))
+ {
+ /* debug check */
+ panel_return_val_if_fail (module->construct_func != NULL, NULL);
+
+ /* create a new panel plugin */
+ provider = (*module->construct_func) (name, id, display_name, arguments, gdk_screen_get_default ());
+ }
+ else
+ {
+ /* decrease the module use count */
+ g_type_module_unuse (G_TYPE_MODULE (module));
+
+ /* this should never happen */
+ panel_assert_not_reached ();
+ }
+
+ return provider;
+}
diff --git a/wrapper/wrapper-module.h b/wrapper/wrapper-module.h
new file mode 100644
index 0000000..d995cb7
--- /dev/null
+++ b/wrapper/wrapper-module.h
@@ -0,0 +1,50 @@
+/* $Id$ */
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __WRAPPER_MODULE_H__
+#define __WRAPPER_MODULE_H__
+
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
+#include <libxfce4panel/xfce-panel-plugin-provider.h>
+
+G_BEGIN_DECLS
+
+typedef struct _WrapperModuleClass WrapperModuleClass;
+typedef struct _WrapperModule WrapperModule;
+
+#define WRAPPER_TYPE_MODULE (wrapper_module_get_type ())
+#define WRAPPER_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WRAPPER_TYPE_MODULE, WrapperModule))
+#define WRAPPER_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WRAPPER_TYPE_MODULE, WrapperModuleClass))
+#define WRAPPER_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WRAPPER_TYPE_MODULE))
+#define WRAPPER_IS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WRAPPER_TYPE_MODULE))
+#define WRAPPER_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WRAPPER_TYPE_MODULE, WrapperModuleClass))
+
+GType wrapper_module_get_type (void) G_GNUC_CONST;
+
+WrapperModule *wrapper_module_new (const gchar *filename,
+ const gchar *name);
+
+XfcePanelPluginProvider *wrapper_module_create_plugin (WrapperModule *module,
+ const gchar *name,
+ const gchar *id,
+ const gchar *display_name,
+ gchar **arguments);
+
+G_END_DECLS
+
+#endif /* !__WRAPPER_MODULE_H__ */
More information about the Xfce4-commits
mailing list