|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<HTML>
|
|
Packit |
bc1512 |
<HEAD>
|
|
Packit |
bc1512 |
<TITLE>Enscript Output</TITLE>
|
|
Packit |
bc1512 |
</HEAD>
|
|
Packit |
bc1512 |
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD">
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
../gegl/gegl.h
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/* This file is the public GEGL API
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* GEGL is free software; you can redistribute it and/or
|
|
Packit |
bc1512 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
bc1512 |
* License as published by the Free Software Foundation; either
|
|
Packit |
bc1512 |
* version 3 of the License, or (at your option) any later version.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* GEGL is distributed in the hope that it will be useful,
|
|
Packit |
bc1512 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
bc1512 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
bc1512 |
* Lesser General Public License for more details.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
bc1512 |
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* 2000-2008 © Calvin Williamson, Øyvind Kolås.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">ifndef</FONT> <FONT COLOR="#B8860B">__GEGL_H__</FONT>
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#B8860B">__GEGL_H__</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><glib-object.h></FONT>
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><babl/babl.h></FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><gegl-types.h></FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><gegl-buffer.h></FONT>
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><gegl-color.h></FONT>
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><gegl-curve.h></FONT>
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><gegl-path.h></FONT>
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><gegl-matrix.h></FONT>
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><gegl-version.h></FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* The GEGL API:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* This document is both a tutorial and a reference for the C API of GEGL.
|
|
Packit |
bc1512 |
* The concepts covered in this reference should also be applicable when
|
|
Packit |
bc1512 |
* using other languages.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* The core API of GEGL isn't frozen yet and feedback regarding its use as
|
|
Packit |
bc1512 |
* well as the clarity of this documentation is most welcome.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
G_BEGIN_DECLS
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Introduction:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Algorithms created with GEGL are expressed as graphs of nodes. The nodes
|
|
Packit |
bc1512 |
* have associated image processing operations. A node has output and input
|
|
Packit |
bc1512 |
* pads which can be connected. By connecting these nodes in chains a set of
|
|
Packit |
bc1512 |
* image operation filters and combinators can be applied to the image data.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* To make GEGL process data you request a rectangular region of a node's
|
|
Packit |
bc1512 |
* output pad to be rendered into a provided linear buffer of any (supported
|
|
Packit |
bc1512 |
* by babl) pixel format. GEGL uses information provided by the nodes to
|
|
Packit |
bc1512 |
* determine the smallest buffers needed at each stage of processing.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Initialization:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Before GEGL can be used the engine should be initialized by either calling
|
|
Packit |
bc1512 |
* #gegl_init or through the use of #gegl_get_option_group. To shut down the
|
|
Packit |
bc1512 |
* GEGL engine call #gegl_exit.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* ---Code sample:
|
|
Packit |
bc1512 |
* #include <gegl.h>
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* int main(int argc, char **argv)
|
|
Packit |
bc1512 |
* {
|
|
Packit |
bc1512 |
* gegl_init (&argc, &argv);
|
|
Packit |
bc1512 |
* # other GEGL code
|
|
Packit |
bc1512 |
* gegl_exit ();
|
|
Packit |
bc1512 |
* }
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_init:
|
|
Packit |
bc1512 |
* @argc: a pointer to the number of command line arguments.
|
|
Packit |
bc1512 |
* @argv: a pointer to the array of command line arguments.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Call this function before using any other GEGL functions. It will
|
|
Packit |
bc1512 |
* initialize everything needed to operate GEGL and parses some
|
|
Packit |
bc1512 |
* standard command line options. @argc and @argv are adjusted
|
|
Packit |
bc1512 |
* accordingly so your own code will never see those standard
|
|
Packit |
bc1512 |
* arguments. gegl_init() will call g_thread_init(), unless you, or
|
|
Packit |
bc1512 |
* some other code already has initialized gthread.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Note that there is an alternative way to initialize GEGL: if you
|
|
Packit |
bc1512 |
* are calling g_option_context_parse() with the option group returned
|
|
Packit |
bc1512 |
* by #gegl_get_option_group(), you don't have to call #gegl_init() but
|
|
Packit |
bc1512 |
* you have to call g_thread_init() before any glib or glib dependant code
|
|
Packit |
bc1512 |
* yourself.
|
|
Packit |
bc1512 |
**/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_init</FONT> (gint *argc,
|
|
Packit |
bc1512 |
gchar ***argv);
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_get_option_group:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns a GOptionGroup for the commandline arguments recognized
|
|
Packit |
bc1512 |
* by GEGL. You should add this group to your GOptionContext
|
|
Packit |
bc1512 |
* with g_option_context_add_group() if you are using
|
|
Packit |
bc1512 |
* g_option_context_parse() to parse your commandline arguments.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GOptionGroup * <FONT COLOR="#0000FF">gegl_get_option_group</FONT> (<FONT COLOR="#228B22">void</FONT>);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_exit:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Call this function when you're done using GEGL. It will clean up
|
|
Packit |
bc1512 |
* caches and write/dump debug information if the correct debug flags
|
|
Packit |
bc1512 |
* are set.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_exit</FONT> (<FONT COLOR="#228B22">void</FONT>);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Available operations:
|
|
Packit |
bc1512 |
* Gegl provides means to check for available processing operations that
|
|
Packit |
bc1512 |
* can be used with nodes using #gegl_list_operations and for a specified
|
|
Packit |
bc1512 |
* op give a list of properties with #gegl_operation_list_properties.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_list_operations:
|
|
Packit |
bc1512 |
* @n_operations_p: return location for number of operations.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer container): An alphabetically sorted array of available operation names. The
|
|
Packit |
bc1512 |
* list should be freed with g_free after use.
|
|
Packit |
bc1512 |
* ---
|
|
Packit |
bc1512 |
* gchar **operations;
|
|
Packit |
bc1512 |
* guint n_operations;
|
|
Packit |
bc1512 |
* gint i;
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* operations = gegl_list_operations (&n_operations);
|
|
Packit |
bc1512 |
* g_print ("Available operations:\n");
|
|
Packit |
bc1512 |
* for (i=0; i < n_operations; i++)
|
|
Packit |
bc1512 |
* {
|
|
Packit |
bc1512 |
* g_print ("\t%s\n", operations[i]);
|
|
Packit |
bc1512 |
* }
|
|
Packit |
bc1512 |
* g_free (operations);
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
gchar **<FONT COLOR="#0000FF">gegl_list_operations</FONT> (guint *n_operations_p);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_operation_list_properties:
|
|
Packit |
bc1512 |
* @operation_type: the name of the operation type we want to query to properties of.
|
|
Packit |
bc1512 |
* @n_properties_p: return location for number of properties.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer container): An allocated array of #GParamSpecs describing the properties
|
|
Packit |
bc1512 |
* of the operation available when a node has operation_type set.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GParamSpec** <FONT COLOR="#0000FF">gegl_operation_list_properties</FONT> (<FONT COLOR="#228B22">const</FONT> gchar *operation_type,
|
|
Packit |
bc1512 |
guint *n_properties_p);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* GeglNode:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* The Node is the image processing primitive connected to create compositions
|
|
Packit |
bc1512 |
* in GEGL. The toplevel #GeglNode which contains a graph of #GeglNodes is
|
|
Packit |
bc1512 |
* created with #gegl_node_new. Using this toplevel node we can create children
|
|
Packit |
bc1512 |
* of this node which are individual processing elements using #gegl_node_new_child
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* A node either has an associated operation or is a parent for other nodes,
|
|
Packit |
bc1512 |
* that are connected to their parent through proxies created with
|
|
Packit |
bc1512 |
* #gegl_node_get_input_proxy and #gegl_node_get_output_proxy.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* The properties available on a node depends on which <a
|
|
Packit |
bc1512 |
* href='operations.html'>operation</a> is specified.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* ---
|
|
Packit |
bc1512 |
* GeglNode *gegl, *load, *bcontrast;
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* gegl = gegl_node_new ();
|
|
Packit |
bc1512 |
* load = gegl_node_new_child (gegl,
|
|
Packit |
bc1512 |
* "operation", "load",
|
|
Packit |
bc1512 |
* "path", "input.png",
|
|
Packit |
bc1512 |
* NULL);
|
|
Packit |
bc1512 |
* bcontrast = gegl_node_new_child (gegl,
|
|
Packit |
bc1512 |
* "operation", "brightness-contrast",
|
|
Packit |
bc1512 |
* "brightness", 0.2,
|
|
Packit |
bc1512 |
* "contrast", 1.5,
|
|
Packit |
bc1512 |
* NULL);
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_new:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Create a new graph that can contain further processing nodes.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer full): A new top level #GeglNode (which can be used as a graph). When you
|
|
Packit |
bc1512 |
* are done using this graph instance it should be unreferenced with g_object_unref.
|
|
Packit |
bc1512 |
* This will also free any sub nodes created from this node.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_new</FONT> (<FONT COLOR="#228B22">void</FONT>);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_new_child:
|
|
Packit |
bc1512 |
* @parent: a #GeglNode
|
|
Packit |
bc1512 |
* @first_property_name: the first property name
|
|
Packit |
bc1512 |
* @...: first property value, optionally followed by more key/value pairs, ended
|
|
Packit |
bc1512 |
* terminated with NULL.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Creates a new processing node that performs the specified operation with
|
|
Packit |
bc1512 |
* a NULL terminated list of key/value pairs for initial parameter values
|
|
Packit |
bc1512 |
* configuring the operation. Usually the first pair should be "operation"
|
|
Packit |
bc1512 |
* and the type of operation to be associated. If no operation is provided
|
|
Packit |
bc1512 |
* the node doesn't have an initial operation and can be used to construct
|
|
Packit |
bc1512 |
* a subgraph with special middle-man routing nodes created with
|
|
Packit |
bc1512 |
* #gegl_node_get_output_proxy and #gegl_node_get_input_proxy.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer none): A newly created #GeglNode. The node will be destroyed by the parent.
|
|
Packit |
bc1512 |
* Calling g_object_unref on a node will cause the node to be dropped by the
|
|
Packit |
bc1512 |
* parent. (You may also add additional references using
|
|
Packit |
bc1512 |
* g_object_ref/g_object_unref, but in general relying on the parents reference
|
|
Packit |
bc1512 |
* counting is easiest.)
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_new_child</FONT> (GeglNode *parent,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *first_property_name,
|
|
Packit |
bc1512 |
...) G_GNUC_NULL_TERMINATED;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Making connections:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Nodes in GEGL are connected to each other. The resulting graph of nodes
|
|
Packit |
bc1512 |
* represents the image processing pipeline to be processed.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* ---
|
|
Packit |
bc1512 |
* gegl_node_link_many (background, over, png_save, NULL);
|
|
Packit |
bc1512 |
* gegl_node_connect_to (translate, "output", over, "aux");
|
|
Packit |
bc1512 |
* gegl_node_link_many (text, blur, translate, NULL);
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_connect_from:
|
|
Packit |
bc1512 |
* @sink: the node we're connecting an input to
|
|
Packit |
bc1512 |
* @input_pad_name: the name of the input pad we are connecting to
|
|
Packit |
bc1512 |
* @source: the node producing data we want to connect.
|
|
Packit |
bc1512 |
* @output_pad_name: the output pad we want to use on the source.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Makes a connection between the pads of two nodes.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns TRUE if the connection was succesfully made.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
gboolean <FONT COLOR="#0000FF">gegl_node_connect_from</FONT> (GeglNode *sink,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *input_pad_name,
|
|
Packit |
bc1512 |
GeglNode *source,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *output_pad_name);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_connect_to:
|
|
Packit |
bc1512 |
* @source: the node producing data we want to connect.
|
|
Packit |
bc1512 |
* @output_pad_name: the output pad we want to use on the source.
|
|
Packit |
bc1512 |
* @sink: the node we're connecting an input to
|
|
Packit |
bc1512 |
* @input_pad_name: the name of the input pad we are connecting to
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Makes a connection between the pads of two nodes.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns TRUE if the connection was succesfully made.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
gboolean <FONT COLOR="#0000FF">gegl_node_connect_to</FONT> (GeglNode *source,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *output_pad_name,
|
|
Packit |
bc1512 |
GeglNode *sink,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *input_pad_name);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_link:
|
|
Packit |
bc1512 |
* @source: the producer of data.
|
|
Packit |
bc1512 |
* @sink: the consumer of data.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Synthetic sugar for linking the "output" pad of @source to the "input"
|
|
Packit |
bc1512 |
* pad of @sink.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_link</FONT> (GeglNode *source,
|
|
Packit |
bc1512 |
GeglNode *sink);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_link_many:
|
|
Packit |
bc1512 |
* @source: the producer of data.
|
|
Packit |
bc1512 |
* @first_sink: the first consumer of data.
|
|
Packit |
bc1512 |
* @...: NULL, or optionally more consumers followed by NULL.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Synthetic sugar for linking a chain of nodes with "input"->"output". The
|
|
Packit |
bc1512 |
* list is NULL terminated.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_link_many</FONT> (GeglNode *source,
|
|
Packit |
bc1512 |
GeglNode *first_sink,
|
|
Packit |
bc1512 |
...) G_GNUC_NULL_TERMINATED;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_disconnect:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @input_pad: the input pad to disconnect.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Disconnects node connected to @input_pad of @node (if any).
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns TRUE if a connection was broken.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
gboolean <FONT COLOR="#0000FF">gegl_node_disconnect</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *input_pad);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Properties:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Properties can be set either when creating the node with
|
|
Packit |
bc1512 |
* #gegl_node_new_child as well as later when changing the initial
|
|
Packit |
bc1512 |
* value with #gegl_node_set.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* To see what properties are available for a given operation look in the <a
|
|
Packit |
bc1512 |
* href='operations.html'>Operations reference</a> or use
|
|
Packit |
bc1512 |
* #gegl_node_get.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_set:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @first_property_name: name of the first property to set
|
|
Packit |
bc1512 |
* @...: value for the first property, followed optionally by more name/value
|
|
Packit |
bc1512 |
* pairs, followed by NULL.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Set properties on a node, possible properties to be set are the properties
|
|
Packit |
bc1512 |
* of the currently set operations as well as <em>"name"</em> and
|
|
Packit |
bc1512 |
* <em>"operation"</em>. <em>"operation"</em> changes the current operations
|
|
Packit |
bc1512 |
* set for the node, <em>"name"</em> doesn't have any role internally in
|
|
Packit |
bc1512 |
* GEGL.
|
|
Packit |
bc1512 |
* ---
|
|
Packit |
bc1512 |
* gegl_node_set (node, "brightness", -0.2,
|
|
Packit |
bc1512 |
* "contrast", 2.0,
|
|
Packit |
bc1512 |
* NULL);
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_set</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *first_property_name,
|
|
Packit |
bc1512 |
...) G_GNUC_NULL_TERMINATED;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_set_valist:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @first_property_name: name of the first property to set
|
|
Packit |
bc1512 |
* @args: value for the first property, followed optionally by more name/value
|
|
Packit |
bc1512 |
* pairs, followed by NULL.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* valist version of #gegl_node_set
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_set_valist</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *first_property_name,
|
|
Packit |
bc1512 |
va_list args);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @first_property_name: name of the first property to get.
|
|
Packit |
bc1512 |
* @...: return location for the first property, followed optionally by more
|
|
Packit |
bc1512 |
* name/value pairs, followed by NULL.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Gets properties of a #GeglNode.
|
|
Packit |
bc1512 |
* ---
|
|
Packit |
bc1512 |
* double level;
|
|
Packit |
bc1512 |
* char *path;
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* gegl_node_get (png_save, "path", &path, NULL);
|
|
Packit |
bc1512 |
* gegl_node_get (threshold, "level", &level, NULL);
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_get</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *first_property_name,
|
|
Packit |
bc1512 |
...) G_GNUC_NULL_TERMINATED;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_valist:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @first_property_name: name of the first property to get.
|
|
Packit |
bc1512 |
* @args: return location for the first property, followed optionally by more
|
|
Packit |
bc1512 |
* name/value pairs, followed by NULL.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* valist version of #gegl_node_get
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_get_valist</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *first_property_name,
|
|
Packit |
bc1512 |
va_list args);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Processing:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* There are two different ways to do processing with GEGL, either you
|
|
Packit |
bc1512 |
* query any node providing output for a rectangular region to be rendered
|
|
Packit |
bc1512 |
* using #gegl_node_blit, or you use #gegl_node_process on a sink node (A
|
|
Packit |
bc1512 |
* display node, an image file writer or similar). To do iterative processing
|
|
Packit |
bc1512 |
* you need to use a #GeglProcessor. See #gegl_processor_work for a code
|
|
Packit |
bc1512 |
* sample.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_blit:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @scale: the scale to render at 1.0 is default, other values changes the
|
|
Packit |
bc1512 |
* width/height of the sampled region.
|
|
Packit |
bc1512 |
* @roi: the rectangle to render from the node, the coordinate system used is
|
|
Packit |
bc1512 |
* coordinates after scale has been applied.
|
|
Packit |
bc1512 |
* @format: the #BablFormat desired.
|
|
Packit |
bc1512 |
* @destination_buf: a memory buffer large enough to contain the data, can be
|
|
Packit |
bc1512 |
* left as NULL when forcing a rendering of a region.
|
|
Packit |
bc1512 |
* @rowstride: rowstride in bytes, or GEGL_AUTO_ROWSTRIDE to compute the
|
|
Packit |
bc1512 |
* rowstride based on the width and bytes per pixel for the specified format.
|
|
Packit |
bc1512 |
* @flags: an or'ed combination of GEGL_BLIT_DEFAULT, GEGL_BLIT_CACHE and
|
|
Packit |
bc1512 |
* GEGL_BLIT_DIRTY. if cache is enabled, a cache will be set up for subsequent
|
|
Packit |
bc1512 |
* requests of image data from this node. By passing in GEGL_BLIT_DIRTY the
|
|
Packit |
bc1512 |
* function will return with the latest rendered results in the cache without
|
|
Packit |
bc1512 |
* regard to wheter the regions has been rendered or not.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Render a rectangular region from a node.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_blit</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
gdouble scale,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> GeglRectangle *roi,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> Babl *format,
|
|
Packit |
bc1512 |
gpointer destination_buf,
|
|
Packit |
bc1512 |
gint rowstride,
|
|
Packit |
bc1512 |
GeglBlitFlags flags);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_process:
|
|
Packit |
bc1512 |
* @sink_node: a #GeglNode without outputs.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Render a composition. This can be used for instance on a node with a "png-save"
|
|
Packit |
bc1512 |
* operation to render all neccesary data, and make it be written to file. This
|
|
Packit |
bc1512 |
* function wraps the usage of a GeglProcessor in a single blocking function
|
|
Packit |
bc1512 |
* call. If you need a non-blocking operation, then make a direct use of
|
|
Packit |
bc1512 |
* #gegl_processor_work. See #GeglProcessor.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* ---
|
|
Packit |
bc1512 |
* GeglNode *gegl;
|
|
Packit |
bc1512 |
* GeglRectangle roi;
|
|
Packit |
bc1512 |
* GeglNode *png_save;
|
|
Packit |
bc1512 |
* unsigned char *buffer;
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* gegl = gegl_parse_xml (xml_data);
|
|
Packit |
bc1512 |
* roi = gegl_node_get_bounding_box (gegl);
|
|
Packit |
bc1512 |
* # create png_save from the graph, the parent/child relationship
|
|
Packit |
bc1512 |
* # only mean anything when it comes to memory management.
|
|
Packit |
bc1512 |
* png_save = gegl_node_new_child (gegl,
|
|
Packit |
bc1512 |
* "operation", "png-save",
|
|
Packit |
bc1512 |
* "path", "output.png",
|
|
Packit |
bc1512 |
* NULL);
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* gegl_node_link (gegl, png_save);
|
|
Packit |
bc1512 |
* gegl_node_process (png_save);
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* buffer = malloc (roi.w*roi.h*4);
|
|
Packit |
bc1512 |
* gegl_node_blit (gegl,
|
|
Packit |
bc1512 |
* &roi,
|
|
Packit |
bc1512 |
* 1.0,
|
|
Packit |
bc1512 |
* babl_format("R'G'B'A u8",
|
|
Packit |
bc1512 |
* roi.w*4,
|
|
Packit |
bc1512 |
* buffer,
|
|
Packit |
bc1512 |
* GEGL_BLIT_DEFAULT);
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_process</FONT> (GeglNode *sink_node);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Reparenting:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Sometimes it is useful to be able to move nodes between graphs or even
|
|
Packit |
bc1512 |
* handle orphaned nods that are not part of a graph. gegl_node_adopt_child
|
|
Packit |
bc1512 |
* and gegl_node_get_parent are provided to handle such cases.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_add_child:
|
|
Packit |
bc1512 |
* @graph: a GeglNode (graph)
|
|
Packit |
bc1512 |
* @child: a GeglNode.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Make the GeglNode @graph, take a reference on child. This reference
|
|
Packit |
bc1512 |
* will be dropped when the reference count on the graph reaches zero.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer none): the child.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_add_child</FONT> (GeglNode *graph,
|
|
Packit |
bc1512 |
GeglNode *child);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_remove_child:
|
|
Packit |
bc1512 |
* @graph: a GeglNode (graph)
|
|
Packit |
bc1512 |
* @child: a GeglNode.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Removes a child from a GeglNode. The reference previously held will be
|
|
Packit |
bc1512 |
* dropped so increase the reference count before removing when reparenting
|
|
Packit |
bc1512 |
* a child between two graphs.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer none): the child.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_remove_child</FONT> (GeglNode *graph,
|
|
Packit |
bc1512 |
GeglNode *child);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_parent:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns a GeglNode that keeps a reference on a child.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer none): the parent of a node or NULL.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_get_parent</FONT> (GeglNode *node);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* State queries:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* This section lists functions that retrieve information, mostly needed
|
|
Packit |
bc1512 |
* for interacting with a graph in a GUI, not creating one from scratch.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* You can figure out what the bounding box of a node is with #gegl_node_get_bounding_box,
|
|
Packit |
bc1512 |
* retrieve the values of named properties using #gegl_node_get.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_detect:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @x: x coordinate
|
|
Packit |
bc1512 |
* @y: y coordinate
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Performs hit detection by returning the node providing data at a given
|
|
Packit |
bc1512 |
* coordinate pair. Currently operates only on bounding boxes and not
|
|
Packit |
bc1512 |
* pixel data.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer none): the GeglNode providing the
|
|
Packit |
bc1512 |
* data ending up at @x,@y in the output of @node.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_detect</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
gint x,
|
|
Packit |
bc1512 |
gint y);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_find_property:
|
|
Packit |
bc1512 |
* @node: the node to lookup a paramspec on
|
|
Packit |
bc1512 |
* @property_name: the name of the property to get a paramspec for.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns the GParamSpec of property or NULL if no such property exists.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GParamSpec * <FONT COLOR="#0000FF">gegl_node_find_property</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *property_name);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_bounding_box:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns the position and dimensions of a rectangle spanning the area
|
|
Packit |
bc1512 |
* defined by a node.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglRectangle <FONT COLOR="#0000FF">gegl_node_get_bounding_box</FONT> (GeglNode *node);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_children:
|
|
Packit |
bc1512 |
* @node: the node to retrieve the children of.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (element-type Gegl.Node) (transfer container): a list
|
|
Packit |
bc1512 |
* of the nodes contained within a GeglNode that is a subgraph.
|
|
Packit |
bc1512 |
* Use g_list_free () on the list when done.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GSList * <FONT COLOR="#0000FF">gegl_node_get_children</FONT> (GeglNode *node);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_consumers:
|
|
Packit |
bc1512 |
* @node: the node we are querying.
|
|
Packit |
bc1512 |
* @output_pad: the output pad we want to know who uses.
|
|
Packit |
bc1512 |
* @nodes: (out callee-allocates) (array zero-terminated=1) (allow-none): optional return location for array of nodes.
|
|
Packit |
bc1512 |
* @pads: (out callee-allocates) (array zero-terminated=1) (allow-none): optional return location for array of pad names.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Retrieve which pads on which nodes are connected to a named output_pad,
|
|
Packit |
bc1512 |
* and the number of connections. Both the location for the generated
|
|
Packit |
bc1512 |
* nodes array and pads array can be left as NULL. If they are non NULL
|
|
Packit |
bc1512 |
* both should be freed with g_free. The arrays are NULL terminated.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns the number of consumers connected to this output_pad.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
gint <FONT COLOR="#0000FF">gegl_node_get_consumers</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *output_pad,
|
|
Packit |
bc1512 |
GeglNode ***nodes,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar ***pads);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_input_proxy:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @pad_name: the name of the pad.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Proxies are used to route between nodes of a subgraph contained within
|
|
Packit |
bc1512 |
* a node.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns an input proxy for the named pad. If no input proxy exists with
|
|
Packit |
bc1512 |
* this name a new one will be created.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_get_input_proxy</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *pad_name);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_operation:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns the type of processing operation associated with this node, or
|
|
Packit |
bc1512 |
* NULL if there is no op associated. The special name "GraphNode"
|
|
Packit |
bc1512 |
* is returned if the node is the container of a subgraph.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar * <FONT COLOR="#0000FF">gegl_node_get_operation</FONT> (<FONT COLOR="#228B22">const</FONT> GeglNode *node);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_output_proxy:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @pad_name: the name of the pad.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Proxies are used to route between nodes of a subgraph contained within
|
|
Packit |
bc1512 |
* a node.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns a output proxy for the named pad. If no output proxy exists with
|
|
Packit |
bc1512 |
* this name a new one will be created.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_get_output_proxy</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *pad_name);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_producer:
|
|
Packit |
bc1512 |
* @node: the node we are querying
|
|
Packit |
bc1512 |
* @input_pad_name: the input pad we want to get the producer for
|
|
Packit |
bc1512 |
* @output_pad_name: (allow-none): optional pointer to a location where we can store a
|
|
Packit |
bc1512 |
* freshly allocated string with the name of the output pad.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer none): the node providing data
|
|
Packit |
bc1512 |
* or NULL if no node is connected to the input_pad.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_get_producer</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
gchar *input_pad_name,
|
|
Packit |
bc1512 |
gchar **output_pad_name);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_has_pad:
|
|
Packit |
bc1512 |
* @node: the node we are querying
|
|
Packit |
bc1512 |
* @pad_name: the pad name we are looking for
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns TRUE if the node has a pad with the specified name
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
gboolean <FONT COLOR="#0000FF">gegl_node_has_pad</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *pad_name);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* Binding conveniences:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* The following functions are mostly included to make it easier to create
|
|
Packit |
bc1512 |
* language bindings for the nodes. The varargs versions will in most cases
|
|
Packit |
bc1512 |
* lead to both more efficient and readable code from C.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_create_child:
|
|
Packit |
bc1512 |
* @parent: a #GeglNode
|
|
Packit |
bc1512 |
* @operation: the type of node to create.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Creates a new processing node that performs the specified operation.
|
|
Packit |
bc1512 |
* All properties of the operation will have their default values. This
|
|
Packit |
bc1512 |
* is included as an addiiton to #gegl_node_new_child in the public API to have
|
|
Packit |
bc1512 |
* a non varargs entry point for bindings as well as sometimes simpler more
|
|
Packit |
bc1512 |
* readable code.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer none):a newly created node. The node will be destroyed by the parent.
|
|
Packit |
bc1512 |
* Calling g_object_unref on a node will cause the node to be dropped by the
|
|
Packit |
bc1512 |
* parent. (You may also add additional references using
|
|
Packit |
bc1512 |
* g_object_ref/g_object_unref, but in general relying on the parents reference
|
|
Packit |
bc1512 |
* counting is easiest.)
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_create_child</FONT> (GeglNode *parent,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *operation);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_get_property:
|
|
Packit |
bc1512 |
* @node: the node to get a property from
|
|
Packit |
bc1512 |
* @property_name: the name of the property to get
|
|
Packit |
bc1512 |
* @value: (out): pointer to a GValue where the value of the property should be stored
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* This is mainly included for language bindings. Using #gegl_node_get is
|
|
Packit |
bc1512 |
* more convenient when programming in C.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_get_property</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *property_name,
|
|
Packit |
bc1512 |
GValue *value);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_set_property:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @property_name: the name of the property to set
|
|
Packit |
bc1512 |
* @value: (in): a GValue containing the value to be set in the property.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* This is mainly included for language bindings. Using #gegl_node_set is
|
|
Packit |
bc1512 |
* more convenient when programming in C.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_node_set_property</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *property_name,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> GValue *value);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* XML:
|
|
Packit |
bc1512 |
* The XML format used by GEGL is not stable and should not be relied on
|
|
Packit |
bc1512 |
* for anything but testing purposes yet.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_new_from_xml:
|
|
Packit |
bc1512 |
* @xmldata: a \0 terminated string containing XML data to be parsed.
|
|
Packit |
bc1512 |
* @path_root: a file system path that relative paths in the XML will be
|
|
Packit |
bc1512 |
* resolved in relation to.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* The #GeglNode returned contains the graph described by the tree of stacks
|
|
Packit |
bc1512 |
* in the XML document. The tree is connected to the "output" pad of the
|
|
Packit |
bc1512 |
* returned node and thus can be used directly for processing.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer full): a GeglNode containing the parsed XML as a subgraph.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_new_from_xml</FONT> (<FONT COLOR="#228B22">const</FONT> gchar *xmldata,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *path_root);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_new_from_file:
|
|
Packit |
bc1512 |
* @path: the path to a file on the local file system to be parsed.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* The #GeglNode returned contains the graph described by the tree of stacks
|
|
Packit |
bc1512 |
* in the XML document. The tree is connected to the "output" pad of the
|
|
Packit |
bc1512 |
* returned node and thus can be used directly for processing.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer full): a GeglNode containing the parsed XML as a subgraph.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode * <FONT COLOR="#0000FF">gegl_node_new_from_file</FONT> (<FONT COLOR="#228B22">const</FONT> gchar *path);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_to_xml:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @path_root: filesystem path to construct relative paths from.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns a freshly allocated \0 terminated string containing a XML
|
|
Packit |
bc1512 |
* serialization of the composition produced by a node (and thus also
|
|
Packit |
bc1512 |
* the nodes contributing data to the specified node). To export a
|
|
Packit |
bc1512 |
* gegl graph, connect the internal output node to an output proxy (see
|
|
Packit |
bc1512 |
* #gegl_node_get_output_proxy.) and use the proxy node as the basis
|
|
Packit |
bc1512 |
* for the serialization.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
gchar * <FONT COLOR="#0000FF">gegl_node_to_xml</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *path_root);
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* GeglProcessor:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* A #GeglProcessor, is a worker that can be used for background rendering
|
|
Packit |
bc1512 |
* of regions in a node's cache. Or for processing a sink node. For most
|
|
Packit |
bc1512 |
* non GUI tasks using #gegl_node_blit and #gegl_node_process directly
|
|
Packit |
bc1512 |
* should be sufficient. See #gegl_processor_work for a code sample.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node_new_processor:
|
|
Packit |
bc1512 |
* @node: a #GeglNode
|
|
Packit |
bc1512 |
* @rectangle: the #GeglRectangle to work on or NULL to work on all available
|
|
Packit |
bc1512 |
* data.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer full): a new #GeglProcessor.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglProcessor *<FONT COLOR="#0000FF">gegl_node_new_processor</FONT> (GeglNode *node,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> GeglRectangle *rectangle);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_processor_set_rectangle:
|
|
Packit |
bc1512 |
* @processor: a #GeglProcessor
|
|
Packit |
bc1512 |
* @rectangle: the new #GeglRectangle the processor shold work on or NULL
|
|
Packit |
bc1512 |
* to make it work on all data in the buffer.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Change the rectangle a #GeglProcessor is working on.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_processor_set_rectangle</FONT> (GeglProcessor *processor,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> GeglRectangle *rectangle);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_processor_work:
|
|
Packit |
bc1512 |
* @processor: a #GeglProcessor
|
|
Packit |
bc1512 |
* @progress: a location to store the (estimated) percentage complete.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Do an iteration of work for the processor.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns TRUE if there is more work to be done.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* ---
|
|
Packit |
bc1512 |
* GeglProcessor *processor = gegl_node_new_processor (node, &roi);
|
|
Packit |
bc1512 |
* double progress;
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* while (gegl_processor_work (processor, &progress))
|
|
Packit |
bc1512 |
* g_warning ("%f%% complete", progress);
|
|
Packit |
bc1512 |
* g_object_unref (processor);
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
gboolean <FONT COLOR="#0000FF">gegl_processor_work</FONT> (GeglProcessor *processor,
|
|
Packit |
bc1512 |
gdouble *progress);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/***
|
|
Packit |
bc1512 |
* GeglConfig:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* GEGL uses a singleton configuration object
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_config:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Returns a GeglConfig object with properties that can be manipulated to control
|
|
Packit |
bc1512 |
* GEGLs behavior. Properties available on the object are:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* "cache-size" "quality" and "swap", the two first is an integer denoting
|
|
Packit |
bc1512 |
* number of bytes, the secons a double value between 0 and 1 and the last
|
|
Packit |
bc1512 |
* the path of the directory to swap to (or "ram" to not use diskbased swap)
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglConfig * <FONT COLOR="#0000FF">gegl_config</FONT> (<FONT COLOR="#228B22">void</FONT>);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_apply_op</FONT> (GeglBuffer *buffer,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *operation_name,
|
|
Packit |
bc1512 |
...) G_GNUC_NULL_TERMINATED;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
GeglBuffer *<FONT COLOR="#0000FF">gegl_filter_op</FONT> (GeglBuffer *source_buffer,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *operation_name,
|
|
Packit |
bc1512 |
...) G_GNUC_NULL_TERMINATED;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_render_op</FONT> (GeglBuffer *source_buffer,
|
|
Packit |
bc1512 |
GeglBuffer *target_buffer,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *operation_name,
|
|
Packit |
bc1512 |
...) G_GNUC_NULL_TERMINATED;
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/* the following only exist to make gegl_apply nad gegl_filter bindable */</FONT>
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_apply_op_valist</FONT> (GeglBuffer *buffer,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *operation_name,
|
|
Packit |
bc1512 |
va_list var_args);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
GeglBuffer *<FONT COLOR="#0000FF">gegl_filter_op_valist</FONT> (GeglBuffer *source_buffer,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *operation_name,
|
|
Packit |
bc1512 |
va_list var_args);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">void</FONT> <FONT COLOR="#0000FF">gegl_render_op_valist</FONT> (GeglBuffer *source_buffer,
|
|
Packit |
bc1512 |
GeglBuffer *target_buffer,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *operation_name,
|
|
Packit |
bc1512 |
va_list var_args);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_node: (skip)
|
|
Packit |
bc1512 |
* @op_type: the type of operation to create
|
|
Packit |
bc1512 |
* @first_property_name:
|
|
Packit |
bc1512 |
* @...:
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Construct a GEGL node, connecting it to needed input nodes. The
|
|
Packit |
bc1512 |
* returned node does not have a parent but a single reference it
|
|
Packit |
bc1512 |
* is meant to be passed to gegl_graph () for gegl_graph () to assume
|
|
Packit |
bc1512 |
* its ownership. This is syntactic sugar for use from C, similar
|
|
Packit |
bc1512 |
* conveniences can easily be built externally in other languages.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* gegl_node(op_type, [key, value, [...]], NULL, [input, [aux]])
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer full): a new Gegl node.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode *<FONT COLOR="#0000FF">gegl_node</FONT> (<FONT COLOR="#228B22">const</FONT> gchar *op_type,
|
|
Packit |
bc1512 |
<FONT COLOR="#228B22">const</FONT> gchar *first_property_name,
|
|
Packit |
bc1512 |
...);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<FONT COLOR="#B22222">/**
|
|
Packit |
bc1512 |
* gegl_graph: (skip)
|
|
Packit |
bc1512 |
* @node: (transfer full): the end result of a composition created with gegl_node()
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Creates a GeglNode containing a free floating graph constructed
|
|
Packit |
bc1512 |
* using gegl_node(). The GeglGraph adopts all the passed in nodes
|
|
Packit |
bc1512 |
* making it sufficient to unref the resulting graph.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* gegl_graph (gegl_node ("gegl:over", NULL,
|
|
Packit |
bc1512 |
* gegl_node (..), gegl_node (..)));
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Return value: (transfer full):a GeglNode graph.
|
|
Packit |
bc1512 |
*/</FONT>
|
|
Packit |
bc1512 |
GeglNode *<FONT COLOR="#0000FF">gegl_graph</FONT> (GeglNode *node);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#B8860B">GEGL_ALIGNED</FONT> __restrict__ __attribute__((__aligned__ (16)))
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
G_END_DECLS
|
|
Packit |
bc1512 |
#<FONT COLOR="#5F9EA0">endif</FONT> <FONT COLOR="#B22222">/* __GEGL_H__ */</FONT>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
<ADDRESS>Generated by GNU Enscript 1.6.5.90.</ADDRESS>
|
|
Packit |
bc1512 |
</BODY>
|
|
Packit |
bc1512 |
</HTML>
|