Commit c940d3f6 authored by Øyvind Kolås's avatar Øyvind Kolås

renamed GeglNodeContext GeglOperation context and replaced the node

field with an operation field.
* gegl/gegl-plugin.h:
* gegl/gegl-types.h:
* gegl/graph/Makefile.am:
* gegl/graph/gegl-node-context.c:
* gegl/graph/gegl-node-context.h:
* gegl/graph/gegl-node.c: 
* gegl/graph/gegl-node.h:
* gegl/graph/gegl-operation-context.c:
* gegl/graph/gegl-operation-context.h:
* gegl/operation/gegl-operation-composer.c:
* gegl/operation/gegl-operation-filter.c:
* gegl/operation/gegl-operation-point-composer.c:
* gegl/operation/gegl-operation-sink.c:
* gegl/operation/gegl-operation-source.c:
* gegl/operation/gegl-operation.c:
* gegl/operation/gegl-operation.h:
* gegl/operation/gegl-operations.c:
* gegl/process/gegl-cr-visitor.c:
* gegl/process/gegl-debug-rect-visitor.c:
* gegl/process/gegl-eval-mgr.c:
* gegl/process/gegl-eval-visitor.c:
* gegl/process/gegl-processor.c:
* operations/common/introspect.c:
* operations/common/load-buffer.c:
* operations/common/magick-load.c:
* operations/common/open-buffer.c:
* operations/common/raw-load.c:
* operations/common/remap.c:
* operations/core/clone.c:
* operations/core/crop.c:
* operations/core/nop.c:
* operations/core/shift.c:
* operations/workshop/rawbayer-load.c:

