[gegl] Add gegl_module_db_load()
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Add gegl_module_db_load()
- Date: Sat, 9 Mar 2013 10:06:36 +0000 (UTC)
commit 904e960f5791f38fbcce66f48dba17a4e8ee11f9
Author: Daniel Sabo <DanielSabo gmail com>
Date: Mon Jan 7 11:26:33 2013 -0800
Add gegl_module_db_load()
Expose the functionality of gegl_module_db_load to allow
the loading of modules at runtime.
gegl/gegl-init.c | 7 +++++++
gegl/gegl-init.h | 1 +
gegl/gegl.h | 7 +++++++
3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gegl/gegl-init.c b/gegl/gegl-init.c
index a41d165..5ef77a9 100644
--- a/gegl/gegl-init.c
+++ b/gegl/gegl-init.c
@@ -459,6 +459,13 @@ gegl_get_version (int *major,
*micro = GEGL_MICRO_VERSION;
}
+void
+gegl_load_module_directory (const gchar *path)
+{
+ g_return_if_fail (g_file_test (path, G_FILE_TEST_IS_DIR));
+
+ gegl_module_db_load (module_db, path);
+}
static gboolean
gegl_post_parse_hook (GOptionContext *context,
diff --git a/gegl/gegl-init.h b/gegl/gegl-init.h
index 51ecffc..bff4470 100644
--- a/gegl/gegl-init.h
+++ b/gegl/gegl-init.h
@@ -72,6 +72,7 @@ void gegl_get_version (int *major,
int *minor,
int *micro);
+void gegl_load_module_directory (const gchar *path);
G_END_DECLS
diff --git a/gegl/gegl.h b/gegl/gegl.h
index 3cd653c..d70fb3c 100644
--- a/gegl/gegl.h
+++ b/gegl/gegl.h
@@ -830,6 +830,13 @@ gboolean gegl_processor_work (GeglProcessor *processor,
*/
GeglConfig * gegl_config (void);
+/**
+ * gegl_load_module_directory:
+ * @path: the directory to load modules from
+ *
+ * Load all gegl modules found in the given directory.
+ */
+void gegl_load_module_directory (const gchar *path);
void gegl_apply_op (GeglBuffer *buffer,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]