[gimp/soc-2011-seamless-clone2] app: add gimp_filter_new(name)



commit b949708326c2e3d65b5646e27e579694ac59c9bf
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 11 19:03:10 2013 +0200

    app: add gimp_filter_new(name)

 app/core/gimpfilter.c |   13 +++++++++++++
 app/core/gimpfilter.h |   13 +++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/app/core/gimpfilter.c b/app/core/gimpfilter.c
index 340dd89..a454a3c 100644
--- a/app/core/gimpfilter.c
+++ b/app/core/gimpfilter.c
@@ -176,6 +176,19 @@ gimp_filter_real_get_node (GimpFilter *filter)
   return private->node;
 }
 
+
+/*  public functions  */
+
+GimpFilter *
+gimp_filter_new (const gchar *name)
+{
+  g_return_val_if_fail (name != NULL, NULL);
+
+  return g_object_new (GIMP_TYPE_FILTER,
+                       "name", name,
+                       NULL);
+}
+
 GeglNode *
 gimp_filter_get_node (GimpFilter *filter)
 {
diff --git a/app/core/gimpfilter.h b/app/core/gimpfilter.h
index 21e7a31..5485500 100644
--- a/app/core/gimpfilter.h
+++ b/app/core/gimpfilter.h
@@ -47,14 +47,15 @@ struct _GimpFilterClass
 };
 
 
-GType      gimp_filter_get_type         (void) G_GNUC_CONST;
+GType        gimp_filter_get_type         (void) G_GNUC_CONST;
+GimpFilter * gimp_filter_new              (const gchar *name);
 
-GeglNode * gimp_filter_get_node         (GimpFilter *filter);
-GeglNode * gimp_filter_peek_node        (GimpFilter *filter);
+GeglNode   * gimp_filter_get_node         (GimpFilter *filter);
+GeglNode   * gimp_filter_peek_node        (GimpFilter *filter);
 
-void       gimp_filter_set_is_last_node (GimpFilter *filter,
-                                         gboolean    is_last_node);
-gboolean   gimp_filter_get_is_last_node (GimpFilter *filter);
+void         gimp_filter_set_is_last_node (GimpFilter *filter,
+                                           gboolean    is_last_node);
+gboolean     gimp_filter_get_is_last_node (GimpFilter *filter);
 
 
 #endif /* __GIMP_FILTER_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]