[gimp] app: add gimp_gegl_node_is_source_operation()
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gimp_gegl_node_is_source_operation()
- Date: Wed, 27 Mar 2019 19:49:47 +0000 (UTC)
commit ff13e55c16bd936b9d88635e885dbfc282c9a9d3
Author: Ell <ell_se yahoo com>
Date: Wed Mar 27 14:31:14 2019 -0400
app: add gimp_gegl_node_is_source_operation()
... which determines if a node is a source operation.
app/gegl/gimp-gegl-utils.c | 15 +++++++++++++++
app/gegl/gimp-gegl-utils.h | 1 +
2 files changed, 16 insertions(+)
---
diff --git a/app/gegl/gimp-gegl-utils.c b/app/gegl/gimp-gegl-utils.c
index 9c4384d345..3d9890bd9f 100644
--- a/app/gegl/gimp-gegl-utils.c
+++ b/app/gegl/gimp-gegl-utils.c
@@ -119,6 +119,21 @@ gimp_gegl_progress_connect (GeglNode *node,
(GDestroyNotify) g_free);
}
+gboolean
+gimp_gegl_node_is_source_operation (GeglNode *node)
+{
+ GeglOperation *operation;
+
+ g_return_val_if_fail (GEGL_IS_NODE (node), FALSE);
+
+ operation = gegl_node_get_gegl_operation (node);
+
+ if (! operation)
+ return FALSE;
+
+ return GEGL_IS_OPERATION_SOURCE (operation);
+}
+
gboolean
gimp_gegl_node_is_point_operation (GeglNode *node)
{
diff --git a/app/gegl/gimp-gegl-utils.h b/app/gegl/gimp-gegl-utils.h
index 4fbe46f274..ef6050d264 100644
--- a/app/gegl/gimp-gegl-utils.h
+++ b/app/gegl/gimp-gegl-utils.h
@@ -32,6 +32,7 @@ void gimp_gegl_progress_connect (GeglNode *node,
GimpProgress *progress,
const gchar *text);
+gboolean gimp_gegl_node_is_source_operation (GeglNode *node);
gboolean gimp_gegl_node_is_point_operation (GeglNode *node);
const Babl * gimp_gegl_node_get_format (GeglNode *node,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]