summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-05-06 22:19:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-05-10 22:04:19 -0400
commit7f9a0dbe164f7c731d24c4890dde51391787e966 (patch)
treef2165eaca0eee173e465c7058420642069990cb8
parent87e3484aa74f1daa212a6ff3d3492d81e7d37b8d (diff)
downloadgtk+-7f9a0dbe164f7c731d24c4890dde51391787e966.tar.gz
Add private api to load a single module
In the following commits, this function will be used to load the gtkparasite module.
-rw-r--r--gtk/gtkmodules.c7
-rw-r--r--gtk/gtkmodules.h1
-rw-r--r--gtk/gtkmodulesprivate.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 640be7bb55..87883e9c70 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -600,3 +600,10 @@ _gtk_module_has_mixed_deps (GModule *module_to_check)
return result;
}
+
+void
+_gtk_modules_load_module (const gchar *name)
+{
+ /* We leak the ref */
+ g_slist_free (load_modules (name));
+}
diff --git a/gtk/gtkmodules.h b/gtk/gtkmodules.h
index 29409b7041..b5a756edfe 100644
--- a/gtk/gtkmodules.h
+++ b/gtk/gtkmodules.h
@@ -49,7 +49,6 @@ typedef void (*GtkModuleInitFunc) (gint *argc,
*/
typedef void (*GtkModuleDisplayInitFunc) (GdkDisplay *display);
-
G_END_DECLS
diff --git a/gtk/gtkmodulesprivate.h b/gtk/gtkmodulesprivate.h
index 11dbebfd9d..34c30739f9 100644
--- a/gtk/gtkmodulesprivate.h
+++ b/gtk/gtkmodulesprivate.h
@@ -38,6 +38,7 @@ void _gtk_modules_init (gint *argc,
const gchar *gtk_modules_args);
void _gtk_modules_settings_changed (GtkSettings *settings,
const gchar *modules);
+void _gtk_modules_load_module (const gchar *name);
gboolean _gtk_module_has_mixed_deps (GModule *module);