Blame docs/gegl-operation.h.html

Packit Service 2781ba
Packit Service 2781ba
<HTML>
Packit Service 2781ba
<HEAD>
Packit Service 2781ba
<TITLE>Enscript Output</TITLE>
Packit Service 2781ba
</HEAD>
Packit Service 2781ba
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD">
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba

../gegl/operation/gegl-operation.h

Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* This file is part of GEGL
Packit Service 2781ba
 *
Packit Service 2781ba
 * GEGL is free software; you can redistribute it and/or
Packit Service 2781ba
 * modify it under the terms of the GNU Lesser General Public
Packit Service 2781ba
 * License as published by the Free Software Foundation; either
Packit Service 2781ba
 * version 3 of the License, or (at your option) any later version.
Packit Service 2781ba
 *
Packit Service 2781ba
 * GEGL is distributed in the hope that it will be useful,
Packit Service 2781ba
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 2781ba
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 2781ba
 * Lesser General Public License for more details.
Packit Service 2781ba
 *
Packit Service 2781ba
 * You should have received a copy of the GNU Lesser General Public
Packit Service 2781ba
 * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
Packit Service 2781ba
 *
Packit Service 2781ba
 * Copyright 2003 Calvin Williamson
Packit Service 2781ba
 *           2005-2008 Øyvind Kolås
Packit Service 2781ba
 */</FONT>
