Commit 529a15c2 authored by Øyvind Kolås's avatar Øyvind Kolås

seperate main gegl headers in gegl.h and gegl-plugin.h

parent 9a8728cf
2006-09-26 Øyvind Kolås <pippin@gimp.org>
* gegl/gegl.h: Rewrote to only contain the public API of GEGL.
* gegl/gegl-plugin.h: new file for inclusion when a tight coupling
with GEGL is needed (plug-ins use a lot more API than host apps
embedding GEGL).
* gegl/Makefile.am: added gegl-plugin.h
Other files modified due to these changes.
* gegl/gegl-chant.h:
* gegl/gegl-graph.c: (gegl_graph_new_node),
(gegl_graph_create_node), (gegl_graph_input), (gegl_graph_output):
* gegl/gegl-graph.h:
* gegl/gegl-init.c: (gegl_exit):
* gegl/gegl-node.c: (gegl_node_get_depends_on),
(gegl_node_get_valist), (gegl_node_set_property),
(gegl_node_get_property):
* gegl/gegl-operation.c: (get_defined_region),
(calc_source_regions):
* gegl/gegl-xml.c: (start_element), (end_element), (gegl_to_xml):
* gegl/gegl.c: (main), (main_interactive):
* operations/file-io/load.c: (associate), (refresh_cache):
* operations/meta/dropshadow.c: (associate):
* operations/meta/layer.c: (associate), (refresh_cache):
* operations/meta/unsharp-mask.c: (associate):
* operations/transform/affine.c:
* operations/transform/chant.h:
* operations/transform/linear.c:
* operations/transform/linear.h:
* operations/transform/nearest.c:
* operations/transform/nearest.h:
* tools/introspect.c: (stuff):
* tools/operation_reference.c:
2006-09-26 Øyvind Kolås <pippin@gimp.org>
* gegl/gegl-graph.c: (dispose): removed dead code.
......
#include <glib.h>
#include <gegl.h>
#include <gegl/gegl-xml.h> /* needed to build in source dir, but exposed
through gegl.h in other places */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gegl-instrument.h"
#include <unistd.h>
#include "gegl-options.h"
......@@ -87,30 +86,17 @@ main (gint argc,
break;
case GEGL_RUN_MODE_PNG:
{
glong timing;
timing = gegl_ticks ();
GeglNode *output = gegl_graph_new_node (GEGL_GRAPH (gegl),
GeglNode *output = gegl_graph_new_node (gegl,
"operation", "png-save",
"path", o->output,
NULL);
if (o->stats)
g_print ("%s ", o->file);
gegl_node_connect (output, "input", gegl_graph_output (GEGL_GRAPH (gegl), "output"), "output");
gegl_node_connect (output, "input", gegl_graph_output (gegl, "output"), "output");
gegl_node_apply (output, "output");
timing = gegl_ticks()-timing;
if (o->stats)
g_print ("usecs: %li", timing);
g_object_unref (gegl);
g_free (o);
gegl_exit ();
if (gegl_buffer_leaks())
g_print (" buffer-leaks: %i", gegl_buffer_leaks ());
g_print ("\n");
}
break;
case GEGL_RUN_MODE_HELP:
......@@ -118,7 +104,6 @@ main (gint argc,
default:
break;
}
return 0;
}
......@@ -126,11 +111,11 @@ static gint
main_interactive (GeglNode *gegl,
GeglOptions *o)
{
GeglNode *output = gegl_graph_new_node (GEGL_GRAPH (gegl),
GeglNode *output = gegl_graph_new_node (gegl,
"operation", "display",
NULL);
gegl_node_connect (output, "input", gegl_graph_output (GEGL_GRAPH (gegl), "output"), "output");
gegl_node_connect (output, "input", gegl_graph_output (gegl, "output"), "output");
gegl_node_apply (output, "output");
sleep(o->delay);
return 0;
......
......@@ -95,7 +95,7 @@ gegl_LDFLAGS = \
libgeglincludedir = $(includedir)/gegl-$(GEGL_API_VERSION)
libgeglsubincludedir = $(includedir)/gegl-$(GEGL_API_VERSION)/gegl
libgeglinclude_HEADERS = gegl.h gegl-module.h gegl-chant.h
libgeglinclude_HEADERS = gegl.h gegl-module.h gegl-chant.h gegl-plugin.h
libgeglsubinclude_HEADERS = $(GEGL_public_headers)
......
......@@ -9,7 +9,7 @@
#include <string.h>
#include <glib-object.h>
#include <gegl.h>
#include <gegl-plugin.h>
#ifdef GEGL_CHANT_SOURCE
#include <gegl/gegl-operation-source.h>
......
......@@ -134,11 +134,11 @@ gegl_graph_get_children (GeglGraph *self)
* returns a freshly created node, owned by the graph, and thus freed with it
*/
GeglNode *
gegl_graph_new_node (GeglGraph *self,
gegl_graph_new_node (GeglNode *node,
const gchar *first_property_name,
...)
{
GeglNode *node;
GeglGraph *self = GEGL_GRAPH (node);
va_list var_args;
const gchar *name;
......@@ -156,7 +156,7 @@ gegl_graph_new_node (GeglGraph *self,
return node;
}
GeglNode * gegl_graph_create_node (GeglGraph *self,
GeglNode * gegl_graph_create_node (GeglNode *self,
const gchar *operation)
{
return gegl_graph_new_node (self, "operation", operation, NULL);
......@@ -196,15 +196,15 @@ gegl_graph_get_pad_proxy (GeglGraph *graph,
}
GeglNode *
gegl_graph_input (GeglGraph *graph,
gegl_graph_input (GeglNode *node,
const gchar *name)
{
return gegl_graph_get_pad_proxy (graph, name, TRUE);
return gegl_graph_get_pad_proxy (GEGL_GRAPH (node), name, TRUE);
}
GeglNode *
gegl_graph_output (GeglGraph *graph,
const gchar *name)
gegl_graph_output (GeglNode *node,
const gchar *name)
{
return gegl_graph_get_pad_proxy (graph, name, FALSE);
return gegl_graph_get_pad_proxy (GEGL_GRAPH (node), name, FALSE);
}
......@@ -61,14 +61,14 @@ GeglNode * gegl_graph_get_nth_child (GeglGraph *self,
GList * gegl_graph_get_children (GeglGraph *self);
void gegl_graph_remove_children (GeglGraph *self);
gint gegl_graph_get_num_children (GeglGraph *self);
GeglNode * gegl_graph_new_node (GeglGraph *self,
GeglNode * gegl_graph_new_node (GeglNode *self,
const gchar *first_property_name,
...);
GeglNode * gegl_graph_create_node (GeglGraph *self,
GeglNode * gegl_graph_create_node (GeglNode *self,
const gchar *operation);
GeglNode * gegl_graph_input (GeglGraph *graph,
GeglNode * gegl_graph_input (GeglNode *graph,
const gchar *name);
GeglNode * gegl_graph_output (GeglGraph *graph,
GeglNode * gegl_graph_output (GeglNode *graph,
const gchar *name);
G_END_DECLS
......
......@@ -101,4 +101,8 @@ gegl_exit (void)
{
printf ("\n%s", gegl_instrument_utf8 ());
}
if (gegl_buffer_leaks())
g_print (" buffer-leaks: %i", gegl_buffer_leaks ());
g_print ("\n");
}
......@@ -679,7 +679,7 @@ gegl_node_get_depends_on (GeglNode *self)
if (source_node->is_graph)
{
GeglNode *proxy = gegl_graph_output (GEGL_GRAPH (source_node), "output");
GeglNode *proxy = gegl_graph_output (source_node, "output");
if (! g_list_find (depends_on, proxy))
depends_on = g_list_append (depends_on, proxy);
......@@ -1024,10 +1024,9 @@ gegl_node_get_valist (GeglNode *self,
{
if (self->is_graph)
{
GeglGraph *graph = GEGL_GRAPH (self);
pspec = g_object_class_find_property (
G_OBJECT_GET_CLASS (G_OBJECT (
gegl_graph_output (graph, "output")->operation)), property_name);
pspec = g_object_class_find_property (
G_OBJECT_GET_CLASS (G_OBJECT (
gegl_graph_output (self, "output")->operation)), property_name);
if (!pspec)
{
pspec = g_object_class_find_property (
......@@ -1097,7 +1096,7 @@ gegl_node_set_property (GeglNode *self,
{
g_warning ("set_property for graph,. hmm");
/* FIXME: should this really be "input")? is_graph doesn't seem to be used,.. */
g_object_set_property (G_OBJECT (gegl_graph_input (GEGL_GRAPH (self), "input")->operation),
g_object_set_property (G_OBJECT (gegl_graph_input (self, "input")->operation),
property_name, value);
}
else
......@@ -1128,7 +1127,7 @@ gegl_node_get_property (GeglNode *self,
if (self->is_graph &&
!strcmp (property_name, "output"))
{
g_object_get_property (G_OBJECT (gegl_graph_output (GEGL_GRAPH (self), "output")->operation),
g_object_get_property (G_OBJECT (gegl_graph_output (self, "output")->operation),
property_name, value);
}
else
......
......@@ -280,7 +280,7 @@ get_defined_region (GeglOperation *self)
GeglRect rect = {0,0,0,0};
if (self->node->is_graph)
{
return gegl_operation_get_defined_region (gegl_graph_output (GEGL_GRAPH (self->node), "output")->operation);
return gegl_operation_get_defined_region (gegl_graph_output (self->node, "output")->operation);
}
g_warning ("Op '%s' has no proper have_rect function",
G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS(self)));
......@@ -292,7 +292,7 @@ calc_source_regions (GeglOperation *self)
{
if (self->node->is_graph)
{
return gegl_operation_calc_source_regions (gegl_graph_output (GEGL_GRAPH (self->node), "output")->operation);
return gegl_operation_calc_source_regions (gegl_graph_output (self->node, "output")->operation);
}
g_warning ("Op '%s' has no proper need_rect function",
G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS(self)));
......
/* This file is part of GEGL
*
* GEGL is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* GEGL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* Copyright 2003 Calvin Williamson
*/
#ifndef __GEGL_PLUGIN_H__
#define __GEGL_PLUGIN_H__
#include <glib-object.h>
#include <gegl/gegl-types.h>
#include <gegl/gegl-color.h>
#include <gegl/gegl-connection.h>
#include <gegl/gegl-graph.h>
#include <gegl/gegl-init.h>
#include <gegl/gegl-node.h>
#include <gegl/gegl-object.h>
#include <gegl/gegl-operation.h>
#include <gegl/gegl-pad.h>
#include <gegl/gegl-utils.h>
#include <gegl/gegl-visitable.h>
#include <gegl/gegl-visitor.h>
#include <gegl/buffer/gegl-buffer.h>
#include <gegl/gegl-xml.h>
#define GEGL_INTERNAL /* to avoid conflicts, when we include gegl.h just
to get warnings about conflicts in the prototypes
of functions. */
#include <gegl.h>
#endif /* __GEGL_H__ */
......@@ -41,7 +41,7 @@ enum {
struct _ParseData {
gint state;
GeglGraph *gegl;
GeglNode *gegl;
GeglNode *iter; /*< the iterator we're either connecting to input|aux of
depending on context */
GList *parent; /*< a stack of parents, as we are recursing into aux
......@@ -98,7 +98,7 @@ static void start_element (GMarkupParseContext *context,
GeglNode *new = g_object_new (GEGL_TYPE_NODE, NULL);
if (pd->gegl == NULL)
{
pd->gegl = GEGL_GRAPH (new);
pd->gegl = new;
}
else
{
......@@ -106,10 +106,10 @@ static void start_element (GMarkupParseContext *context,
pd->state=STATE_TREE_NORMAL;
pd->parent = g_list_prepend (pd->parent, new);
gegl_graph_output (GEGL_GRAPH (new), "output"); /* creates the pad if it doesn't exist */
gegl_graph_output (new, "output"); /* creates the pad if it doesn't exist */
if (pd->iter)
gegl_node_connect (pd->iter, "input", new, "output");
pd->iter = gegl_graph_output (GEGL_GRAPH (new), "output");
pd->iter = gegl_graph_output (new, "output");
}
else if (!strcmp (element_name, "graph"))
{
......@@ -246,8 +246,8 @@ static void end_element (GMarkupParseContext *context,
if (gegl_node_get_pad (pd->iter, "input"))
{
gegl_node_connect (pd->iter, "input",
gegl_graph_input (GEGL_GRAPH (pd->parent->data), "input"), "output");
pd->iter = gegl_graph_input (GEGL_GRAPH (pd->parent->data), "input");
gegl_graph_input (GEGL_NODE (pd->parent->data), "input"), "output");
pd->iter = gegl_graph_input (GEGL_NODE (pd->parent->data), "input");
}
else
{
......@@ -590,7 +590,7 @@ gegl_to_xml (GeglNode *gegl)
ss->clones = g_hash_table_new (NULL, NULL);
ss->terse = TRUE;
gegl = gegl_graph_output (GEGL_GRAPH (gegl), "output");
gegl = gegl_graph_output (gegl, "output");
g_string_append (ss->buf, "<?xml version='1.0' encoding='UTF-8'?>\n");
g_string_append (ss->buf, "<gegl>\n");
......
#include <glib.h>
#include <gegl.h>
#include <gegl/gegl-xml.h> /* needed to build in source dir, but exposed
through gegl.h in other places */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gegl-instrument.h"
#include <unistd.h>
#include "gegl-options.h"
......@@ -87,30 +86,17 @@ main (gint argc,
break;
case GEGL_RUN_MODE_PNG:
{
glong timing;
timing = gegl_ticks ();
GeglNode *output = gegl_graph_new_node (GEGL_GRAPH (gegl),
GeglNode *output = gegl_graph_new_node (gegl,
"operation", "png-save",
"path", o->output,
NULL);
if (o->stats)
g_print ("%s ", o->file);
gegl_node_connect (output, "input", gegl_graph_output (GEGL_GRAPH (gegl), "output"), "output");
gegl_node_connect (output, "input", gegl_graph_output (gegl, "output"), "output");
gegl_node_apply (output, "output");
timing = gegl_ticks()-timing;
if (o->stats)
g_print ("usecs: %li", timing);
g_object_unref (gegl);
g_free (o);
gegl_exit ();
if (gegl_buffer_leaks())
g_print (" buffer-leaks: %i", gegl_buffer_leaks ());
g_print ("\n");
}
break;
case GEGL_RUN_MODE_HELP:
......@@ -118,7 +104,6 @@ main (gint argc,
default:
break;
}
return 0;
}
......@@ -126,11 +111,11 @@ static gint
main_interactive (GeglNode *gegl,
GeglOptions *o)
{
GeglNode *output = gegl_graph_new_node (GEGL_GRAPH (gegl),
GeglNode *output = gegl_graph_new_node (gegl,
"operation", "display",
NULL);
gegl_node_connect (output, "input", gegl_graph_output (GEGL_GRAPH (gegl), "output"), "output");
gegl_node_connect (output, "input", gegl_graph_output (gegl, "output"), "output");
gegl_node_apply (output, "output");
sleep(o->delay);
return 0;
......
......@@ -16,6 +16,7 @@
* Boston, MA 02110-1301, USA.
*
* Copyright 2003 Calvin Williamson
* 2006 Øyvind Kolås
*/
#ifndef __GEGL_H__
......@@ -23,20 +24,98 @@
#include <glib-object.h>
#include <gegl/gegl-types.h>
#include <gegl/gegl-color.h>
#include <gegl/gegl-connection.h>
#include <gegl/gegl-graph.h>
#include <gegl/gegl-init.h>
#include <gegl/gegl-node.h>
#include <gegl/gegl-object.h>
#include <gegl/gegl-operation.h>
#include <gegl/gegl-pad.h>
#include <gegl/gegl-utils.h>
#include <gegl/gegl-visitable.h>
#include <gegl/gegl-visitor.h>
#include <gegl/buffer/gegl-buffer.h>
#include <gegl/gegl-xml.h>
#ifndef GEGL_INTERNAL
typedef struct _GeglNode GeglNode;
typedef struct _GeglRect GeglRect;
struct _GeglRect
{
gint x;
gint y;
gint w;
gint h;
};
#endif
/* Initialize the GEGL library, options are passed on to glib */
void gegl_init (gint *argc,
gchar ***argv);
/* Clean up the gegl library after use (global caches etc.) */
void gegl_exit (void);
/* create a new node belonging to a graph */
GeglNode * gegl_graph_create_node (GeglNode *graph,
const gchar *operation);
/* create a new node belonging to a graph, with key/value pairs for properties,
* terminated by NULL (remember to set "operation") */
GeglNode * gegl_graph_new_node (GeglNode *graph,
const gchar *first_property_name,
...);
/* connect the output pad of a different node to this nodes input pad,
* pads specified by names ("input","aux" and "output" are the names
* currently in use
*/
gboolean gegl_node_connect (GeglNode *self,
const gchar *input_pad_name,
GeglNode *source,
const gchar *output_pad_name);
/* syntetic sugar for linking two nodes "output"->"input" */
void gegl_node_link (GeglNode *source,
GeglNode *sink);
/* syntetic sugar for linking multiple nodes, end with NULL*/
void gegl_node_link_many (GeglNode *source,
GeglNode *dest,
...);
/* set properties on the node, a NULL terminated key/value list, similar
* to gobject
*/
void gegl_node_set (GeglNode *self,
const gchar *first_property_name,
...);
/* Get properties from a node, a NULL terminated key/value list, similar
* to gobject.
*/
void gegl_node_get (GeglNode *self,
const gchar *first_property_name,
...);
/* Render the "output" buffer resulting from a node to an external buffer.
* rowstride of 0 indicates default rowstride. You have to make sure the
* buffer is large enough yourself.
*/
void gegl_node_blit_buf (GeglNode *self,
GeglRect *roi,
void *format,
gint rowstride,
gpointer *destination_buf);
/*
* Causes a evaluation to happen (this function will be deprecated)
*/
void gegl_node_apply (GeglNode *self,
const gchar *output_pad_name);
/* aquire the attached ghost output pad of a Graph node,
* create it if it does not exist */
GeglNode * gegl_graph_output (GeglNode *graph,
const gchar *name);
/* aquire the attached ghost input pad of a Graph node,
* create it if it does not exist */
GeglNode * gegl_graph_input (GeglNode *graph,
const gchar *name);
/* create a geglgraph from parsed XML data */
GeglNode * gegl_xml_parse (const gchar *xmldata);
/* Serialize a GEGL graph to XML, the resulting data must
* be freed. */
gchar * gegl_to_xml (GeglNode *gegl);
#endif /* __GEGL_H__ */
......@@ -148,18 +148,16 @@ static void associate (GeglOperation *operation)
{
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
Priv *priv = (Priv*)self->priv;
GeglGraph *graph;
g_assert (priv == NULL);
priv = g_malloc0 (sizeof (Priv));
self->priv = (void*) priv;
priv->self = GEGL_OPERATION (self)->node;
graph = GEGL_GRAPH (priv->self);
priv->output = gegl_graph_output (graph, "output");
priv->output = gegl_graph_output (priv->self, "output");
priv->load = gegl_graph_new_node (graph,
priv->load = gegl_graph_new_node (priv->self,
"operation", "text",
"string", "foo",
NULL);
......@@ -186,7 +184,7 @@ refresh_cache (GeglChantOperation *self)
((priv->cached_path && self->path) &&
strcmp (self->path, priv->cached_path)))
{
GeglGraph *gegl;
GeglNode *gegl;
GeglNode *load;
if (priv->cached_buffer)
......@@ -196,7 +194,7 @@ refresh_cache (GeglChantOperation *self)
g_free (priv->cached_path);
}
gegl = g_object_new (GEGL_TYPE_GRAPH, NULL);
gegl = g_object_new (GEGL_TYPE_NODE, NULL);
load = gegl_graph_new_node (gegl, "operation", "load",
"cache", FALSE,
"path", self->path,
......
......@@ -76,25 +76,24 @@ static void associate (GeglOperation *operation)
{
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
Priv *priv = (Priv*)self->priv;
GeglGraph *graph;
GeglNode *gegl;
g_assert (priv == NULL);
priv = g_malloc0 (sizeof (Priv));
self->priv = (void*) priv;
priv->self = GEGL_OPERATION (self)->node;
graph = GEGL_GRAPH (priv->self);
priv->input = gegl_graph_input (graph, "input");
priv->output = gegl_graph_output (graph, "output");
gegl = priv->self;
priv->input = gegl_graph_input (gegl, "input");
priv->output = gegl_graph_output (gegl, "output");
if (!priv->over)
{
GeglGraph *graph = GEGL_GRAPH (priv->self);
priv->over = gegl_graph_new_node (graph, "operation", "over", NULL);
priv->translate = gegl_graph_new_node (graph, "operation", "translate", NULL);
priv->opacity = gegl_graph_new_node (graph, "operation", "opacity", NULL);
priv->blur = gegl_graph_new_node (graph, "operation", "gaussian-blur", NULL);
priv->darken = gegl_graph_new_node (graph, "operation", "brightness-contrast", "brightness", -0.9, NULL);
priv->over = gegl_graph_new_node (gegl, "operation", "over", NULL);
priv->translate = gegl_graph_new_node (gegl, "operation", "translate", NULL);
priv->opacity = gegl_graph_new_node (gegl, "operation", "opacity", NULL);
priv->blur = gegl_graph_new_node (gegl, "operation", "gaussian-blur", NULL);
priv->darken = gegl_graph_new_node (gegl, "operation", "brightness-contrast", "brightness", -0.9, NULL);
gegl_node_connect (priv->darken, "input", priv->input, "output");
gegl_node_connect (priv->blur, "input", priv->darken, "output");
......
......@@ -94,29 +94,29 @@ static void associate (GeglOperation *operation)
{
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
Priv *priv = (Priv*)self->priv;
GeglGraph *graph;
GeglNode *gegl;
g_assert (priv == NULL);
priv = g_malloc0 (sizeof (Priv));
self->priv = (void*) priv;
priv->self = GEGL_OPERATION (self)->node;
graph = GEGL_GRAPH (priv->self);
gegl = priv->self;
priv->input = gegl_graph_input (graph, "input");
priv->aux = gegl_graph_input (graph, "aux");
priv->output = gegl_graph_output (graph, "output");
priv->input = gegl_graph_input (gegl, "input");
priv->aux = gegl_graph_input (gegl, "aux");
priv->output = gegl_graph_output (gegl, "output");
priv->composite_op = gegl_graph_new_node (graph,
priv->composite_op = gegl_graph_new_node (gegl,
"operation", self->composite_op,
NULL);
priv->shift = gegl_graph_new_node (graph, "operation", "shift", NULL);
priv->opacity = gegl_graph_new_node (graph, "operation", "opacity", NULL);
priv->shift = gegl_graph_new_node (gegl, "operation", "shift", NULL);
priv->opacity = gegl_graph_new_node (gegl, "operation", "opacity", NULL);
priv->load = gegl_graph_new_node (graph,
"operation", "buffer",
NULL);
priv->load = gegl_graph_new_node (gegl,
"operation", "buffer",
NULL);
gegl_node_connect (priv->opacity, "input", priv->load, "output");
gegl_node_connect (priv->shift, "input", priv->opacity, "output");
......@@ -175,8 +175,8 @@ refresh_cache (GeglChantOperation *self)
((priv->cached_path && self->src) &&
strcmp (self->src, priv->cached_path)))
{
GeglGraph *gegl;
GeglNode *load;
GeglNode *gegl;
GeglNode *load;
if (priv->cached_buffer)
{
......@@ -185,7 +185,7 @@ refresh_cache (GeglChantOperation *self)
g_free (priv->cached_path);
}
gegl = g_object_new (GEGL_TYPE_GRAPH, NULL);
gegl = g_object_new (GEGL_TYPE_NODE, NULL);
load = gegl_graph_new_node (gegl, "operation", "load",
"cache", FALSE,
"path", self->src,
......
......@@ -50,35 +50,35 @@ static void associate (GeglOperation *operation)
{
GeglChantOperation *self;
Priv *priv;
GeglGraph *graph;
GeglNode *gegl;
self = GEGL_CHANT_OPERATION (operation);
priv = g_malloc0 (sizeof (Priv));
self->priv = (void*) priv;
graph = GEGL_GRAPH (operation->node);
gegl = operation->node;
/* aquire interior nodes representing the graphs pads */
priv->input = gegl_graph_input (graph, "input");
priv->output = gegl_graph_output (graph, "output");
priv->input = gegl_graph_input (gegl, "input");
priv->output = gegl_graph_output (gegl, "output");
if (!priv->add)
{
priv->add = gegl_graph_new_node (graph,
"operation", "add",
NULL);
priv->add = gegl_graph_new_node (gegl,
"operation", "add",
NULL);
priv->multiply = gegl_graph_new_node (graph,
"operation", "multiply",
NULL);
priv->multiply = gegl_graph_new_node (gegl,
"operation", "multiply",
NULL);
priv->subtract = gegl_graph_new_node (graph,
"operation", "subtract",
NULL);
priv->subtract = gegl_graph_new_node (gegl,
"operation", "subtract",
NULL);
priv->blur = gegl_graph_new_node (graph,
"operation", "gaussian-blur",
NULL);
priv->blur = gegl_graph_new_node (gegl,
"operation", "gaussian-blur",
NULL);
gegl_node_connect (priv->subtract, "input", priv->input, "output");
gegl_node_connect (priv->blur, "input", priv->input, "output");
......
......@@ -25,7 +25,7 @@
#include <string.h>
#include <math.h>
#include <gegl.h>
#include <gegl-plugin.h>
#include <gegl-module.h>
#include "affine.h"
......