svn path=/trunk/; revision=2471
parent 9f6f21c0
2008-06-15 Øyvind Kolås <pippin@gimp.org>
renamed GeglNodeContext GeglOperation context and replaced the node
field with an operation field.
* gegl/gegl-plugin.h:
* gegl/gegl-types.h:
* gegl/graph/Makefile.am:
* gegl/graph/gegl-node-context.c:
* gegl/graph/gegl-node-context.h:
* gegl/graph/gegl-node.c:
* gegl/graph/gegl-node.h:
* gegl/graph/gegl-operation-context.c:
* gegl/graph/gegl-operation-context.h:
* gegl/operation/gegl-operation-composer.c:
* gegl/operation/gegl-operation-filter.c:
* gegl/operation/gegl-operation-point-composer.c:
* gegl/operation/gegl-operation-sink.c:
* gegl/operation/gegl-operation-source.c:
* gegl/operation/gegl-operation.c:
* gegl/operation/gegl-operation.h:
* gegl/operation/gegl-operations.c:
* gegl/process/gegl-cr-visitor.c:
* gegl/process/gegl-debug-rect-visitor.c:
* gegl/process/gegl-eval-mgr.c:
* gegl/process/gegl-eval-visitor.c:
* gegl/process/gegl-processor.c:
* operations/common/introspect.c:
* operations/common/load-buffer.c:
* operations/common/magick-load.c:
* operations/common/open-buffer.c:
* operations/common/raw-load.c:
* operations/common/remap.c:
* operations/core/clone.c:
* operations/core/crop.c:
* operations/core/nop.c:
* operations/core/shift.c:
* operations/workshop/rawbayer-load.c:
2008-06-15 Øyvind Kolås <pippin@gimp.org> 2008-06-15 Øyvind Kolås <pippin@gimp.org>
* gegl/Makefile.am: do not install gegl-config.c as if it was a * gegl/Makefile.am: do not install gegl-config.c as if it was a
......
This diff is collapsed.
...@@ -56,7 +56,7 @@ typedef struct _GeglNeedVisitor GeglNeedVisitor; ...@@ -56,7 +56,7 @@ typedef struct _GeglNeedVisitor GeglNeedVisitor;
#ifndef __GEGL_PLUGIN_H__ #ifndef __GEGL_PLUGIN_H__
typedef struct _GeglPad GeglPad; typedef struct _GeglPad GeglPad;
typedef struct _GeglOperation GeglOperation; typedef struct _GeglOperation GeglOperation;
typedef struct _GeglNodeContext GeglNodeContext; typedef struct _GeglOperationContext GeglOperationContext;
typedef struct _GeglConnection GeglConnection; typedef struct _GeglConnection GeglConnection;
#endif #endif
typedef struct _GeglPrepareVisitor GeglPrepareVisitor; typedef struct _GeglPrepareVisitor GeglPrepareVisitor;
......
...@@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libgraph.la ...@@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libgraph.la
GRAPH_sources = \ GRAPH_sources = \
gegl-connection.c \ gegl-connection.c \
gegl-node.c \ gegl-node.c \
gegl-node-context.c \ gegl-operation-context.c \
gegl-pad.c \ gegl-pad.c \
gegl-visitor.c \ gegl-visitor.c \
gegl-visitable.c gegl-visitable.c
...@@ -12,7 +12,7 @@ GRAPH_sources = \ ...@@ -12,7 +12,7 @@ GRAPH_sources = \
GRAPH_headers = \ GRAPH_headers = \
gegl-connection.h \ gegl-connection.h \
gegl-node.h \ gegl-node.h \
gegl-node-context.h \ gegl-operation-context.h \
gegl-pad.h \ gegl-pad.h \
gegl-visitor.h \ gegl-visitor.h \
gegl-visitable.h gegl-visitable.h
......
...@@ -306,6 +306,9 @@ set_property (GObject *gobject, ...@@ -306,6 +306,9 @@ set_property (GObject *gobject,
* the preceding argument is NULL, gcc might warn about * the preceding argument is NULL, gcc might warn about
* use of uninitialized variable. * use of uninitialized variable.
*/ */
#if defined(__GNUC__)
null = NULL;
#endif
gegl_node_set_op_class (node, g_value_get_string (value), NULL, null); gegl_node_set_op_class (node, g_value_get_string (value), NULL, null);
} }
break; break;
...@@ -1399,7 +1402,7 @@ gegl_node_set_need_rect (GeglNode *node, ...@@ -1399,7 +1402,7 @@ gegl_node_set_need_rect (GeglNode *node,
gint width, gint width,
gint height) gint height)
{ {
GeglNodeContext *context; GeglOperationContext *context;
g_return_if_fail (GEGL_IS_NODE (node)); g_return_if_fail (GEGL_IS_NODE (node));
g_return_if_fail (context_id != NULL); g_return_if_fail (context_id != NULL);
...@@ -1536,7 +1539,7 @@ void ...@@ -1536,7 +1539,7 @@ void
gegl_node_process (GeglNode *self) gegl_node_process (GeglNode *self)
{ {
GeglNode *input; GeglNode *input;
GeglNodeContext *context; GeglOperationContext *context;
GeglBuffer *buffer; GeglBuffer *buffer;
GeglRectangle defined; GeglRectangle defined;
...@@ -1555,11 +1558,11 @@ gegl_node_process (GeglNode *self) ...@@ -1555,11 +1558,11 @@ gegl_node_process (GeglNode *self)
GValue value = { 0, }; GValue value = { 0, };
g_value_init (&value, GEGL_TYPE_BUFFER); g_value_init (&value, GEGL_TYPE_BUFFER);
g_value_set_object (&value, buffer); g_value_set_object (&value, buffer);
gegl_node_context_set_property (context, "input", &value); gegl_operation_context_set_property (context, "input", &value);
g_value_unset (&value); g_value_unset (&value);
} }
gegl_node_context_set_result_rect (context, defined.x, defined.y, defined.width, defined.h); gegl_operation_context_set_result_rect (context, defined.x, defined.y, defined.width, defined.h);
gegl_operation_process (self->operation, &defined, "foo"); gegl_operation_process (self->operation, &defined, "foo");
gegl_node_remove_context (self, &defined); gegl_node_remove_context (self, &defined);
g_object_unref (buffer); g_object_unref (buffer);
...@@ -1570,7 +1573,7 @@ static gint ...@@ -1570,7 +1573,7 @@ static gint
lookup_context (gconstpointer a, lookup_context (gconstpointer a,
gconstpointer context_id) gconstpointer context_id)
{ {
GeglNodeContext *context = (void *) a; GeglOperationContext *context = (void *) a;
if (context->context_id == context_id) if (context->context_id == context_id)
return 0; return 0;
...@@ -1579,12 +1582,12 @@ lookup_context (gconstpointer a, ...@@ -1579,12 +1582,12 @@ lookup_context (gconstpointer a,
void babl_backtrack (void); void babl_backtrack (void);
GeglNodeContext * GeglOperationContext *
gegl_node_get_context (GeglNode *self, gegl_node_get_context (GeglNode *self,
gpointer context_id) gpointer context_id)
{ {
GSList *found; GSList *found;
GeglNodeContext *context = NULL; GeglOperationContext *context = NULL;
g_return_val_if_fail (GEGL_IS_NODE (self), NULL); g_return_val_if_fail (GEGL_IS_NODE (self), NULL);
g_return_val_if_fail (context_id != NULL, NULL); g_return_val_if_fail (context_id != NULL, NULL);
...@@ -1604,7 +1607,7 @@ void ...@@ -1604,7 +1607,7 @@ void
gegl_node_remove_context (GeglNode *self, gegl_node_remove_context (GeglNode *self,
gpointer context_id) gpointer context_id)
{ {
GeglNodeContext *context; GeglOperationContext *context;
g_return_if_fail (GEGL_IS_NODE (self)); g_return_if_fail (GEGL_IS_NODE (self));
g_return_if_fail (context_id != NULL); g_return_if_fail (context_id != NULL);
...@@ -1620,11 +1623,11 @@ gegl_node_remove_context (GeglNode *self, ...@@ -1620,11 +1623,11 @@ gegl_node_remove_context (GeglNode *self,
g_object_unref (context); g_object_unref (context);
} }
GeglNodeContext * GeglOperationContext *
gegl_node_add_context (GeglNode *self, gegl_node_add_context (GeglNode *self,
gpointer context_id) gpointer context_id)
{ {
GeglNodeContext *context = NULL; GeglOperationContext *context = NULL;
GSList *found; GSList *found;
g_return_val_if_fail (GEGL_IS_NODE (self), NULL); g_return_val_if_fail (GEGL_IS_NODE (self), NULL);
...@@ -1642,8 +1645,8 @@ gegl_node_add_context (GeglNode *self, ...@@ -1642,8 +1645,8 @@ gegl_node_add_context (GeglNode *self,
return context; return context;
} }
context = g_object_new (GEGL_TYPE_NODE_CONTEXT, NULL); context = g_object_new (GEGL_TYPE_OPERATION_CONTEXT, NULL);
context->node = self; context->operation = self->operation;
context->context_id = context_id; context->context_id = context_id;
self->context = g_slist_prepend (self->context, context); self->context = g_slist_prepend (self->context, context);
return context; return context;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef __GEGL_NODE_H__ #ifndef __GEGL_NODE_H__
#define __GEGL_NODE_H__ #define __GEGL_NODE_H__
#include "gegl-node-context.h" #include "gegl-operation-context.h"
#include <gegl/buffer/gegl-buffer.h> #include <gegl/buffer/gegl-buffer.h>
#include <gegl/buffer/gegl-cache.h> #include <gegl/buffer/gegl-cache.h>
...@@ -54,7 +54,7 @@ struct _GeglNode ...@@ -54,7 +54,7 @@ struct _GeglNode
gboolean is_root; gboolean is_root;
gboolean enabled; gboolean enabled;
GSList *context; /*< list of GeglNodeContext's corresponding to GSList *context; /*< list of GeglOperationContext's corresponding to
evaluation contexts */ evaluation contexts */
gboolean is_graph; gboolean is_graph;
...@@ -133,11 +133,11 @@ GeglNode * gegl_node_adopt_child (GeglNode *self, ...@@ -133,11 +133,11 @@ GeglNode * gegl_node_adopt_child (GeglNode *self,
GType gegl_node_get_type (void) G_GNUC_CONST; GType gegl_node_get_type (void) G_GNUC_CONST;
GeglNodeContext *gegl_node_get_context (GeglNode *self, GeglOperationContext *gegl_node_get_context (GeglNode *self,
gpointer context_id); gpointer context_id);
void gegl_node_remove_context (GeglNode *self, void gegl_node_remove_context (GeglNode *self,
gpointer context_id); gpointer context_id);
GeglNodeContext *gegl_node_add_context (GeglNode *self, GeglOperationContext *gegl_node_add_context (GeglNode *self,
gpointer context_id); gpointer context_id);
void gegl_node_add_pad (GeglNode *self, void gegl_node_add_pad (GeglNode *self,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>. * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
* *
* Copyright 2003 Calvin Williamson * Copyright 2003 Calvin Williamson
* 2006 Øyvind Kolås * 2006-2008 Øyvind Kolås
*/ */
#include "config.h" #include "config.h"
...@@ -27,25 +27,25 @@ ...@@ -27,25 +27,25 @@
#include "gegl-types.h" #include "gegl-types.h"
#include "gegl-node-context.h" #include "gegl-operation-context.h"
#include "gegl-node.h" #include "gegl-node.h"
#include "gegl-pad.h" #include "gegl-pad.h"
#include "gegl-config.h" #include "gegl-config.h"
#include "operation/gegl-operation.h" #include "operation/gegl-operation.h"
static void gegl_node_context_class_init (GeglNodeContextClass *klass); static void gegl_operation_context_class_init (GeglOperationContextClass *klass);
static void gegl_node_context_init (GeglNodeContext *self); static void gegl_operation_context_init (GeglOperationContext *self);
static void finalize (GObject *gobject); static void finalize (GObject *gobject);
static GValue * gegl_node_context_get_value (GeglNodeContext *self, static GValue * gegl_operation_context_get_value (GeglOperationContext *self,
const gchar *property_name); const gchar *property_name);
static GValue * gegl_node_context_add_value (GeglNodeContext *self, static GValue * gegl_operation_context_add_value (GeglOperationContext *self,
const gchar *property_name); const gchar *property_name);
G_DEFINE_TYPE (GeglNodeContext, gegl_node_context, G_TYPE_OBJECT); G_DEFINE_TYPE (GeglOperationContext, gegl_operation_context, G_TYPE_OBJECT);
static void static void
gegl_node_context_class_init (GeglNodeContextClass *klass) gegl_operation_context_class_init (GeglOperationContextClass *klass)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
...@@ -53,95 +53,95 @@ gegl_node_context_class_init (GeglNodeContextClass *klass) ...@@ -53,95 +53,95 @@ gegl_node_context_class_init (GeglNodeContextClass *klass)
} }
static void static void
gegl_node_context_init (GeglNodeContext *self) gegl_operation_context_init (GeglOperationContext *self)
{ {
self->refs = 0; self->refs = 0;
self->cached = FALSE; self->cached = FALSE;
} }
void void
gegl_node_context_set_need_rect (GeglNodeContext *node, gegl_operation_context_set_need_rect (GeglOperationContext *self,
gint x, gint x,
gint y, gint y,
gint width, gint width,
gint height) gint height)
{ {
g_assert (node); g_assert (self);
node->need_rect.x = x; self->need_rect.x = x;
node->need_rect.y = y; self->need_rect.y = y;
node->need_rect.width = width; self->need_rect.width = width;
node->need_rect.height = height; self->need_rect.height = height;
} }
GeglRectangle * GeglRectangle *
gegl_node_context_get_result_rect (GeglNodeContext *node) gegl_operation_context_get_result_rect (GeglOperationContext *self)
{ {
return &node->result_rect; return &self->result_rect;
} }
void void
gegl_node_context_set_result_rect (GeglNodeContext *node, gegl_operation_context_set_result_rect (GeglOperationContext *self,
gint x, gint x,
gint y, gint y,
gint width, gint width,
gint height) gint height)
{ {
g_assert (node); g_assert (self);
node->result_rect.x = x; self->result_rect.x = x;
node->result_rect.y = y; self->result_rect.y = y;
node->result_rect.width = width; self->result_rect.width = width;
node->result_rect.height = height; self->result_rect.height = height;
} }
GeglRectangle * GeglRectangle *
gegl_node_context_get_need_rect (GeglNodeContext *node) gegl_operation_context_get_need_rect (GeglOperationContext *self)
{ {
return &node->need_rect; return &self->need_rect;
} }
void void
gegl_node_context_set_property (GeglNodeContext *context, gegl_operation_context_set_property (GeglOperationContext *context,
const gchar *property_name, const gchar *property_name,
const GValue *value) const GValue *value)
{ {
GParamSpec *pspec; GParamSpec *pspec;
GValue *storage; GValue *storage;
pspec = gegl_node_find_property (context->node, property_name); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (context->operation)), property_name);
if (!pspec) if (!pspec)
{ {
g_warning ("%s: node %s has no pad|property named '%s'", g_warning ("%s: node %s has no pad|property named '%s'",
G_STRFUNC, G_STRFUNC,
gegl_node_get_debug_name (context->node), GEGL_OPERATION_GET_CLASS (context->operation)->name,
property_name); property_name);
} }
storage = gegl_node_context_add_value (context, property_name); storage = gegl_operation_context_add_value (context, property_name);
/* storage needs to have the correct type */ /* storage needs to have the correct type */
g_value_init (storage, G_PARAM_SPEC_VALUE_TYPE (pspec)); g_value_init (storage, G_PARAM_SPEC_VALUE_TYPE (pspec));
g_value_copy (value, storage); g_value_copy (value, storage);
} }
void void
gegl_node_context_get_property (GeglNodeContext *context, gegl_operation_context_get_property (GeglOperationContext *context,
const gchar *property_name, const gchar *property_name,
GValue *value) GValue *value)
{ {
GParamSpec *pspec; GParamSpec *pspec;
GValue *storage; GValue *storage;
pspec = gegl_node_find_property (context->node, property_name); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (context->operation)), property_name);
if (!pspec) if (!pspec)
{ {
g_warning ("%s: node %s has no pad|property named '%s'", g_warning ("%s: node %s has no pad|property named '%s'",
G_STRFUNC, G_STRFUNC,
gegl_node_get_debug_name (context->node), GEGL_OPERATION_GET_CLASS (context->operation)->name,
property_name); property_name);
} }
storage = gegl_node_context_get_value (context, property_name); storage = gegl_operation_context_get_value (context, property_name);
if (storage != NULL) if (storage != NULL)
{ {
g_value_copy (storage, value); g_value_copy (storage, value);
...@@ -154,8 +154,8 @@ typedef struct Property ...@@ -154,8 +154,8 @@ typedef struct Property
GValue value; GValue value;
} Property; } Property;
static Property *property_new (GeglNode *node, static Property *
const gchar *property_name) property_new (const gchar *property_name)
{ {
Property *property = g_slice_new0 (Property); Property *property = g_slice_new0 (Property);
...@@ -163,7 +163,8 @@ static Property *property_new (GeglNode *node, ...@@ -163,7 +163,8 @@ static Property *property_new (GeglNode *node,
return property; return property;
} }
static void property_destroy (Property *property) static void
property_destroy (Property *property)
{ {
g_free (property->name); g_free (property->name);
g_value_unset (&property->value); /* does an unref */ g_value_unset (&property->value); /* does an unref */
...@@ -180,8 +181,8 @@ lookup_property (gconstpointer a, ...@@ -180,8 +181,8 @@ lookup_property (gconstpointer a,
} }
static GValue * static GValue *
gegl_node_context_get_value (GeglNodeContext *self, gegl_operation_context_get_value (GeglOperationContext *self,
const gchar *property_name) const gchar *property_name)
{ {
Property *property = NULL; Property *property = NULL;
...@@ -199,8 +200,8 @@ gegl_node_context_get_value (GeglNodeContext *self, ...@@ -199,8 +200,8 @@ gegl_node_context_get_value (GeglNodeContext *self,
} }
void void
gegl_node_context_remove_property (GeglNodeContext *self, gegl_operation_context_remove_property (GeglOperationContext *self,
const gchar *property_name) const gchar *property_name)
{ {
Property *property = NULL; Property *property = NULL;
...@@ -211,8 +212,8 @@ gegl_node_context_remove_property (GeglNodeContext *self, ...@@ -211,8 +212,8 @@ gegl_node_context_remove_property (GeglNodeContext *self,
if (!property) if (!property)
{ {
g_warning ("didn't find context %p for %s", property_name, g_warning ("didn't find property %s for %s", property_name,
gegl_node_get_debug_name (self->node)); GEGL_OPERATION_GET_CLASS (self->operation)->name);
return; return;
} }
self->property = g_slist_remove (self->property, property); self->property = g_slist_remove (self->property, property);
...@@ -220,8 +221,8 @@ gegl_node_context_remove_property (GeglNodeContext *self, ...@@ -220,8 +221,8 @@ gegl_node_context_remove_property (GeglNodeContext *self,
} }
static GValue * static GValue *
gegl_node_context_add_value (GeglNodeContext *self, gegl_operation_context_add_value (GeglOperationContext *self,
const gchar *property_name) const gchar *property_name)
{ {
Property *property = NULL; Property *property = NULL;
GSList *found; GSList *found;
...@@ -236,7 +237,7 @@ gegl_node_context_add_value (GeglNodeContext *self, ...@@ -236,7 +237,7 @@ gegl_node_context_add_value (GeglNodeContext *self,
return &property->value; return &property->value;
} }
property = property_new (self->node, property_name); property = property_new (property_name);
self->property = g_slist_prepend (self->property, property); self->property = g_slist_prepend (self->property, property);
...@@ -246,7 +247,7 @@ gegl_node_context_add_value (GeglNodeContext *self, ...@@ -246,7 +247,7 @@ gegl_node_context_add_value (GeglNodeContext *self,
static void static void
finalize (GObject *gobject) finalize (GObject *gobject)
{ {
GeglNodeContext *self = GEGL_NODE_CONTEXT (gobject); GeglOperationContext *self = GEGL_OPERATION_CONTEXT (gobject);
while (self->property) while (self->property)
{ {
...@@ -255,15 +256,14 @@ finalize (GObject *gobject) ...@@ -255,15 +256,14 @@ finalize (GObject *gobject)
property_destroy (property); property_destroy (property);
} }
G_OBJECT_CLASS (gegl_node_context_parent_class)->finalize (gobject); G_OBJECT_CLASS (gegl_operation_context_parent_class)->finalize (gobject);
} }
void void
gegl_node_context_set_object (GeglNodeContext *context, gegl_operation_context_set_object (GeglOperationContext *context,
const gchar *padname, const gchar *padname,
GObject *data) GObject *data)
{ {
GeglNode *node;
GeglOperation *operation; GeglOperation *operation;
GParamSpec *pspec; GParamSpec *pspec;
GValue value = {0,}; GValue value = {0,};
...@@ -272,35 +272,32 @@ gegl_node_context_set_object (GeglNodeContext *context, ...@@ -272,35 +272,32 @@ gegl_node_context_set_object (GeglNodeContext *context,
* output object/value set? * output object/value set?
*/ */
node = context->node; operation = context->operation;
operation = node->operation; pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (context->operation)), padname);
pspec = gegl_node_find_property (node, padname);
if (pspec) if (pspec)
{ {
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
g_value_set_object (&value, data); g_value_set_object (&value, data);
gegl_node_context_set_property (context, padname, &value); gegl_operation_context_set_property (context, padname, &value);
} }
g_value_unset (&value); g_value_unset (&value);
g_object_unref (data); /* are we stealing the initial reference? */ g_object_unref (data); /* are we stealing the initial reference? */
} }
GObject * GObject *
gegl_node_context_get_object (GeglNodeContext *context, gegl_operation_context_get_object (GeglOperationContext *context,
const gchar *padname) const gchar *padname)
{ {
GeglNode *node;
GeglOperation *operation; GeglOperation *operation;
GObject *ret; GObject *ret;
GParamSpec *pspec; GParamSpec *pspec;
GValue value = { 0, }; GValue value = { 0, };
node = context->node; operation = context->operation;
operation = node->operation;
pspec = gegl_node_find_property (node, padname); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (context->operation)), padname);
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
gegl_node_context_get_property (context, padname, &value); gegl_operation_context_get_property (context, padname, &value);
/* FIXME: handle other things than gobjects as well? */ /* FIXME: handle other things than gobjects as well? */
ret = g_value_get_object (&value); ret = g_value_get_object (&value);
...@@ -315,23 +312,39 @@ gegl_node_context_get_object (GeglNodeContext *context, ...@@ -315,23 +312,39 @@ gegl_node_context_get_object (GeglNodeContext *context,
} }
GeglBuffer * GeglBuffer *
gegl_node_context_get_target (GeglNodeContext *context, gegl_operation_context_get_source (GeglOperationContext *context,
const gchar *padname) const gchar *padname)
{
GeglOperation *operation;
GeglBuffer *real_input;
GeglBuffer *input;
GeglRectangle input_request;
operation = context->operation;