Packit Service 2781ba
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">ifndef</FONT> <FONT COLOR="#B8860B">__GEGL_OPERATION_H__</FONT>
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#B8860B">__GEGL_OPERATION_H__</FONT>
Packit Service 2781ba
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><glib-object.h></FONT>
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F"><babl/babl.h></FONT>
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">include</FONT> <FONT COLOR="#BC8F8F">"gegl-buffer.h"</FONT>
Packit Service 2781ba
Packit Service 2781ba
G_BEGIN_DECLS
Packit Service 2781ba
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#B8860B">GEGL_TYPE_OPERATION</FONT>            (gegl_operation_get_type ())
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#0000FF">GEGL_OPERATION</FONT>(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION, GeglOperation))
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#0000FF">GEGL_OPERATION_CLASS</FONT>(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_OPERATION, GeglOperationClass))
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#0000FF">GEGL_IS_OPERATION</FONT>(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION))
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#0000FF">GEGL_IS_OPERATION_CLASS</FONT>(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GEGL_TYPE_OPERATION))
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">define</FONT> <FONT COLOR="#0000FF">GEGL_OPERATION_GET_CLASS</FONT>(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GEGL_TYPE_OPERATION, GeglOperationClass))
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">typedef</FONT> <FONT COLOR="#228B22">struct</FONT> _GeglOperationClass GeglOperationClass;
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">struct</FONT> _GeglOperation
Packit Service 2781ba
{
Packit Service 2781ba
  GObject parent_instance;
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/*< private >*/</FONT>
Packit Service 2781ba
  GeglNode *node;  <FONT COLOR="#B22222">/* the node that this operation object is communicated
Packit Service 2781ba
                      with through */</FONT>
Packit Service 2781ba
};
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/***
Packit Service 2781ba
 * GeglOperation:
Packit Service 2781ba
 *
Packit Service 2781ba
 * All the image processing code in GEGL is implemented as GeglOperations,
Packit Service 2781ba
 * GEGL operations are implemented as GObject with a convenience API called
Packit Service 2781ba
 * chanting that abstracts away the boiler plater needed to generate introspectable
Packit Service 2781ba
 * named properties of different types.
Packit Service 2781ba
 *
Packit Service 2781ba
 * Most types of operations like: filters, composers, sources, sinks, point
Packit Service 2781ba
 * operations, compositing operations, and spatial operations with fixed
Packit Service 2781ba
 * neighbourhoods. These base classes build on top of the GeglOperationsClass:
Packit Service 2781ba
 *
Packit Service 2781ba
 * See <a href='gegl-plugin.h.html'>gegl-plugin.h</a> for details.
Packit Service 2781ba
 */</FONT>
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* the level at which is being operated is stored in the context,
Packit Service 2781ba
*/</FONT>
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">struct</FONT> _GeglOperationClass
Packit Service 2781ba
{
Packit Service 2781ba
  GObjectClass    parent_class;
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#228B22">const</FONT> gchar    *name;        <FONT COLOR="#B22222">/* name(string) used to create/identify
Packit Service 2781ba
                                  this type of operation in GEGL, should be
Packit Service 2781ba
                                  set through gegl_operation_class_set_key(s) */</FONT>
Packit Service 2781ba
  <FONT COLOR="#228B22">const</FONT> gchar    *compat_name; <FONT COLOR="#B22222">/* allows specifying an alias that the op is
Packit Service 2781ba
                                  also known as */</FONT>
Packit Service 2781ba
  GHashTable     *keys;        <FONT COLOR="#B22222">/* hashtable used for storing meta-data about an op */</FONT>
Packit Service 2781ba
Packit Service 2781ba
  guint           no_cache      :1;  <FONT COLOR="#B22222">/* do not create a cache for this operation */</FONT>
Packit Service 2781ba
  guint           opencl_support:1;
Packit Service 2781ba
  guint64         bit_pad:62;
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* attach this operation with a GeglNode, override this if you are creating a
Packit Service 2781ba
   * GeglGraph, it is already defined for Filters/Sources/Composers.
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  <FONT COLOR="#228B22">void</FONT>          (*attach)                    (GeglOperation *operation);
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* Initialize the operation, prepare is called when all properties are
Packit Service 2781ba
   * known but before processing will begin. Prepare will be invoked one
Packit Service 2781ba
   * or multiple times prior to processing.
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  <FONT COLOR="#228B22">void</FONT>          (*prepare)                   (GeglOperation *operation);
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* The bounding rectangle for the data that is defined by this op.
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  GeglRectangle (*get_bounding_box)          (GeglOperation *operation);
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* The output region that is made invalid by a change in the input_roi
Packit Service 2781ba
   * rectangle of the buffer passed in on the pad input_pad. Defaults to
Packit Service 2781ba
   * returning the input_roi.
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  GeglRectangle (*get_invalidated_by_change) (GeglOperation       *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar         *input_pad,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle *input_roi);
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* The rectangle needed to be correctly computed in a buffer on the named
Packit Service 2781ba
   * input_pad, for a given region of interest. Defaults to return the
Packit Service 2781ba
   * output_roi.
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  GeglRectangle (*get_required_for_output)   (GeglOperation       *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar         *input_pad,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle *output_roi);
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* The rectangular area that should be processed in one go, by default if not
Packit Service 2781ba
   * defined the output roi would be returned. This is useful for file loaders
Packit Service 2781ba
   * and operations like contrast stretching which is a point operation but we
Packit Service 2781ba
   * need the parameters as the minimum/maximum values in the entire input buffer.
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  GeglRectangle (*get_cached_region)         (GeglOperation       *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle *output_roi);
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* Compute the rectangular region output roi for the specified output_pad.
Packit Service 2781ba
   * For operations that are sinks (have no output pads), roi is the rectangle
Packit Service 2781ba
   * to consume and the output_pad argument is to be ignored.
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  gboolean      (*process)                   (GeglOperation        *operation,
Packit Service 2781ba
                                              GeglOperationContext *context,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar          *output_pad,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle  *roi,
Packit Service 2781ba
                                              gint                  level);
Packit Service 2781ba
Packit Service 2781ba
  <FONT COLOR="#B22222">/* The node providing data for a specific location within the operations
Packit Service 2781ba
   * output. The node is responsible for delegating blame to one of it's
Packit Service 2781ba
   * inputs taking into account opacity and similar issues.
Packit Service 2781ba
   *
Packit Service 2781ba
   * XXX: What is GeglNode doing in this part of the API?,
Packit Service 2781ba
   * perhaps we should only point out which pad the data is coming from?
Packit Service 2781ba
   */</FONT>
Packit Service 2781ba
  GeglNode*     (*detect)                    (GeglOperation       *operation,
Packit Service 2781ba
                                              gint                 x,
Packit Service 2781ba
                                              gint                 y);
Packit Service 2781ba
  gpointer      pad[10];
Packit Service 2781ba
};
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
GType           <FONT COLOR="#0000FF">gegl_operation_get_type</FONT>        (<FONT COLOR="#228B22">void</FONT>) G_GNUC_CONST;
Packit Service 2781ba
Packit Service 2781ba
GeglRectangle   gegl_operation_get_invalidated_by_change
Packit Service 2781ba
                                             (GeglOperation *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar   *input_pad,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle *roi);
