Commit 24fac1de authored by Martin Nordholts's avatar Martin Nordholts
Browse files

Move the base GeglNode here in preparation for moving the GimpLayer

* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.

* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.

* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.

* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h

svn path=/trunk/; revision=27521
parent b66bad37
2008-11-02 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.
* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.
* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.
* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h
2008-11-01 Michael Natterer <mitch@gimp.org> 2008-11-01 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangletool.c * app/tools/gimprectangletool.c
...@@ -64,6 +85,7 @@ ...@@ -64,6 +85,7 @@
Soft light with a FIXME. Soft light with a FIXME.
2008-11-01 Martin Nordholts <martinn@svn.gnome.org> 2008-11-01 Martin Nordholts <martinn@svn.gnome.org>
* libgimpcolor/gimphsl.c (gimp_hsl_set): Added 'Since: GIMP 2.8'. * libgimpcolor/gimphsl.c (gimp_hsl_set): Added 'Since: GIMP 2.8'.
2008-11-01 Martin Nordholts <martinn@svn.gnome.org> 2008-11-01 Martin Nordholts <martinn@svn.gnome.org>
......
...@@ -158,7 +158,7 @@ static void gimp_channel_set_tiles (GimpDrawable *drawable, ...@@ -158,7 +158,7 @@ static void gimp_channel_set_tiles (GimpDrawable *drawable,
GimpImageType type, GimpImageType type,
gint offset_x, gint offset_x,
gint offset_y); gint offset_y);
static GeglNode * gimp_channel_get_node (GimpDrawable *drawable); static GeglNode * gimp_channel_get_node (GimpItem *item);
static void gimp_channel_swap_pixels (GimpDrawable *drawable, static void gimp_channel_swap_pixels (GimpDrawable *drawable,
TileManager *tiles, TileManager *tiles,
gboolean sparse, gboolean sparse,
...@@ -263,6 +263,7 @@ gimp_channel_class_init (GimpChannelClass *klass) ...@@ -263,6 +263,7 @@ gimp_channel_class_init (GimpChannelClass *klass)
item_class->rotate = gimp_channel_rotate; item_class->rotate = gimp_channel_rotate;
item_class->transform = gimp_channel_transform; item_class->transform = gimp_channel_transform;
item_class->stroke = gimp_channel_stroke; item_class->stroke = gimp_channel_stroke;
item_class->get_node = gimp_channel_get_node;
item_class->default_name = _("Channel"); item_class->default_name = _("Channel");
item_class->rename_desc = _("Rename Channel"); item_class->rename_desc = _("Rename Channel");
item_class->translate_desc = _("Move Channel"); item_class->translate_desc = _("Move Channel");
...@@ -278,7 +279,6 @@ gimp_channel_class_init (GimpChannelClass *klass) ...@@ -278,7 +279,6 @@ gimp_channel_class_init (GimpChannelClass *klass)
drawable_class->apply_region = gimp_channel_apply_region; drawable_class->apply_region = gimp_channel_apply_region;
drawable_class->replace_region = gimp_channel_replace_region; drawable_class->replace_region = gimp_channel_replace_region;
drawable_class->set_tiles = gimp_channel_set_tiles; drawable_class->set_tiles = gimp_channel_set_tiles;
drawable_class->get_node = gimp_channel_get_node;
drawable_class->swap_pixels = gimp_channel_swap_pixels; drawable_class->swap_pixels = gimp_channel_swap_pixels;
klass->boundary = gimp_channel_real_boundary; klass->boundary = gimp_channel_real_boundary;
...@@ -837,15 +837,16 @@ gimp_channel_set_tiles (GimpDrawable *drawable, ...@@ -837,15 +837,16 @@ gimp_channel_set_tiles (GimpDrawable *drawable,
} }
static GeglNode * static GeglNode *
gimp_channel_get_node (GimpDrawable *drawable) gimp_channel_get_node (GimpItem *item)
{ {
GimpChannel *channel = GIMP_CHANNEL (drawable); GimpDrawable *drawable = GIMP_DRAWABLE (item);
GeglNode *node; GimpChannel *channel = GIMP_CHANNEL (item);
GeglNode *source; GeglNode *node;
GeglNode *mode_node; GeglNode *source;
GeglColor *color; GeglNode *mode_node;
GeglColor *color;
node = GIMP_DRAWABLE_CLASS (parent_class)->get_node (drawable);
node = GIMP_ITEM_CLASS (parent_class)->get_node (item);
source = gimp_drawable_get_source_node (drawable); source = gimp_drawable_get_source_node (drawable);
gegl_node_add_child (node, source); gegl_node_add_child (node, source);
......
...@@ -138,7 +138,7 @@ static void gimp_drawable_real_set_tiles (GimpDrawable *drawable, ...@@ -138,7 +138,7 @@ static void gimp_drawable_real_set_tiles (GimpDrawable *drawable,
GimpImageType type, GimpImageType type,
gint offset_x, gint offset_x,
gint offset_y); gint offset_y);
static GeglNode * gimp_drawable_real_get_node (GimpDrawable *drawable); static GeglNode * gimp_drawable_get_node (GimpItem *item);
static void gimp_drawable_real_push_undo (GimpDrawable *drawable, static void gimp_drawable_real_push_undo (GimpDrawable *drawable,
const gchar *undo_desc, const gchar *undo_desc,
...@@ -213,6 +213,7 @@ gimp_drawable_class_init (GimpDrawableClass *klass) ...@@ -213,6 +213,7 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
item_class->flip = gimp_drawable_flip; item_class->flip = gimp_drawable_flip;
item_class->rotate = gimp_drawable_rotate; item_class->rotate = gimp_drawable_rotate;
item_class->transform = gimp_drawable_transform; item_class->transform = gimp_drawable_transform;
item_class->get_node = gimp_drawable_get_node;
klass->update = gimp_drawable_real_update; klass->update = gimp_drawable_real_update;
klass->alpha_changed = NULL; klass->alpha_changed = NULL;
...@@ -223,7 +224,6 @@ gimp_drawable_class_init (GimpDrawableClass *klass) ...@@ -223,7 +224,6 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
klass->replace_region = gimp_drawable_real_replace_region; klass->replace_region = gimp_drawable_real_replace_region;
klass->get_tiles = gimp_drawable_real_get_tiles; klass->get_tiles = gimp_drawable_real_get_tiles;
klass->set_tiles = gimp_drawable_real_set_tiles; klass->set_tiles = gimp_drawable_real_set_tiles;
klass->get_node = gimp_drawable_real_get_node;
klass->push_undo = gimp_drawable_real_push_undo; klass->push_undo = gimp_drawable_real_push_undo;
klass->swap_pixels = gimp_drawable_real_swap_pixels; klass->swap_pixels = gimp_drawable_real_swap_pixels;
} }
...@@ -271,12 +271,6 @@ gimp_drawable_finalize (GObject *object) ...@@ -271,12 +271,6 @@ gimp_drawable_finalize (GObject *object)
drawable->source_node = NULL; drawable->source_node = NULL;
} }
if (drawable->node)
{
g_object_unref (drawable->node);
drawable->node = NULL;
}
if (drawable->preview_cache) if (drawable->preview_cache)
gimp_preview_cache_invalidate (&drawable->preview_cache); gimp_preview_cache_invalidate (&drawable->preview_cache);
...@@ -342,14 +336,15 @@ static void ...@@ -342,14 +336,15 @@ static void
gimp_drawable_visibility_changed (GimpItem *item) gimp_drawable_visibility_changed (GimpItem *item)
{ {
GimpDrawable *drawable = GIMP_DRAWABLE (item); GimpDrawable *drawable = GIMP_DRAWABLE (item);
GeglNode *node = gimp_item_get_node (item);
if (drawable->node) if (node)
{ {
GeglNode *input; GeglNode *input;
GeglNode *output; GeglNode *output;
input = gegl_node_get_input_proxy (drawable->node, "input"); input = gegl_node_get_input_proxy (node, "input");
output = gegl_node_get_output_proxy (drawable->node, "output"); output = gegl_node_get_output_proxy (node, "output");
if (gimp_item_get_visible (item)) if (gimp_item_get_visible (item))
{ {
...@@ -361,9 +356,6 @@ gimp_drawable_visibility_changed (GimpItem *item) ...@@ -361,9 +356,6 @@ gimp_drawable_visibility_changed (GimpItem *item)
else else
{ {
gegl_node_disconnect (drawable->mode_node, "input"); gegl_node_disconnect (drawable->mode_node, "input");
gegl_node_connect_to (input, "output",
output, "input");
} }
} }
...@@ -778,19 +770,21 @@ gimp_drawable_real_set_tiles (GimpDrawable *drawable, ...@@ -778,19 +770,21 @@ gimp_drawable_real_set_tiles (GimpDrawable *drawable,
} }
static GeglNode * static GeglNode *
gimp_drawable_real_get_node (GimpDrawable *drawable) gimp_drawable_get_node (GimpItem *item)
{ {
GeglNode *input; GimpDrawable *drawable = GIMP_DRAWABLE (item);
GeglNode *output; GeglNode *node;
GeglNode *input;
GeglNode *output;
drawable->node = gegl_node_new (); node = GIMP_ITEM_CLASS (parent_class)->get_node (item);
drawable->mode_node = gegl_node_new_child (drawable->node, drawable->mode_node = gegl_node_new_child (node,
"operation", "gegl:normal", "operation", "gegl:normal",
NULL); NULL);
input = gegl_node_get_input_proxy (drawable->node, "input"); input = gegl_node_get_input_proxy (node, "input");
output = gegl_node_get_output_proxy (drawable->node, "output"); output = gegl_node_get_output_proxy (node, "output");
if (gimp_item_get_visible (GIMP_ITEM (drawable))) if (gimp_item_get_visible (GIMP_ITEM (drawable)))
{ {
...@@ -805,7 +799,7 @@ gimp_drawable_real_get_node (GimpDrawable *drawable) ...@@ -805,7 +799,7 @@ gimp_drawable_real_get_node (GimpDrawable *drawable)
output, "input"); output, "input");
} }
return drawable->node; return node;
} }
static void static void
...@@ -1140,24 +1134,13 @@ gimp_drawable_get_source_node (GimpDrawable *drawable) ...@@ -1140,24 +1134,13 @@ gimp_drawable_get_source_node (GimpDrawable *drawable)
return drawable->source_node; return drawable->source_node;
} }
GeglNode *
gimp_drawable_get_node (GimpDrawable *drawable)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
if (drawable->node)
return drawable->node;
return GIMP_DRAWABLE_GET_CLASS (drawable)->get_node (drawable);
}
GeglNode * GeglNode *
gimp_drawable_get_mode_node (GimpDrawable *drawable) gimp_drawable_get_mode_node (GimpDrawable *drawable)
{ {
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL); g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
if (! drawable->mode_node) if (! drawable->mode_node)
gimp_drawable_get_node (drawable); gimp_drawable_get_node (GIMP_ITEM (drawable));
return drawable->mode_node; return drawable->mode_node;
} }
......
...@@ -42,7 +42,6 @@ struct _GimpDrawable ...@@ -42,7 +42,6 @@ struct _GimpDrawable
GeglNode *source_node; GeglNode *source_node;
GeglNode *node;
GeglNode *mode_node; GeglNode *mode_node;
gint bytes; /* bytes per pixel */ gint bytes; /* bytes per pixel */
...@@ -98,8 +97,6 @@ struct _GimpDrawableClass ...@@ -98,8 +97,6 @@ struct _GimpDrawableClass
GimpImageType type, GimpImageType type,
gint offset_x, gint offset_x,
gint offset_y); gint offset_y);
GeglNode * (* get_node) (GimpDrawable *drawable);
void (* push_undo) (GimpDrawable *drawable, void (* push_undo) (GimpDrawable *drawable,
const gchar *undo_desc, const gchar *undo_desc,
TileManager *tiles, TileManager *tiles,
...@@ -176,7 +173,6 @@ void gimp_drawable_set_tiles_full (GimpDrawable *drawable, ...@@ -176,7 +173,6 @@ void gimp_drawable_set_tiles_full (GimpDrawable *drawable,
gint offset_y); gint offset_y);
GeglNode * gimp_drawable_get_source_node (GimpDrawable *drawable); GeglNode * gimp_drawable_get_source_node (GimpDrawable *drawable);
GeglNode * gimp_drawable_get_node (GimpDrawable *drawable);
GeglNode * gimp_drawable_get_mode_node (GimpDrawable *drawable); GeglNode * gimp_drawable_get_mode_node (GimpDrawable *drawable);
void gimp_drawable_swap_pixels (GimpDrawable *drawable, void gimp_drawable_swap_pixels (GimpDrawable *drawable,
......
...@@ -120,7 +120,7 @@ gimp_drawable_stack_remove (GimpContainer *container, ...@@ -120,7 +120,7 @@ gimp_drawable_stack_remove (GimpContainer *container,
gimp_drawable_stack_remove_node (stack, GIMP_DRAWABLE (object)); gimp_drawable_stack_remove_node (stack, GIMP_DRAWABLE (object));
gegl_node_remove_child (stack->graph, gegl_node_remove_child (stack->graph,
gimp_drawable_get_node (GIMP_DRAWABLE (object))); gimp_item_get_node (GIMP_ITEM (object)));
} }
GIMP_CONTAINER_CLASS (parent_class)->remove (container, object); GIMP_CONTAINER_CLASS (parent_class)->remove (container, object);
...@@ -185,7 +185,7 @@ gimp_drawable_stack_get_graph (GimpDrawableStack *stack) ...@@ -185,7 +185,7 @@ gimp_drawable_stack_get_graph (GimpDrawableStack *stack)
for (list = reverse_list; list; list = g_list_next (list)) for (list = reverse_list; list; list = g_list_next (list))
{ {
GimpDrawable *drawable = list->data; GimpDrawable *drawable = list->data;
GeglNode *node = gimp_drawable_get_node (drawable); GeglNode *node = gimp_item_get_node (GIMP_ITEM (drawable));
gegl_node_add_child (stack->graph, node); gegl_node_add_child (stack->graph, node);
...@@ -219,7 +219,7 @@ gimp_drawable_stack_add_node (GimpDrawableStack *stack, ...@@ -219,7 +219,7 @@ gimp_drawable_stack_add_node (GimpDrawableStack *stack,
GeglNode *node; GeglNode *node;
gint index; gint index;
node = gimp_drawable_get_node (drawable); node = gimp_item_get_node (GIMP_ITEM (drawable));
index = gimp_container_get_child_index (GIMP_CONTAINER (stack), index = gimp_container_get_child_index (GIMP_CONTAINER (stack),
GIMP_OBJECT (drawable)); GIMP_OBJECT (drawable));
...@@ -235,7 +235,7 @@ gimp_drawable_stack_add_node (GimpDrawableStack *stack, ...@@ -235,7 +235,7 @@ gimp_drawable_stack_add_node (GimpDrawableStack *stack,
drawable_above = (GimpDrawable *) drawable_above = (GimpDrawable *)
gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1); gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1);
node_above = gimp_drawable_get_node (drawable_above); node_above = gimp_item_get_node (GIMP_ITEM (drawable_above));
} }
gegl_node_connect_to (node, "output", gegl_node_connect_to (node, "output",
...@@ -246,7 +246,7 @@ gimp_drawable_stack_add_node (GimpDrawableStack *stack, ...@@ -246,7 +246,7 @@ gimp_drawable_stack_add_node (GimpDrawableStack *stack,
if (drawable_below) if (drawable_below)
{ {
GeglNode *node_below = gimp_drawable_get_node (drawable_below); GeglNode *node_below = gimp_item_get_node (GIMP_ITEM (drawable_below));
gegl_node_connect_to (node_below, "output", gegl_node_connect_to (node_below, "output",
node, "input"); node, "input");
...@@ -262,7 +262,7 @@ gimp_drawable_stack_remove_node (GimpDrawableStack *stack, ...@@ -262,7 +262,7 @@ gimp_drawable_stack_remove_node (GimpDrawableStack *stack,
GeglNode *node; GeglNode *node;
gint index; gint index;
node = gimp_drawable_get_node (drawable); node = gimp_item_get_node (GIMP_ITEM (drawable));
index = gimp_container_get_child_index (GIMP_CONTAINER (stack), index = gimp_container_get_child_index (GIMP_CONTAINER (stack),
GIMP_OBJECT (drawable)); GIMP_OBJECT (drawable));
...@@ -278,7 +278,7 @@ gimp_drawable_stack_remove_node (GimpDrawableStack *stack, ...@@ -278,7 +278,7 @@ gimp_drawable_stack_remove_node (GimpDrawableStack *stack,
drawable_above = (GimpDrawable *) drawable_above = (GimpDrawable *)
gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1); gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1);
node_above = gimp_drawable_get_node (drawable_above); node_above = gimp_item_get_node (GIMP_ITEM (drawable_above));
} }
drawable_below = (GimpDrawable *) drawable_below = (GimpDrawable *)
...@@ -286,7 +286,7 @@ gimp_drawable_stack_remove_node (GimpDrawableStack *stack, ...@@ -286,7 +286,7 @@ gimp_drawable_stack_remove_node (GimpDrawableStack *stack,
if (drawable_below) if (drawable_below)
{ {
GeglNode *node_below = gimp_drawable_get_node (drawable_below); GeglNode *node_below = gimp_item_get_node (GIMP_ITEM (drawable_below));
gegl_node_disconnect (node, "input"); gegl_node_disconnect (node, "input");
gegl_node_connect_to (node_below, "output", gegl_node_connect_to (node_below, "output",
......
...@@ -77,6 +77,9 @@ static void gimp_item_finalize (GObject *object); ...@@ -77,6 +77,9 @@ static void gimp_item_finalize (GObject *object);
static gint64 gimp_item_get_memsize (GimpObject *object, static gint64 gimp_item_get_memsize (GimpObject *object,
gint64 *gui_size); gint64 *gui_size);
static void gimp_item_real_visibility_changed
(GimpItem *item);
static GimpItem * gimp_item_real_duplicate (GimpItem *item, static GimpItem * gimp_item_real_duplicate (GimpItem *item,
GType new_type); GType new_type);
static void gimp_item_real_convert (GimpItem *item, static void gimp_item_real_convert (GimpItem *item,
...@@ -102,6 +105,7 @@ static void gimp_item_real_resize (GimpItem *item, ...@@ -102,6 +105,7 @@ static void gimp_item_real_resize (GimpItem *item,
gint new_height, gint new_height,
gint offset_x, gint offset_x,
gint offset_y); gint offset_y);
static GeglNode * gimp_item_real_get_node (GimpItem *item);
G_DEFINE_TYPE (GimpItem, gimp_item, GIMP_TYPE_VIEWABLE) G_DEFINE_TYPE (GimpItem, gimp_item, GIMP_TYPE_VIEWABLE)
...@@ -155,7 +159,7 @@ gimp_item_class_init (GimpItemClass *klass) ...@@ -155,7 +159,7 @@ gimp_item_class_init (GimpItemClass *klass)
viewable_class->get_popup_size = gimp_item_get_popup_size; viewable_class->get_popup_size = gimp_item_get_popup_size;
klass->removed = NULL; klass->removed = NULL;
klass->visibility_changed = NULL; klass->visibility_changed = gimp_item_real_visibility_changed;
klass->linked_changed = NULL; klass->linked_changed = NULL;
klass->is_attached = NULL; klass->is_attached = NULL;
...@@ -169,6 +173,7 @@ gimp_item_class_init (GimpItemClass *klass) ...@@ -169,6 +173,7 @@ gimp_item_class_init (GimpItemClass *klass)
klass->rotate = NULL; klass->rotate = NULL;
klass->transform = NULL; klass->transform = NULL;
klass->stroke = NULL; klass->stroke = NULL;
klass->get_node = gimp_item_real_get_node;
klass->default_name = NULL; klass->default_name = NULL;
klass->rename_desc = NULL; klass->rename_desc = NULL;
...@@ -211,6 +216,7 @@ gimp_item_init (GimpItem *item) ...@@ -211,6 +216,7 @@ gimp_item_init (GimpItem *item)
item->visible = TRUE; item->visible = TRUE;
item->linked = FALSE; item->linked = FALSE;
item->removed = FALSE; item->removed = FALSE;
item->node = NULL;
} }
static void static void
...@@ -257,6 +263,12 @@ gimp_item_finalize (GObject *object) ...@@ -257,6 +263,12 @@ gimp_item_finalize (GObject *object)
{ {
GimpItem *item = GIMP_ITEM (object); GimpItem *item = GIMP_ITEM (object);
if (item->node)
{
g_object_unref (item->node);
item->node = NULL;
}
if (item->image && item->image->gimp) if (item->image && item->image->gimp)
{ {
g_hash_table_remove (item->image->gimp->item_table, g_hash_table_remove (item->image->gimp->item_table,
...@@ -286,6 +298,29 @@ gimp_item_get_memsize (GimpObject *object, ...@@ -286,6 +298,29 @@ gimp_item_get_memsize (GimpObject *object,
gui_size); gui_size);
} }
static void
gimp_item_real_visibility_changed (GimpItem *item)
{
if (! item->node)
return;
if (gimp_item_get_visible (item))
{
/* Leave this up to subclasses */
}
else
{
GeglNode *input;
GeglNode *output;
input = gegl_node_get_input_proxy (item->node, "input");
output = gegl_node_get_output_proxy (item->node, "output");
gegl_node_connect_to (input, "output",
output, "input");
}
}
static GimpItem * static GimpItem *
gimp_item_real_duplicate (GimpItem *item, gimp_item_real_duplicate (GimpItem *item,
GType new_type) GType new_type)
...@@ -410,6 +445,14 @@ gimp_item_real_resize (GimpItem *item, ...@@ -410,6 +445,14 @@ gimp_item_real_resize (GimpItem *item,
g_object_notify (G_OBJECT (item), "height"); g_object_notify (G_OBJECT (item), "height");
} }
static GeglNode *
gimp_item_real_get_node (GimpItem *item)
{
item->node = gegl_node_new ();
return item->node;
}
/** /**
* gimp_item_remove: * gimp_item_remove:
* @item: the #GimpItem to remove. * @item: the #GimpItem to remove.
...@@ -1049,6 +1092,17 @@ gimp_item_stroke (GimpItem *item, ...@@ -1049,6 +1092,17 @@ gimp_item_stroke (GimpItem *item,
return retval; return retval;
} }
GeglNode *
gimp_item_get_node (GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), NULL);
if (item->node)
return item->node;
return GIMP_ITEM_GET_CLASS (item)->get_node (item);
}
gint gint
gimp_item_get_ID (GimpItem *item) gimp_item_get_ID (GimpItem *item)
{ {
......
...@@ -51,6 +51,9 @@ struct _GimpItem ...@@ -51,6 +51,9 @@ struct _GimpItem
gboolean linked; /* control linkage */ gboolean linked; /* control linkage */
gboolean removed; /* removed from the image? */ gboolean removed; /* removed from the image? */
GeglNode *node; /* the GEGL node to plug
into the graph */
}; };
struct _GimpItemClass struct _GimpItemClass
...@@ -114,6 +117,8 @@ struct _GimpItemClass ...@@ -114,6 +117,8 @@ struct _GimpItemClass
gboolean push_undo, gboolean push_undo,
GimpProgress *progress, GimpProgress *progress,
GError **error); GError **error);
GeglNode * (* get_node) (GimpItem *item);
const gchar *default_name; const gchar *default_name;
const gchar *rename_desc; const gchar *rename_desc;
...@@ -220,6 +225,9 @@ gboolean gimp_item_stroke (GimpItem *item, ...@@ -220,6 +225,9 @@ gboolean gimp_item_stroke (GimpItem *item,