<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Enscript Output</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD">
<A NAME="top">
<A NAME="file1">
<H1>../gegl/gegl-plugin.h</H1>
<PRE>
<I><FONT COLOR="#B22222">/* This file is the public operation GEGL API, this API will change to much
* larger degrees than the api provided by gegl.h
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*
* 2000-2008 Øyvind Kolås.
*/</FONT></I>
#<B><FONT COLOR="#5F9EA0">ifndef</FONT></B> <FONT COLOR="#B8860B">__GEGL_PLUGIN_H__</FONT>
#<B><FONT COLOR="#5F9EA0">define</FONT></B> <FONT COLOR="#B8860B">__GEGL_PLUGIN_H__</FONT>
#<B><FONT COLOR="#5F9EA0">ifdef</FONT></B> <FONT COLOR="#B8860B">HAVE_CONFIG_H</FONT>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F">"config.h"</FONT></B>
#<B><FONT COLOR="#5F9EA0">endif</FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><string.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><glib-object.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><gegl.h></FONT></B>
G_BEGIN_DECLS
<I><FONT COLOR="#B22222">/* Extra types needed when coding operations */</FONT></I>
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B> _GeglOperation GeglOperation;
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B> _GeglOperationContext GeglOperationContext;
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B> _GeglPad GeglPad;
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B> _GeglConnection GeglConnection;
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><gegl-matrix.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><gegl-utils.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><gegl-buffer.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><gegl-paramspecs.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><gmodule.h></FONT></B>
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B> _GeglModule GeglModule;
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B> _GeglModuleInfo GeglModuleInfo;
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B> _GeglModuleDB GeglModuleDB;
<I><FONT COLOR="#B22222">/***
* Writing GEGL operations
*
*/</FONT></I>
<I><FONT COLOR="#B22222">/*#include <geglmodule.h>*/</FONT></I>
<I><FONT COLOR="#B22222">/* increment the ABI version each time one of the following changes:
*
* - the libgeglmodule implementation (if the change affects modules).
* - GeglOperation or one of it's base classes changes. (XXX:-
* should be extended so a range of abi versions are accepted.
*/</FONT></I>
#<B><FONT COLOR="#5F9EA0">define</FONT></B> <FONT COLOR="#B8860B">GEGL_MODULE_ABI_VERSION</FONT> 0x000A
<B><FONT COLOR="#228B22">struct</FONT></B> _GeglModuleInfo
{
guint32 abi_version;
};
GType <B><FONT COLOR="#0000FF">gegl_module_register_type</FONT></B> (GTypeModule *module,
GType parent_type,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *type_name,
<B><FONT COLOR="#228B22">const</FONT></B> GTypeInfo *type_info,
GTypeFlags flags);
gint <B><FONT COLOR="#0000FF">gegl_operation_context_get_level</FONT></B> (GeglOperationContext *self);
GeglBuffer *<B><FONT COLOR="#0000FF">gegl_operation_context_get_source</FONT></B> (GeglOperationContext *self,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *padname);
GeglBuffer *<B><FONT COLOR="#0000FF">gegl_operation_context_get_target</FONT></B> (GeglOperationContext *self,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *padname);
<B><FONT COLOR="#228B22">void</FONT></B> <B><FONT COLOR="#0000FF">gegl_operation_context_set_object</FONT></B> (GeglOperationContext *context,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *padname,
GObject *data);
<B><FONT COLOR="#228B22">void</FONT></B> <B><FONT COLOR="#0000FF">gegl_operation_context_take_object</FONT></B>(GeglOperationContext *context,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *padname,
GObject *data);
GObject *<B><FONT COLOR="#0000FF">gegl_operation_context_get_object</FONT></B> (GeglOperationContext *context,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *padname);
<B><FONT COLOR="#228B22">void</FONT></B> <B><FONT COLOR="#0000FF">gegl_extension_handler_register</FONT></B> (<B><FONT COLOR="#228B22">const</FONT></B> gchar *extension,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *handler);
<B><FONT COLOR="#228B22">void</FONT></B> gegl_extension_handler_register_saver
(<B><FONT COLOR="#228B22">const</FONT></B> gchar *extension,
<B><FONT COLOR="#228B22">const</FONT></B> gchar *handler);
<B><FONT COLOR="#228B22">const</FONT></B> gchar * <B><FONT COLOR="#0000FF">gegl_extension_handler_get</FONT></B> (<B><FONT COLOR="#228B22">const</FONT></B> gchar *extension);
<B><FONT COLOR="#228B22">const</FONT></B> gchar * <B><FONT COLOR="#0000FF">gegl_extension_handler_get_saver</FONT></B> (<B><FONT COLOR="#228B22">const</FONT></B> gchar *extension);
<I><FONT COLOR="#B22222">/* code template utility, updates the jacobian matrix using
* a user defined mapping function for displacement, example
* with an identity transform (note that for the identity
* transform this is massive computational overhead that can
* be skipped by passing NULL to the sampler.
*
* #define gegl_unmap(x,y,dx,dy) { dx=x; dy=y; }
*
* gegl_sampler_compute_scale (scale, x, y);
* gegl_unmap(x,y,sample_x,sample_y);
* gegl_buffer_sample (buffer, sample_x, sample_y, scale, dest, format,
* GEGL_SAMPLER_LOHALO);
*
* #undef gegl_unmap // IMPORTANT undefine map macro
*/</FONT></I>
#<B><FONT COLOR="#5F9EA0">define</FONT></B> <B><FONT COLOR="#0000FF">gegl_sampler_compute_scale</FONT></B>(matrix, x, y) \
{ \
float ax, ay, bx, by; \
gegl_unmap(x + 0.5, y, ax, ay); \
gegl_unmap(x - 0.5, y, bx, by); \
matrix.coeff[0][0] = ax - bx; \
matrix.coeff[1][0] = ay - by; \
gegl_unmap(x, y + 0.5, ax, ay); \
gegl_unmap(x, y - 0.5, bx, by); \
matrix.coeff[0][1] = ax - bx; \
matrix.coeff[1][1] = ay - by; \
}
<B><FONT COLOR="#228B22">typedef</FONT></B> <B><FONT COLOR="#228B22">struct</FONT></B>
{
GObject parent_instance;
<B><FONT COLOR="#228B22">void</FONT></B> (* get) (GeglSampler *self,
gdouble x,
gdouble y,
GeglMatrix2 *scale,
<B><FONT COLOR="#228B22">void</FONT></B> *output);
} SamplerMock;
#<B><FONT COLOR="#5F9EA0">define</FONT></B> <B><FONT COLOR="#0000FF">gegl_sampler_get</FONT></B>(sampler,x,y,scale,dest) \
((SamplerMock*)(sampler))->get((sampler),(x),(y),(scale),(dest))
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><glib-object.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><babl/babl.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-filter.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-area-filter.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-point-filter.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-composer.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-composer3.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-point-composer.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-point-composer3.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-point-render.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-temporal.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-source.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-sink.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><operation/gegl-operation-meta.h></FONT></B>
#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F"><gegl-lookup.h></FONT></B>
G_END_DECLS
#<B><FONT COLOR="#5F9EA0">endif</FONT></B> <I><FONT COLOR="#B22222">/* __GEGL_PLUGIN_H__ */</FONT></I>
</PRE>
<HR>
<ADDRESS>Generated by <A HREF="http://www.iki.fi/~mtr/genscript/">GNU Enscript 1.6.5.90</A>.</ADDRESS>
</BODY>
</HTML>