[gegl] Add gegl_node_get_gegl_operation



commit f51fb7804107ea3fa4bed326b5d14549c6b81bcc
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Sat Nov 30 10:10:37 2013 -0800

    Add gegl_node_get_gegl_operation
    
    While obscured behind a property the operation object of GeglNode
    was already public, this just provides a more convenient access
    point for it.

 gegl/graph/gegl-node.c |    9 +++++++++
 gegl/graph/gegl-node.h |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 2514dc0..03664f5 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -1495,6 +1495,15 @@ gegl_node_get_operation (const GeglNode *node)
   return GEGL_OPERATION_GET_CLASS (node->operation)->name;
 }
 
+GeglOperation *
+gegl_node_get_gegl_operation (GeglNode *node)
+{
+  if (node == NULL)
+    return NULL;
+
+  return node->operation;
+}
+
 const gchar *
 gegl_node_get_debug_name (GeglNode *node)
 {
diff --git a/gegl/graph/gegl-node.h b/gegl/graph/gegl-node.h
index e649571..3577119 100644
--- a/gegl/graph/gegl-node.h
+++ b/gegl/graph/gegl-node.h
@@ -492,6 +492,15 @@ GeglNode    * gegl_node_get_input_proxy  (GeglNode      *node,
 const gchar * gegl_node_get_operation    (const GeglNode *node);
 
 /**
+ * gegl_node_get_gegl_operation: (skip)
+ * @node: a #GeglNode
+ *
+ * Return value: (transfer none) (allow-none): The operation object
+ * assoicated with this node or NULL if there is no op associated.
+ */
+GeglOperation *gegl_node_get_gegl_operation   (GeglNode *node);
+
+/**
  * gegl_node_get_output_proxy:
  * @node: a #GeglNode
  * @pad_name: the name of the pad.


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