Packit Service 2781ba
GeglRectangle   <FONT COLOR="#0000FF">gegl_operation_get_bounding_box</FONT>  (GeglOperation *operation);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* retrieves the bounding box of an input pad */</FONT>
Packit Service 2781ba
GeglRectangle * gegl_operation_source_get_bounding_box
Packit Service 2781ba
                                             (GeglOperation *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar   *pad_name);
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
GeglRectangle   gegl_operation_get_cached_region
Packit Service 2781ba
                                             (GeglOperation *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle *roi);
Packit Service 2781ba
Packit Service 2781ba
GeglRectangle   gegl_operation_get_required_for_output
Packit Service 2781ba
                                             (GeglOperation *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar   *input_pad,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle *roi);
Packit Service 2781ba
Packit Service 2781ba
GeglNode       *<FONT COLOR="#0000FF">gegl_operation_detect</FONT>        (GeglOperation *operation,
Packit Service 2781ba
                                              gint           x,
Packit Service 2781ba
                                              gint           y);
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* virtual method invokers that change behavior based on the roi being computed,
Packit Service 2781ba
 * needs a context_id being based that is used for storing context data.
Packit Service 2781ba
 */</FONT>
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>            <FONT COLOR="#0000FF">gegl_operation_attach</FONT>        (GeglOperation *operation,
Packit Service 2781ba
                                              GeglNode      *node);
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>            <FONT COLOR="#0000FF">gegl_operation_prepare</FONT>       (GeglOperation *operation);
Packit Service 2781ba
gboolean        <FONT COLOR="#0000FF">gegl_operation_process</FONT>       (GeglOperation *operation,
Packit Service 2781ba
                                              GeglOperationContext *context,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar          *output_pad,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> GeglRectangle  *roi,
Packit Service 2781ba
                                              gint                  level);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* create a pad for a specified property for this operation, this method is
Packit Service 2781ba
 * to be called from the attach method of operations, most operations do not
Packit Service 2781ba
 * have to care about this since a super class like filter, sink, source or
Packit Service 2781ba
 * composer already does so.
Packit Service 2781ba
 */</FONT>
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>            <FONT COLOR="#0000FF">gegl_operation_create_pad</FONT>    (GeglOperation *operation,
Packit Service 2781ba
                                              GParamSpec    *param_spec);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* specify the bablformat for a pad on this operation (XXX: document when
Packit Service 2781ba
 * this is legal, at the moment, only used internally in some ops,. but might
Packit Service 2781ba
 * turn into a global mechanism) */</FONT>
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>            <FONT COLOR="#0000FF">gegl_operation_set_format</FONT>    (GeglOperation *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar   *pad_name,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> Babl    *format);
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">const</FONT> Babl *    <FONT COLOR="#0000FF">gegl_operation_get_format</FONT>    (GeglOperation *operation,
Packit Service 2781ba
                                              <FONT COLOR="#228B22">const</FONT> gchar   *pad_name);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">const</FONT> gchar *   <FONT COLOR="#0000FF">gegl_operation_get_name</FONT>      (GeglOperation *operation);
Packit Service 2781ba
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* retrieves the node providing data to a named input pad */</FONT>
Packit Service 2781ba
GeglNode      * <FONT COLOR="#0000FF">gegl_operation_get_source_node</FONT> (GeglOperation *operation,
Packit Service 2781ba
                                                <FONT COLOR="#228B22">const</FONT> gchar   *pad_name);
Packit Service 2781ba
Packit Service 2781ba
GParamSpec ** <FONT COLOR="#0000FF">gegl_operation_list_properties</FONT>   (<FONT COLOR="#228B22">const</FONT> gchar *operation_type,
Packit Service 2781ba
                                                guint       *n_properties_p);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* API to change  */</FONT>
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>          <FONT COLOR="#0000FF">gegl_operation_class_set_key</FONT>     (GeglOperationClass *klass,
Packit Service 2781ba
                                                <FONT COLOR="#228B22">const</FONT> gchar *key_name,
Packit Service 2781ba
                                                <FONT COLOR="#228B22">const</FONT> gchar *key_value);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">const</FONT> gchar * <FONT COLOR="#0000FF">gegl_operation_class_get_key</FONT>     (GeglOperationClass *operation_class,
Packit Service 2781ba
                                                <FONT COLOR="#228B22">const</FONT> gchar        *key_name);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>          <FONT COLOR="#0000FF">gegl_operation_class_set_keys</FONT>    (GeglOperationClass *klass,
Packit Service 2781ba
                                                <FONT COLOR="#228B22">const</FONT> gchar        *key_name,
Packit Service 2781ba
                                                ...);
Packit Service 2781ba
Packit Service 2781ba
gchar      ** <FONT COLOR="#0000FF">gegl_operation_list_keys</FONT>         (<FONT COLOR="#228B22">const</FONT> gchar *operation_type,
Packit Service 2781ba
                                                guint       *n_keys);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>          <FONT COLOR="#0000FF">gegl_operation_set_key</FONT>           (<FONT COLOR="#228B22">const</FONT> gchar *operation_type,
Packit Service 2781ba
                                                <FONT COLOR="#228B22">const</FONT> gchar *key_name,
Packit Service 2781ba
                                                <FONT COLOR="#228B22">const</FONT> gchar *key_value);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#228B22">const</FONT> gchar * <FONT COLOR="#0000FF">gegl_operation_get_key</FONT>            (<FONT COLOR="#228B22">const</FONT> gchar *operation_type,
Packit Service 2781ba
                                                 <FONT COLOR="#228B22">const</FONT> gchar *key_name);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* invalidate a specific rectangle, indicating the any computation depending
Packit Service 2781ba
 * on this roi is now invalid.
Packit Service 2781ba
 *
Packit Service 2781ba
 * @roi : the region to blank or NULL for the nodes current have_rect
Packit Service 2781ba
 * @clear_cache: whether any present caches should be zeroed out
Packit Service 2781ba
 */</FONT>
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>     <FONT COLOR="#0000FF">gegl_operation_invalidate</FONT>       (GeglOperation       *operation,
Packit Service 2781ba
                                          <FONT COLOR="#228B22">const</FONT> GeglRectangle *roi,
Packit Service 2781ba
                                          gboolean             clear_cache);
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/* internal utility functions used by gegl, these should not be used
Packit Service 2781ba
 * externally */</FONT>
Packit Service 2781ba
gboolean <FONT COLOR="#0000FF">gegl_operation_calc_need_rects</FONT>      (GeglOperation       *operation,
Packit Service 2781ba
                                              gpointer             context_id);
Packit Service 2781ba
<FONT COLOR="#228B22">void</FONT>     <FONT COLOR="#0000FF">gegl_operation_path_prop_changed</FONT>    (GeglPath            *path,
Packit Service 2781ba
                                              GeglOperation       *operation);
Packit Service 2781ba
Packit Service 2781ba
G_END_DECLS
Packit Service 2781ba
Packit Service 2781ba
<FONT COLOR="#B22222">/***
Packit Service 2781ba
 */</FONT>
Packit Service 2781ba
Packit Service 2781ba
#<FONT COLOR="#5F9EA0">endif</FONT> <FONT COLOR="#B22222">/* __GEGL_OPERATION_H__ */</FONT>
Packit Service 2781ba
Packit Service 2781ba

Packit Service 2781ba
<ADDRESS>Generated by GNU Enscript 1.6.5.90.</ADDRESS>
Packit Service 2781ba
</BODY>
Packit Service 2781ba
</HTML>