./gegl-0.1.0-i686/ 0000755 0000000 0000000 00000000000 11272024047 011752 5 ustar root root ./gegl-0.1.0-i686/gegl-0.1.0-i686.pet.specs 0000644 0000000 0000000 00000000065 11272024047 015643 0 ustar root root PETMENUDESCR=''
PETOFFICIALDEPS=''
PETREGISTER='yes'
./gegl-0.1.0-i686/usr/ 0000755 0000000 0000000 00000000000 11272023655 012567 5 ustar root root ./gegl-0.1.0-i686/usr/include/ 0000755 0000000 0000000 00000000000 11272023652 014207 5 ustar root root ./gegl-0.1.0-i686/usr/include/gegl-0.0/ 0000755 0000000 0000000 00000000000 11272023657 015425 5 ustar root root ./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-types.h 0000644 0000000 0000000 00000004163 11272023566 017661 0 ustar root root /* 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 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 .
*
* Copyright 2003 Calvin Williamson
* 2006 Øyvind Kolås
*/
#ifndef __GEGL_TYPES_H__
#define __GEGL_TYPES_H__
G_BEGIN_DECLS
#define GEGL_AUTO_ROWSTRIDE 0
typedef enum
{
GEGL_PARAM_PAD_OUTPUT = 1 << G_PARAM_USER_SHIFT,
GEGL_PARAM_PAD_INPUT = 1 << (G_PARAM_USER_SHIFT + 1)
} GeglPadType;
typedef enum
{
GEGL_BLIT_DEFAULT = 0,
GEGL_BLIT_CACHE = 1 << 0,
GEGL_BLIT_DIRTY = 1 << 1
} GeglBlitFlags;
typedef struct _GeglConfig GeglConfig;
typedef struct _GeglCurve GeglCurve;
typedef struct _GeglPath GeglPath;
typedef struct _GeglColor GeglColor;
typedef struct _GeglRectangle
{
gint x;
gint y;
gint width;
gint height;
} GeglRectangle;
GType gegl_rectangle_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_RECTANGLE (gegl_rectangle_get_type())
typedef struct _GeglNode GeglNode;
GType gegl_node_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_NODE (gegl_node_get_type())
#define GEGL_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_NODE, GeglNode))
#define GEGL_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_NODE))
typedef struct _GeglProcessor GeglProcessor;
GType gegl_processor_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_PROCESSOR (gegl_processor_get_type())
#define GEGL_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PROCESSOR, GeglProcessor))
#define GEGL_IS_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PROCESSOR))
G_END_DECLS
#endif /* __GEGL_TYPES_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-paramspecs.h 0000644 0000000 0000000 00000021407 11272023566 020653 0 ustar root root /* 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 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 .
*
* Copyright 2003 Calvin Williamson
* 2006 Øyvind Kolås
*
* Original contents copied from gimp/app/core/gimpparamspecs.h
* (c) 1995-2006 Spencer Kimball, Peter Mattis and others.
*/
#include
#ifndef __GEGL_PARAM_SPECS_H__
#define __GEGL_PARAM_SPECS_H__
G_BEGIN_DECLS
/*
* Keep in sync with libgeglconfig/geglconfig-params.h
*/
#define GEGL_PARAM_NO_VALIDATE (1 << (6 + G_PARAM_USER_SHIFT))
/*
* GEGL_TYPE_INT32
*/
#define GEGL_TYPE_INT32 (gegl_int32_get_type ())
#define GEGL_VALUE_HOLDS_INT32(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GEGL_TYPE_INT32))
GType gegl_int32_get_type (void) G_GNUC_CONST;
/*
* GEGL_TYPE_PARAM_INT32
*/
#define GEGL_TYPE_PARAM_INT32 (gegl_param_int32_get_type ())
#define GEGL_PARAM_SPEC_INT32(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GEGL_TYPE_PARAM_INT32, GeglParamSpecInt32))
#define GEGL_IS_PARAM_SPEC_INT32(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_INT32))
typedef struct _GeglParamSpecInt32 GeglParamSpecInt32;
struct _GeglParamSpecInt32
{
GParamSpecInt parent_instance;
};
GType gegl_param_int32_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_int32 (const gchar *name,
const gchar *nick,
const gchar *blurb,
gint minimum,
gint maximum,
gint default_value,
GParamFlags flags);
/*
* GEGL_TYPE_INT16
*/
#define GEGL_TYPE_INT16 (gegl_int16_get_type ())
#define GEGL_VALUE_HOLDS_INT16(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GEGL_TYPE_INT16))
GType gegl_int16_get_type (void) G_GNUC_CONST;
/*
* GEGL_TYPE_PARAM_INT16
*/
#define GEGL_TYPE_PARAM_INT16 (gegl_param_int16_get_type ())
#define GEGL_PARAM_SPEC_INT16(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GEGL_TYPE_PARAM_INT16, GeglParamSpecInt16))
#define GEGL_IS_PARAM_SPEC_INT16(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_INT16))
typedef struct _GeglParamSpecInt16 GeglParamSpecInt16;
struct _GeglParamSpecInt16
{
GParamSpecInt parent_instance;
};
GType gegl_param_int16_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_int16 (const gchar *name,
const gchar *nick,
const gchar *blurb,
gint minimum,
gint maximum,
gint default_value,
GParamFlags flags);
/*
* GEGL_TYPE_INT8
*/
#define GEGL_TYPE_INT8 (gegl_int8_get_type ())
#define GEGL_VALUE_HOLDS_INT8(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
GEGL_TYPE_INT8))
GType gegl_int8_get_type (void) G_GNUC_CONST;
/*
* GEGL_TYPE_PARAM_INT8
*/
#define GEGL_TYPE_PARAM_INT8 (gegl_param_int8_get_type ())
#define GEGL_PARAM_SPEC_INT8(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GEGL_TYPE_PARAM_INT8, GeglParamSpecInt8))
#define GEGL_IS_PARAM_SPEC_INT8(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_INT8))
typedef struct _GeglParamSpecInt8 GeglParamSpecInt8;
struct _GeglParamSpecInt8
{
GParamSpecUInt parent_instance;
};
GType gegl_param_int8_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_int8 (const gchar *name,
const gchar *nick,
const gchar *blurb,
guint minimum,
guint maximum,
guint default_value,
GParamFlags flags);
/*
* GEGL_TYPE_PARAM_STRING
*/
#define GEGL_TYPE_PARAM_STRING (gegl_param_string_get_type ())
#define GEGL_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GEGL_TYPE_PARAM_STRING, GeglParamSpecString))
#define GEGL_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_STRING))
typedef struct _GeglParamSpecString GeglParamSpecString;
struct _GeglParamSpecString
{
GParamSpecString parent_instance;
guint no_validate : 1;
guint null_ok : 1;
};
GType gegl_param_string_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_string (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean no_validate,
gboolean null_ok,
const gchar *default_value,
GParamFlags flags);
/*
* GEGL_TYPE_PARAM_FILEPATH
*/
#define GEGL_TYPE_PARAM_FILE_PATH (gegl_param_file_path_get_type ())
#define GEGL_PARAM_SPEC_FILE_PATH(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GEGL_TYPE_PARAM_FILE_PATH, GeglParamSpecFilePath))
#define GEGL_IS_PARAM_SPEC_FILE_PATH(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_FILE_PATH))
typedef struct _GeglParamSpecFilePath GeglParamSpecFilePath;
struct _GeglParamSpecFilePath
{
GParamSpecString parent_instance;
guint no_validate : 1;
guint null_ok : 1;
};
GType gegl_param_file_path_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_file_path (const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean no_validate,
gboolean null_ok,
const gchar *default_value,
GParamFlags flags);
/*
* GEGL_TYPE_PARAM_MULTILINE
*/
#define GEGL_TYPE_PARAM_MULTILINE (gegl_param_multiline_get_type ())
#define GEGL_PARAM_SPEC_MULTILINE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GEGL_TYPE_PARAM_MULTILINE, GeglParamSpecMultiline))
#define GEGL_IS_PARAM_SPEC_MULTILINE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_MULTILINE))
typedef struct _GeglParamSpecMultiline GeglParamSpecMultiline;
struct _GeglParamSpecMultiline
{
GParamSpecString parent_instance;
guint no_validate : 1;
guint null_ok : 1;
};
GType gegl_param_multiline_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_multiline (const gchar *name,
const gchar *nick,
const gchar *blurb,
const gchar *default_value,
GParamFlags flags);
/*
* GEGL_TYPE_PARAM_ENUM
*/
#define GEGL_TYPE_PARAM_ENUM (gegl_param_enum_get_type ())
#define GEGL_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GEGL_TYPE_PARAM_ENUM, GeglParamSpecEnum))
#define GEGL_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_ENUM))
typedef struct _GeglParamSpecEnum GeglParamSpecEnum;
struct _GeglParamSpecEnum
{
GParamSpecEnum parent_instance;
GSList *excluded_values;
};
GType gegl_param_enum_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_enum (const gchar *name,
const gchar *nick,
const gchar *blurb,
GType enum_type,
gint default_value,
GParamFlags flags);
void gegl_param_spec_enum_exclude_value (GeglParamSpecEnum *espec,
gint value);
G_END_DECLS
#endif /* __GEGL_PARAM_SPECS_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-version.h 0000644 0000000 0000000 00000003170 11272023566 020177 0 ustar root root /* This file is the public GEGL API
*
* 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 .
*
* 2000-2008 © Calvin Williamson, Øyvind Kolås.
*/
#ifndef __GEGL_VERSION_H__
#define __GEGL_VERSION_H__
/***
* GEGL version information:
*
* These macros tell the version of GEGL you are compiling against.
* GEGL's version number consists of three parts: major, minor and
* micro.
*
* ---Code sample:
* #define GEGL_MAJOR_VERSION 0
* #define GEGL_MINOR_VERSION 1
* #define GEGL_MICRO_VERSION 0
*/
#define GEGL_MAJOR_VERSION 0
#define GEGL_MINOR_VERSION 1
#define GEGL_MICRO_VERSION 0
/**
* gegl_get_version:
* @major: a pointer to a int where the major version number will be stored
* @minor: ditto for the minor version number
* @micro: ditto for the micro version number
*
* This function fetches the version of the GEGL library being used by
* the running process.
*/
void gegl_get_version (int *major,
int *minor,
int *micro);
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-utils.h 0000644 0000000 0000000 00000014056 11272023566 017657 0 ustar root root /* 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 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 .
*
* Copyright 2003 Calvin Williamson
*/
#ifndef __GEGL_UTILS_H__
#define __GEGL_UTILS_H__
G_BEGIN_DECLS
/***
* GeglRectangle:
*
* GeglRectangles are used in #gegl_node_get_bounding_box and #gegl_node_blit
* for specifying rectangles.
*
*
struct GeglRectangle
* {
* gint x;
* gint y;
* gint width;
* gint height;
* };
*
*/
/**
* gegl_rectangle_set:
* @rectangle: a #GeglRectangle
* @x: upper left x coordinate
* @y: upper left y coordinate
* @width: width in pixels.
* @height: height in pixels.
*
* Sets the @x, @y, @width and @height on @rectangle.
*/
void gegl_rectangle_set (GeglRectangle *rectangle,
gint x,
gint y,
guint width,
guint height);
/**
* gegl_rectangle_equal:
* @rectangle1: a #GeglRectangle
* @rectangle2: a #GeglRectangle
*
* Check if two #GeglRectangles are equal.
*
* Returns TRUE if @rectangle and @rectangle2 are equal.
*/
gboolean gegl_rectangle_equal (const GeglRectangle *rectangle1,
const GeglRectangle *rectangle2);
/**
* gegl_rectangle_equal_coords:
* @rectangle: a #GeglRectangle
* @x: X coordinate
* @y: Y coordinate
* @width: width of rectangle
* @height: height of rectangle
*
* Check if a rectangle is equal to a set of parameters.
*
* Returns TRUE if @rectangle and @x,@y @width x @height are equal.
*/
gboolean gegl_rectangle_equal_coords (const GeglRectangle *rectangle,
gint x,
gint y,
gint width,
gint height);
/**
* gegl_rectangle_copy:
* @destination: a #GeglRectangle
* @source: a #GeglRectangle
*
* Copies the rectangle information stored in @source over the information in
* @destination.
*/
void gegl_rectangle_copy (GeglRectangle *destination,
const GeglRectangle *source);
/**
* gegl_rectangle_bounding_box:
* @destination: a #GeglRectangle
* @source1: a #GeglRectangle
* @source2: a #GeglRectangle
*
* Computes the bounding box of the rectangles @source1 and @source2 and stores the
* resulting bounding box in @destination.
*/
void gegl_rectangle_bounding_box (GeglRectangle *destination,
const GeglRectangle *source1,
const GeglRectangle *source2);
/**
* gegl_rectangle_intersect:
* @dest: return location for the intersection of @src1 and @src2, or NULL.
* @src1: a #GeglRectangle
* @src2: a #GeglRectangle
*
* Calculates the intersection of two rectangles. It is allows for dest to be the same
* as either @src1 or @src2. If the rectangles do not intersect, dest's width and height
* are set to 0 and its x and y values are undefined.
*
* Returns TRUE if the rectangles intersect.
*/
gboolean gegl_rectangle_intersect (GeglRectangle *dest,
const GeglRectangle *src1,
const GeglRectangle *src2);
/**
* gegl_rectangle_contains:
* @parent: a #GeglRectangle
* @child: a #GeglRectangle
*
* Checks if the #GeglRectangle @child is fully contained within @parent.
*
* Returns TRUE if the @child is fully contained in @parent.
*/
gboolean gegl_rectangle_contains (const GeglRectangle *parent,
const GeglRectangle *child);
/**
* gegl_rectangle_infinite_plane:
*
* Returns a GeglRectangle that represents an infininte plane.
*/
GeglRectangle gegl_rectangle_infinite_plane (void);
/**
* gegl_rectangle_is_infinite_plane:
* @rectangle: A GeglRectangle.
*
* Returns TRUE if the GeglRectangle represents an infininte plane,
* FALSE otherwise.
*/
gboolean gegl_rectangle_is_infinite_plane (const GeglRectangle *rectangle);
/**
* gegl_rectangle_dump:
* @rectangle: A GeglRectangle.
*
* For debugging purposes, not stable API.
*/
void gegl_rectangle_dump (const GeglRectangle *rectangle);
/***
* Aligned memory:
*
* GEGL provides functions to allocate and free buffers that are guaranteed to
* be on 16 byte aligned memory addresses.
*/
/**
* gegl_malloc:
* @n_bytes: the number of bytes to allocte.
*
* Allocates @n_bytes of memory. If n_bytes is 0 it returns NULL.
*
* Returns a pointer to the allocated memory.
*/
gpointer gegl_malloc (gsize n_bytes);
/**
* gegl_free:
* @mem: the memory to free.
*
* Frees the memory pointed to by @mem, if @mem is NULL it will warn and abort.
*/
void gegl_free (gpointer mem);
#define GEGL_FLOAT_EPSILON (1e-5)
#define GEGL_FLOAT_IS_ZERO(value) (_gegl_float_epsilon_zero ((value)))
#define GEGL_FLOAT_EQUAL(v1, v2) (_gegl_float_epsilon_equal ((v1), (v2)))
#define INT_MULT(a,b,t) ((t) = (a) * (b) + 0x80, ((((t) >> 8) + (t)) >> 8))
inline gint _gegl_float_epsilon_zero (float value);
gint _gegl_float_epsilon_equal (float v1,
float v2);
/***
*/
G_END_DECLS
#endif /* __GEGL_UTILS_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-matrix.h 0000644 0000000 0000000 00000007532 11272023566 020024 0 ustar root root #ifndef __GEGL_MATRIX_H__
#define __GEGL_MATRIX_H__
#include
G_BEGIN_DECLS
/***
* GeglMatrix:
*
* #GeglMatrix a 3x3 matrix for GEGL represented by the structure:
* Matrixes are currently used by #GeglPath and the affine operations,
* they might be used more centrally in the core of GEGL later.
*
* typedef gdouble GeglMatrix3 [3][3];
*/
typedef gdouble GeglMatrix3 [3][3];
/**
* gegl_matrix3_identity:
* @matrix: a #GeglMatrix
*
* Set the provided @matrix to the identity matrix.
*/
void gegl_matrix3_identity (GeglMatrix3 matrix);
/**
* gegl_matrix3_equal:
* @matrix1: a #GeglMatrix
* @matrix2: a #GeglMatrix
*
* Check if two matrices are equal.
*
* Returns TRUE if the matrices are equal.
*/
gboolean gegl_matrix3_equal (GeglMatrix3 matrix1,
GeglMatrix3 matrix2);
/**
* gegl_matrix3_is_identity:
* @matrix: a #GeglMatrix
*
* Check if a matrix is the identity matrix.
*
* Returns TRUE if the matrix is the identity matrix.
*/
gboolean gegl_matrix3_is_identity (GeglMatrix3 matrix);
/**
* gegl_matrix3_is_scale:
* @matrix: a #GeglMatrix
*
* Check if a matrix only does scaling.
*
* Returns TRUE if the matrix only does scaling.
*/
gboolean gegl_matrix3_is_scale (GeglMatrix3 matrix);
/**
* gegl_matrix3_is_translate:
* @matrix: a #GeglMatrix
*
* Check if a matrix only does translation.
*
* Returns TRUE if the matrix only does trasnlation.
*/
gboolean gegl_matrix3_is_translate (GeglMatrix3 matrix);
/**
* gegl_matrix3_copy:
* @dst: a #GeglMatrix
* @src: a #GeglMatrix
*
* Copies the matrix in @src into @dst.
*/
void gegl_matrix3_copy (GeglMatrix3 dst,
GeglMatrix3 src);
/**
* gegl_matrix3_determinant:
* @matrix: a #GeglMatrix
*
* Returns the determinant for the matrix.
*/
gdouble gegl_matrix3_determinant (GeglMatrix3 matrix);
/**
* gegl_matrix3_invert:
* @matrix: a #GeglMatrix
*
* Inverts @matrix.
*/
void gegl_matrix3_invert (GeglMatrix3 matrix);
/**
* gegl_matrix3_multiply:
* @left: a #GeglMatrix
* @right: a #GeglMatrix
* @product: a #GeglMatrix to store the result in.
*
* Multiples @product = @left · @right
*/
void gegl_matrix3_multiply (GeglMatrix3 left,
GeglMatrix3 right,
GeglMatrix3 product);
/**
* gegl_matrix3_originate:
* @matrix: a #GeglMatrix
* @x: x coordinate of new origin
* @y: y coordinate of new origin.
*
* Hmm not quite sure what this does.
*
*/
void gegl_matrix3_originate (GeglMatrix3 matrix,
gdouble x,
gdouble y);
/**
* gegl_matrix3_transform_point:
* @matrix: a #GeglMatrix
* @x: pointer to an x coordinate
* @y: pointer to an y coordinate
*
* transforms the coordinates provided in @x and @y and changes to the
* coordinates gotten when the transformed with the matrix.
*
*/
void gegl_matrix3_transform_point (GeglMatrix3 matrix,
gdouble *x,
gdouble *y);
/**
* gegl_matrix3_parse_string:
* @matrix: a #GeglMatrix
* @string: a string describing the matrix (right now a small subset of the
* transform strings allowed by SVG)
*
* Parse a transofmation matrix from a string.
*/
void gegl_matrix3_parse_string (GeglMatrix3 matrix,
const gchar *string);
/**
* gegl_matrix3_to_string:
* @matrix: a #GeglMatrix
*
* Serialize a #GeglMatrix to a string.
*
* Returns a freshly allocated string representing that #GeglMatrix, the
* returned string should be g_free()'d.
*
*/
gchar * gegl_matrix3_to_string (GeglMatrix3 matrix);
/***
*/
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-chant.h 0000644 0000000 0000000 00000100036 11272023566 017606 0 ustar root root /* gegl-chant contains incantations to that produce the boilerplate
* needed to write GEGL operation plug-ins. It abstracts away inheritance
* by giving a limited amount of base classes, and reduced creation of
* a properties struct and registration of properties for that structure to
* a minimum amount of code through use of the C preprocessor. You should
* look at the operations implemented using chanting (they #include this file)
* to see how it is used in practice.
*
* 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 .
*
* 2006-2008 © Øyvind Kolås.
*/
#ifndef GEGL_CHANT_C_FILE
#error "GEGL_CHANT_C_FILE not defined"
#endif
#include
GType gegl_chant_get_type (void);
typedef struct _GeglChantO GeglChantO;
typedef struct _GeglChant GeglChant;
static void gegl_chant_register_type (GTypeModule *module);
static void gegl_chant_init_properties (GeglChant *self);
static void gegl_chant_class_intern_init (gpointer klass);
static gpointer gegl_chant_parent_class = NULL;
#define GEGL_DEFINE_DYNAMIC_OPERATION(T_P) GEGL_DEFINE_DYNAMIC_OPERATION_EXTENDED (GEGL_CHANT_C_FILE, GeglChant, gegl_chant, T_P, 0, {})
#define GEGL_DEFINE_DYNAMIC_OPERATION_EXTENDED(C_FILE, TypeName, type_name, TYPE_PARENT, flags, CODE) \
static void type_name##_init (TypeName *self); \
static void type_name##_class_init (TypeName##Class *klass); \
static void type_name##_class_finalize (TypeName##Class *klass); \
static GType type_name##_type_id = 0; \
static void type_name##_class_chant_intern_init (gpointer klass) \
{ \
gegl_chant_parent_class = g_type_class_peek_parent (klass); \
type_name##_class_init ((TypeName##Class*) klass); \
gegl_chant_class_intern_init (klass); \
} \
GType \
type_name##_get_type (void) \
{ \
return type_name##_type_id; \
} \
static void \
type_name##_register_type (GTypeModule *type_module) \
{ \
gchar tempname[256]; \
gchar *p; \
GType g_define_type_id; \
const GTypeInfo g_define_type_info = \
{ \
sizeof (TypeName##Class), \
(GBaseInitFunc) NULL, \
(GBaseFinalizeFunc) NULL, \
(GClassInitFunc) type_name##_class_chant_intern_init, \
(GClassFinalizeFunc) type_name##_class_finalize, \
NULL, /* class_data */ \
sizeof (TypeName), \
0, /* n_preallocs */ \
(GInstanceInitFunc) type_name##_init, \
NULL /* value_table */ \
}; \
g_snprintf (tempname, sizeof (tempname), \
"%s", #TypeName GEGL_CHANT_C_FILE); \
for (p = tempname; *p; p++) \
if (*p=='.') *p='_'; \
\
type_name##_type_id = g_type_module_register_type (type_module, \
TYPE_PARENT, \
tempname, \
&g_define_type_info, \
(GTypeFlags) flags); \
g_define_type_id = type_name##_type_id; \
{ CODE ; } \
}
#define GEGL_CHANT_PROPERTIES(op) \
((GeglChantO *) (((GeglChant *) (op))->properties))
/****************************************************************************/
#ifdef GEGL_CHANT_TYPE_OPERATION
struct _GeglChant
{
GeglOperation parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION)
#endif
#ifdef GEGL_CHANT_TYPE_META
#include
struct _GeglChant
{
GeglOperationMeta parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationMetaClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_META)
#endif
#ifdef GEGL_CHANT_TYPE_SOURCE
struct _GeglChant
{
GeglOperationSource parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationSourceClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_SOURCE)
#endif
#ifdef GEGL_CHANT_TYPE_SINK
struct _GeglChant
{
GeglOperationSink parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationSinkClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_SINK)
#endif
#ifdef GEGL_CHANT_TYPE_FILTER
struct _GeglChant
{
GeglOperationFilter parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationFilterClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_FILTER)
#endif
#ifdef GEGL_CHANT_TYPE_COMPOSER
struct _GeglChant
{
GeglOperationComposer parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationComposerClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_COMPOSER)
#endif
#ifdef GEGL_CHANT_TYPE_COMPOSER3
struct _GeglChant
{
GeglOperationComposer3 parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationComposer3Class parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_COMPOSER3)
#endif
#ifdef GEGL_CHANT_TYPE_POINT_FILTER
struct _GeglChant
{
GeglOperationPointFilter parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationPointFilterClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_POINT_FILTER)
#endif
#ifdef GEGL_CHANT_TYPE_POINT_RENDER
struct _GeglChant
{
GeglOperationPointRender parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationPointRenderClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_POINT_RENDER)
#endif
#ifdef GEGL_CHANT_TYPE_TEMPORAL
struct _GeglChant
{
GeglOperationTemporal parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationTemporalClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_TEMPORAL)
#endif
#ifdef GEGL_CHANT_TYPE_AREA_FILTER
struct _GeglChant
{
GeglOperationAreaFilter parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationAreaFilterClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_AREA_FILTER)
#endif
#ifdef GEGL_CHANT_TYPE_POINT_COMPOSER
struct _GeglChant
{
GeglOperationPointComposer parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationPointComposerClass parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_POINT_COMPOSER)
#endif
#ifdef GEGL_CHANT_TYPE_POINT_COMPOSER3
struct _GeglChant
{
GeglOperationPointComposer3 parent_instance;
gpointer properties;
};
typedef struct
{
GeglOperationPointComposer3Class parent_class;
} GeglChantClass;
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_POINT_COMPOSER3)
#endif
#define GEGL_CHANT(obj) ((GeglChant*)(obj))
/* if GEGL_CHANT_CUSTOM is defined you have to provide the following
* code or your own implementation of it
*/
#ifndef GEGL_CHANT_CUSTOM
static void
gegl_chant_init (GeglChant *self)
{
gegl_chant_init_properties (self);
}
static void
gegl_chant_class_finalize (GeglChantClass *self)
{
}
static const GeglModuleInfo modinfo =
{
GEGL_MODULE_ABI_VERSION
};
/* prototypes added to silence warnings from gcc for -Wmissing-prototypes*/
gboolean gegl_module_register (GTypeModule *module);
const GeglModuleInfo * gegl_module_query (GTypeModule *module);
G_MODULE_EXPORT const GeglModuleInfo *
gegl_module_query (GTypeModule *module)
{
return &modinfo;
}
G_MODULE_EXPORT gboolean
gegl_module_register (GTypeModule *module)
{
gegl_chant_register_type (module);
return TRUE;
}
#endif
struct _GeglChantO
{
gpointer chant_data; /* Unused by the chanting framework can be used by operations
* for storage of a private struct, (remember to clean up
* in finalize). Also serves as a filler making sure that we
* do not create an empty struct if there are no chanted properties.
*/
#define gegl_chant_int(name, nick, min, max, def, blurb) gint name;
#define gegl_chant_double(name, nick, min, max, def, blurb) gdouble name;
#define gegl_chant_boolean(name, nick, def, blurb) gboolean name;
#define gegl_chant_string(name, nick, def, blurb) gchar *name;
#define gegl_chant_file_path(name, nick, def, blurb) gchar *name;
#define gegl_chant_multiline(name, nick, def, blurb) gchar *name;
#define gegl_chant_multiline(name, nick, def, blurb) gchar *name;
#define gegl_chant_object(name,nick, blurb) GObject *name;
#define gegl_chant_pointer(name, nick, blurb) gpointer name;
#define gegl_chant_color(name, nick, def, blurb) GeglColor *name;
#define gegl_chant_curve(name, nick, blurb) GeglCurve *name;
#define gegl_chant_path(name, nick, blurb) GeglPath *name;\
guint path_changed_handler;
#include GEGL_CHANT_C_FILE
#undef gegl_chant_int
#undef gegl_chant_double
#undef gegl_chant_boolean
#undef gegl_chant_string
#undef gegl_chant_file_path
#undef gegl_chant_multiline
#undef gegl_chant_multiline
#undef gegl_chant_object
#undef gegl_chant_pointer
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_path
};
#define GEGL_CHANT_OPERATION(obj) ((Operation*)(obj))
enum
{
PROP_0,
#define gegl_chant_int(name, nick, min, max, def, blurb) PROP_##name,
#define gegl_chant_double(name, nick, min, max, def, blurb) PROP_##name,
#define gegl_chant_boolean(name, nick, def, blurb) PROP_##name,
#define gegl_chant_string(name, nick, def, blurb) PROP_##name,
#define gegl_chant_file_path(name, nick, def, blurb) PROP_##name,
#define gegl_chant_multiline(name, nick, def, blurb) PROP_##name,
#define gegl_chant_object(name, nick, blurb) PROP_##name,
#define gegl_chant_pointer(name, nick, blurb) PROP_##name,
#define gegl_chant_color(name, nick, def, blurb) PROP_##name,
#define gegl_chant_curve(name, nick, blurb) PROP_##name,
#define gegl_chant_path(name, nick, blurb) PROP_##name,
#include GEGL_CHANT_C_FILE
#undef gegl_chant_int
#undef gegl_chant_double
#undef gegl_chant_boolean
#undef gegl_chant_string
#undef gegl_chant_file_path
#undef gegl_chant_multiline
#undef gegl_chant_object
#undef gegl_chant_pointer
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_path
PROP_LAST
};
static void
get_property (GObject *gobject,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GeglChantO *properties;
properties = GEGL_CHANT_PROPERTIES(gobject);
switch (property_id)
{
#define gegl_chant_int(name, nick, min, max, def, blurb) \
case PROP_##name: \
g_value_set_int (value, properties->name); \
break;
#define gegl_chant_double(name,nick, min, max, def, blurb) \
case PROP_##name: \
g_value_set_double (value, properties->name); \
break;
#define gegl_chant_boolean(name, nick, def, blurb) \
case PROP_##name: \
g_value_set_boolean (value, properties->name); \
break;
#define gegl_chant_string(name, nick, def, blurb) \
case PROP_##name: \
g_value_set_string (value, properties->name); \
break;
#define gegl_chant_file_path(name, nick, def, blurb) \
case PROP_##name: \
g_value_set_string (value, properties->name); \
break;
#define gegl_chant_multiline(name, nick, def, blurb) \
case PROP_##name: \
g_value_set_string (value, properties->name); \
break;
#define gegl_chant_object(name, nick, blurb) \
case PROP_##name: \
g_value_set_object (value, properties->name); \
break;
#define gegl_chant_pointer(name, nick, blurb) \
case PROP_##name: \
g_value_set_pointer (value, properties->name); \
break;
#define gegl_chant_color(name, nick, def, blurb) \
case PROP_##name: \
g_value_set_object (value, properties->name); \
break;
#define gegl_chant_curve(name, nick, blurb) \
case PROP_##name: \
g_value_set_object (value, properties->name); \
break;
#define gegl_chant_path(name, nick, blurb) \
case PROP_##name: \
if (!properties->name)properties->name = gegl_path_new (); /* this feels ugly */\
g_value_set_object (value, properties->name); \
break;/*XXX*/
#include GEGL_CHANT_C_FILE
#undef gegl_chant_int
#undef gegl_chant_double
#undef gegl_chant_boolean
#undef gegl_chant_string
#undef gegl_chant_file_path
#undef gegl_chant_multiline
#undef gegl_chant_object
#undef gegl_chant_pointer
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_path
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
break;
}
}
static void
set_property (GObject *gobject,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GeglChantO *properties;
properties = GEGL_CHANT_PROPERTIES(gobject);
switch (property_id)
{
#define gegl_chant_int(name, nick, min, max, def, blurb) \
case PROP_##name: \
properties->name = g_value_get_int (value); \
break;
#define gegl_chant_double(name, nick, min, max, def, blurb) \
case PROP_##name: \
properties->name = g_value_get_double (value); \
break;
#define gegl_chant_boolean(name, nick, def, blurb) \
case PROP_##name: \
properties->name = g_value_get_boolean (value); \
break;
#define gegl_chant_string(name, nick, def, blurb) \
case PROP_##name: \
if (properties->name) \
g_free (properties->name); \
properties->name = g_strdup (g_value_get_string (value)); \
break;
#define gegl_chant_file_path(name, nick, def, blurb) \
case PROP_##name: \
if (properties->name) \
g_free (properties->name); \
properties->name = g_strdup (g_value_get_string (value)); \
break;
#define gegl_chant_multiline(name, nick, def, blurb) \
case PROP_##name: \
if (properties->name) \
g_free (properties->name); \
properties->name = g_strdup (g_value_get_string (value)); \
break;
#define gegl_chant_object(name, nick, blurb) \
case PROP_##name: \
if (properties->name != NULL) \
g_object_unref (properties->name); \
properties->name = g_value_dup_object (value); \
break;
#define gegl_chant_pointer(name, nick, blurb) \
case PROP_##name: \
properties->name = g_value_get_pointer (value); \
break;
#define gegl_chant_color(name, nick, def, blurb) \
case PROP_##name: \
if (properties->name != NULL) \
g_object_unref (properties->name); \
properties->name = g_value_dup_object (value); \
break;
#define gegl_chant_curve(name, nick, blurb) \
case PROP_##name: \
if (properties->name != NULL) \
g_object_unref (properties->name); \
properties->name = g_value_dup_object (value); \
break;
#define gegl_chant_path(name, nick, blurb) \
case PROP_##name: \
if (properties->name != NULL) \
{\
if (properties->path_changed_handler) \
g_signal_handler_disconnect (G_OBJECT (properties->name), properties->path_changed_handler);\
properties->path_changed_handler = 0;\
} \
properties->name = NULL; \
if (g_value_peek_pointer (value)) \
{ \
properties->name = g_value_dup_object (value); \
properties->path_changed_handler = g_signal_connect (G_OBJECT (properties->name), "changed", \
G_CALLBACK(path_changed), gobject); \
}\
break; /*XXX*/
#include GEGL_CHANT_C_FILE
#undef gegl_chant_int
#undef gegl_chant_double
#undef gegl_chant_boolean
#undef gegl_chant_string
#undef gegl_chant_file_path
#undef gegl_chant_multiline
#undef gegl_chant_object
#undef gegl_chant_pointer
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_path
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
break;
}
}
static void gegl_chant_destroy_notify (gpointer data)
{
GeglChantO *properties = GEGL_CHANT_PROPERTIES (data);
#define gegl_chant_int(name, nick, min, max, def, blurb)
#define gegl_chant_double(name, nick, min, max, def, blurb)
#define gegl_chant_boolean(name, nick, def, blurb)
#define gegl_chant_string(name, nick, def, blurb) \
if (properties->name) \
{ \
g_free (properties->name); \
properties->name = NULL; \
}
#define gegl_chant_file_path(name, nick, def, blurb) \
if (properties->name) \
{ \
g_free (properties->name); \
properties->name = NULL; \
}
#define gegl_chant_multiline(name, nick, def, blurb)\
if (properties->name) \
{ \
g_free (properties->name); \
properties->name = NULL; \
}
#define gegl_chant_object(name, nick, blurb) \
if (properties->name) \
{ \
g_object_unref (properties->name); \
properties->name = NULL; \
}
#define gegl_chant_pointer(name, nick, blurb)
#define gegl_chant_color(name, nick, def, blurb) \
if (properties->name) \
{ \
g_object_unref (properties->name); \
properties->name = NULL; \
}
#define gegl_chant_curve(name, nick, blurb) \
if (properties->name) \
{\
g_object_unref (properties->name); \
properties->name = NULL; \
}
#define gegl_chant_path(name, nick, blurb) \
if (properties->name) \
{ \
g_object_unref (properties->name); \
properties->name = NULL; \
}
#include GEGL_CHANT_C_FILE
#undef gegl_chant_int
#undef gegl_chant_double
#undef gegl_chant_boolean
#undef gegl_chant_string
#undef gegl_chant_file_path
#undef gegl_chant_multiline
#undef gegl_chant_object
#undef gegl_chant_pointer
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_path
g_slice_free (GeglChantO, properties);
}
static GObject *
gegl_chant_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
GObject *obj;
GeglChantO *properties;
obj = G_OBJECT_CLASS (gegl_chant_parent_class)->constructor (
type, n_construct_properties, construct_properties);
/* create dummy colors and vectors */
properties = GEGL_CHANT_PROPERTIES (obj);
#define gegl_chant_int(name, nick, min, max, def, blurb)
#define gegl_chant_double(name, nick, min, max, def, blurb)
#define gegl_chant_boolean(name, nick, def, blurb)
#define gegl_chant_string(name, nick, def, blurb)
#define gegl_chant_file_path(name, nick, def, blurb)
#define gegl_chant_multiline(name, nick, def, blurb)
#define gegl_chant_object(name, nick, blurb)
#define gegl_chant_pointer(name, nick, blurb)
#define gegl_chant_color(name, nick, def, blurb) \
if (properties->name == NULL) \
{properties->name = gegl_color_new(def?def:"black");}
#define gegl_chant_path(name, nick, blurb)
#define gegl_chant_curve(name, nick, blurb)
#include GEGL_CHANT_C_FILE
#undef gegl_chant_int
#undef gegl_chant_double
#undef gegl_chant_boolean
#undef gegl_chant_string
#undef gegl_chant_file_path
#undef gegl_chant_multiline
#undef gegl_chant_object
#undef gegl_chant_pointer
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_path
g_object_set_data_full (obj, "chant-data", obj, gegl_chant_destroy_notify);
return obj;
}
static void
gegl_chant_class_intern_init (gpointer klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->constructor = gegl_chant_constructor;
#define gegl_chant_int(name, nick, min, max, def, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
g_param_spec_int (#name, nick, blurb, \
min, max, def, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_double(name, nick, min, max, def, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
g_param_spec_double (#name, nick, blurb, \
min, max, def, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_boolean(name, nick, def, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
g_param_spec_boolean (#name, nick, blurb, \
def, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_string(name, nick, def, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
g_param_spec_string (#name, nick, blurb, \
def, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_file_path(name, nick, def, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
gegl_param_spec_file_path (#name, nick, blurb, \
FALSE, FALSE, \
def, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_multiline(name, nick, def, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
gegl_param_spec_multiline (#name, nick, blurb, \
def, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_object(name, nick, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
g_param_spec_object (#name, nick, blurb, \
G_TYPE_OBJECT, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_pointer(name, nick, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
g_param_spec_pointer (#name, nick, blurb, \
(GParamFlags) ( \
G_PARAM_READWRITE | \
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_color(name, nick, def, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
gegl_param_spec_color_from_string (#name, nick, blurb,\
def, \
(GParamFlags) ( \
G_PARAM_READWRITE |\
G_PARAM_CONSTRUCT | \
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_path(name, nick, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
gegl_param_spec_path (#name, nick, blurb,\
NULL, \
(GParamFlags) ( \
G_PARAM_READWRITE |\
G_PARAM_CONSTRUCT |\
GEGL_PARAM_PAD_INPUT)));
#define gegl_chant_curve(name, nick, blurb) \
g_object_class_install_property (object_class, PROP_##name, \
gegl_param_spec_curve (#name, nick, blurb,\
gegl_curve_default_curve(),\
(GParamFlags) ( \
G_PARAM_READWRITE |\
G_PARAM_CONSTRUCT |\
GEGL_PARAM_PAD_INPUT)));
#include GEGL_CHANT_C_FILE
#undef gegl_chant_int
#undef gegl_chant_double
#undef gegl_chant_boolean
#undef gegl_chant_string
#undef gegl_chant_file_path
#undef gegl_chant_multiline
#undef gegl_chant_object
#undef gegl_chant_pointer
#undef gegl_chant_color
#undef gegl_chant_curve
#undef gegl_chant_path
}
static void
gegl_chant_init_properties (GeglChant *self)
{
self->properties = g_slice_new0 (GeglChantO);
}
/****************************************************************************/
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-path.h 0000644 0000000 0000000 00000033614 11272023566 017454 0 ustar root root /* 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 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 .
*
* Copyright 2007 Øyvind Kolås
*/
/***
* GeglPath:
*
* GeglPath is GEGLs means of storing the nodes and other knots and the
* instructions for rendering 2d paths like poly lines, bezier curves and other
* curve representations.
*/
#ifndef __GEGL_PATH_H__
#define __GEGL_PATH_H__
#include
#include
G_BEGIN_DECLS
#define GEGL_TYPE_PATH (gegl_path_get_type ())
#define GEGL_PATH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PATH, GeglPath))
#define GEGL_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_PATH, GeglPathClass))
#define GEGL_IS_PATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PATH))
#define GEGL_IS_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_PATH))
#define GEGL_PATH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_PATH, GeglPathClass))
typedef struct _GeglPathClass GeglPathClass;
struct _GeglPath
{
GObject parent_instance;
};
GType gegl_path_get_type (void) G_GNUC_CONST;
/* Internally the following structures are used, parts
* of the internal implementation are exposed through
* the path access API. The linked list api is currently
* only used for adding new path interpolators/flatteners
* with new knot interpretations.
*/
#ifndef GEGL_PATH_INTERNAL
/**
* GeglPathItem:
*
* A #GeglPathItem contains the type of instruction to perform as
* well as it's arguments. In the public API the PathItem always has
* 4 points internally only the needed amount of memory is stored
* for a GeglPathItem.
*
*
typedef struct Point
* {
* gfloat x;
* gfloat y;
* } Point;
* typedef struct GeglPathItem
* {
* gchar type;
* Point point[4];
* } GeglPathItem;
*
*/
typedef struct Point
{
gfloat x;
gfloat y;
} Point;
typedef struct GeglPathItem
{
gchar type; /* should perhaps be padded out? */
Point point[4]; /* Note: internally GeglPath operates with paths that
* have the exact number of pairs allocated.
*/
} GeglPathItem;
#endif
/**
* gegl_path_new:
*
* Creates a new #GeglPath with no nodes.
*
* Returns the newly created #GeglPath
*/
GeglPath * gegl_path_new (void);
/**
* gegl_path_new_from_string:
* @instructions: a string describing the path.
*
* Creates a new #GeglPath with the nodes described in the string
* @instructions. See gegl_path_parse_string() for details of the
* format of the string.
*
* Returns the newly created #GeglPath
*/
GeglPath * gegl_path_new_from_string(const gchar *instructions);
/**
* gegl_path_is_empty:
* @path: a #GeglPath
*
* Check if the path contains any nodes.
*
* Returns TRUE if the path has no nodes.
*/
gboolean gegl_path_is_empty (GeglPath *path);
/**
* gegl_path_get_n_nodes:
* @path: a #GeglPath
*
* Retrieves the number of nodes in the path.
*
* Return value: the number of nodes in the path.
*/
gint gegl_path_get_n_nodes (GeglPath *path);
/**
* gegl_path_get_length:
* @path: a #GeglPath
*
* Returns the total length of the path.
*
* Return value: the length of the path.
*/
gdouble gegl_path_get_length (GeglPath *path);
/**
* gegl_path_get_node:
* @path: a #GeglPath
* @index: the node number to retrieve
* @node: a pointer to a #GeglPathItem record to be written.
*
* Retrieve the node of the path at positiong @pos.
*
* Returns TRUE if the node was succesfully retrieved.
*/
gboolean gegl_path_get_node (GeglPath *path,
gint index,
GeglPathItem *node);
/**
* gegl_path_to_string:
* @path: a #GeglPath
*
* Serialize the paths nodes to a string.
*
* Return value: return a string with instructions describing the string you
* need to free this with g_free().
*/
gchar * gegl_path_to_string (GeglPath *path);
/**
* gegl_path_set_matrix:
* @path: a #GeglPath
* @matrix: a GeglMatrix3
*
* Set the matrix of the path, the path is thransformed through this
* matrix when being evaluated. Causing the calcuated positions and
* length to be changed by the transform.
*/
void gegl_path_set_matrix (GeglPath *path,
GeglMatrix3 matrix);
/**
* gegl_path_get_matrix:
* @path: a #GeglPath
* @matrix: a GeglMatrix3
*
* Retrieve the node of the path at positiong @pos.
*
* Return value: pointer to the node of the path at position @pos or NULL if no
* such node.
*/
void gegl_path_get_matrix (GeglPath *path,
GeglMatrix3 matrix);
/**
* gegl_path_closest_point:
* @path: a #GeglPath
* @x: x coordinate.
* @y: y coordinate
* @on_path_x: return location for x coordinate on the path that was closest
* @on_path_y: return location for y coordinate on the path that was closest
* @node_pos_before: the node position interpreted before this position
* was deemed the closest coordinate.
*
* Figure out what and where on a path is closest to arbitrary coordinates.
*
* Returns the length along the path where the closest point was encountered.
*/
gdouble gegl_path_closest_point (GeglPath *path,
gdouble x,
gdouble y,
gdouble *on_path_x,
gdouble *on_path_y,
gint *node_pos_before);
/**
* gegl_path_calc:
* @path: a #GeglPath
* @pos: how far along the path.
* @x: return location for x coordinate.
* @y: return locateion for y coordinate
*
* Compute the coordinates of the path at the @position (length measured from
* start of path, not including discontinuities).
*/
void gegl_path_calc (GeglPath *path,
gdouble pos,
gdouble *x,
gdouble *y);
/**
* gegl_path_calc_values:
* @path: a #GeglPath
* @num_samples: number of samples to compute
* @xs: return location for x coordinates
* @ys: return location for y coordinates
*
* Copmute @num_samples for a path into the provided arrays @xs and @ys
* the returned values include the start and end positions of the path.
*/
void gegl_path_calc_values (GeglPath *path,
guint num_samples,
gdouble *xs,
gdouble *ys);
/**
* gegl_path_get_bounds:
* @self: a #GeglPath.
* @min_x: return location for minimum x coordinate
* @max_x: return location for maximum x coordinate
* @min_y: return location for minimum y coordinate
* @max_y: return location for maximum y coordinate
*
* Compute the bounding box of a path.
*/
void gegl_path_get_bounds (GeglPath *self,
gdouble *min_x,
gdouble *max_x,
gdouble *min_y,
gdouble *max_y);
/* XXX: LP and RP are nasty hacks because the GEGL docs code scanner gets
* confused, need to be fixed there
*/
#define LP (
#define RP )
typedef void LP *GeglNodeFunction RP LP const GeglPathItem *node,
gpointer user_data RP;
#undef LP
#undef RP
/**
* gegl_path_foreach:
* @path: a #GeglPath
* @each_item: a function to call for each node in the path.
* @user_data: user data to pass to the function (in addition to the GeglPathItem).
*
* Execute a provided function for every node in the path (useful for
* drawing and otherwise traversing a path.)
*/
void gegl_path_foreach (GeglPath *path,
GeglNodeFunction each_item,
gpointer user_data);
/**
* gegl_path_foreach_flat:
* @path: a #GeglPath
* @each_item: a function to call for each node in the path.
* @user_data: user data to pass to a node.
*
* Execute a provided function for the segments of a poly line approximating
* the path.
*/
void gegl_path_foreach_flat (GeglPath *path,
GeglNodeFunction each_item,
gpointer user_data);
/**
* gegl_path_clear:
* @path: a #GeglPath
*
* Remove all nods from a @path.
*/
void gegl_path_clear (GeglPath *path);
/**
* gegl_path_insert_node:
* @path: a #GeglPath
* @pos: the position we want the new node to have.
* @node: pointer to a structure describing the GeglPathItem we want to store
*
* Insert the new node @node at position @pos in @path.
*/
void gegl_path_insert_node (GeglPath *path,
gint pos,
const GeglPathItem *node);
/**
* gegl_path_replace_node:
* @path: a #GeglPath
* @pos: the position we want the new node to have.
* @node: pointer to a structure describing the GeglPathItem we want to store.
*
* Replaces the exiting node at position @pos in @path.
*/
void gegl_path_replace_node (GeglPath *path,
gint pos,
const GeglPathItem *node);
/**
* gegl_path_remove_node:
* @path: a #GeglPath
* @pos: a node in the path.
*
* Removes the node number @pos in @path.
*/
void gegl_path_remove_node (GeglPath *path,
gint pos);
/**
* gegl_path_parse_string:
* @path: a #GeglPath
* @instructions: a string describing a path.
*
* Parses @instructions and appends corresponding nodes to path (call
* gegl_path_clean() first if you want to replace the existing path.
*/
void gegl_path_parse_string (GeglPath *path,
const gchar *instructions);
/**
* gegl_path_append:
* @path: a #GeglPath
* @...: first instruction.
*
* Use as follows: gegl_path_append (path, 'M', 0.0, 0.0);
* and gegl_path_append (path, 'C', 10.0, 10.0, 50.0, 10.0, 60.0, 0.0) the
* number of arguments are determined from the instruction provided.
*
*/
void gegl_path_append (GeglPath *path,
...);
/**
* gegl_path_freeze:
* @path: a @GeglPath
*
* Make the @GeglPath stop firing signals as it changes must be paired with a
* gegl_path_thaw() for the signals to start again.
*/
void gegl_path_freeze (GeglPath *path);
/**
* gegl_path_thaw:
* @path: a @GeglPath
*
* Restart firing signals (unless the path has been frozen multiple times).
*/
void gegl_path_thaw (GeglPath *path);
/***
* :
*/
GParamSpec * gegl_param_spec_path (const gchar *name,
const gchar *nick,
const gchar *blurb,
GeglPath *default_path,
GParamFlags flags);
#define GEGL_TYPE_PARAM_PATH (gegl_param_path_get_type ())
#define GEGL_IS_PARAM_PATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PARAM_PATH))
GType gegl_param_path_get_type (void) G_GNUC_CONST;
gint gegl_path_type_get_n_items (gchar type);
/**
* gegl_path_add_type:
* @type: a gchar to recognize in path descriptions.
* @items: the number of floating point data items the instruction takes
* @description: a human readable description of this entry
*
* Adds a new type to the path system, FIXME this should probably
* return something on registration conflicts, for now it expects
* all registered paths to be aware of each other.
*/
void gegl_path_add_type (gchar type,
gint items,
const gchar *description);
/* Linked list used internally, and for the plug-in API for new path
* interpolators.
*/
typedef struct GeglPathList
{
struct GeglPathList *next;
GeglPathItem d;
} GeglPathList;
/* appends to path list, if head is NULL a new list is created */
GeglPathList * gegl_path_list_append (GeglPathList *head, ...);
/* frees up a path list */
GeglPathList * gegl_path_list_destroy (GeglPathList *path);
/* prototype of function passed to gegl_path_add_flattener() */
typedef GeglPathList *(*GeglFlattenerFunc) (GeglPathList *original);
/* Add a new flattener, the flattener should produce a type of path that
* GeglPath already understands, if the flattener is unable to flatten
* the incoming path (doesn't understand the instructions), the original
* path should be returned.
*/
void gegl_path_add_flattener (GeglFlattenerFunc func);
G_END_DECLS
#endif /* __GEGL_PATH_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-buffer.h 0000644 0000000 0000000 00000037343 11272023566 017774 0 ustar root root /* This file is part of GEGL.
*
* This library 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.
*
* This library 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 this library; if not, see .
*
* Copyright 2006, 2007 Øyvind Kolås
*/
#ifndef __GEGL_BUFFER_H__
#define __GEGL_BUFFER_H__
#include
#include
G_BEGIN_DECLS
#define GEGL_TYPE_BUFFER (gegl_buffer_get_type ())
#define GEGL_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_BUFFER, GeglBuffer))
#ifndef __GEGL_BUFFER_TYPES_H__
typedef struct _GeglBuffer GeglBuffer;
#endif
/***
* GeglBuffer:
*
* GeglBuffer is the API used by GEGL for storing and retrieving raster data.
* GeglBuffer heavily relies on babl for translation and description of
* different pixel formats.
*
* Internally GeglBuffer currently uses a tiled mipmap pyramid structure that
* can be swapped to disk. In the future GeglBuffer might also support a linear
* backend, a GPU memory backend and a network backend for buffers.
*/
GType gegl_buffer_get_type (void) G_GNUC_CONST;
/**
* gegl_buffer_new:
* @extent: the geometry of the buffer (origin, width and height) a
* GeglRectangle.
* @format: the Babl pixel format to be used, create one with babl_format("RGBA
* u8") and similar.
*
* Create a new GeglBuffer of a given format with a given extent. It is
* possible to pass in NULL for both extent and format, a NULL extent creates
* an empty buffer and a NULL format makes the buffer default to "RGBA float".
*/
GeglBuffer* gegl_buffer_new (const GeglRectangle *extent,
const Babl *format);
/**
* gegl_buffer_open:
* @path: the path to a gegl buffer on disk.
*
* Open an existing on-disk GeglBuffer, this buffer is opened in a monitored
* state so multiple instances of gegl can share the same buffer. Sets on
* one buffer are reflected in the other.
*
* Returns: a GeglBuffer object.
*/
GeglBuffer* gegl_buffer_open (const gchar *path);
/**
* gegl_buffer_save:
* @buffer: a #GeglBuffer.
* @path: the path where the gegl buffer will be saved, any writable GIO uri is valid.
* @roi: the region of interest to write, this is the tiles that will be collected and
* written to disk.
*
* Write a GeglBuffer to a file.
*/
void gegl_buffer_save (GeglBuffer *buffer,
const gchar *path,
const GeglRectangle *roi);
/**
* gegl_buffer_load:
* @path: the path to a gegl buffer on disk.
*
* Loads an existing GeglBuffer from disk, if it has previously been saved with
* gegl_buffer_save it should be possible to open through any GIO transport, buffers
* that have been used as swap needs random access to be opened.
*
* Returns: a #GeglBuffer object.
*/
GeglBuffer *gegl_buffer_load (const gchar *path);
/**
* gegl_buffer_flush:
* @buffer: a #GeglBuffer
*
* Flushes all unsaved data to disk, this is not neccesary for shared
* geglbuffers opened with gegl_buffer_open since they auto-sync on writes.
*/
void gegl_buffer_flush (GeglBuffer *buffer);
/**
* gegl_buffer_create_sub_buffer:
* @buffer: parent buffer.
* @extent: coordinates of new buffer.
*
* Create a new sub GeglBuffer, that is a view on a larger buffer.
*/
GeglBuffer* gegl_buffer_create_sub_buffer (GeglBuffer *buffer,
const GeglRectangle *extent);
/**
* gegl_buffer_destroy:
* @buffer: the buffer we're done with.
*
* Destroys a buffer and frees up the resources used by a buffer, internally
* this is done with reference counting and gobject, and gegl_buffer_destroy
* is a thin wrapper around g_object_unref.
**/
void gegl_buffer_destroy (GeglBuffer *buffer);
/**
* gegl_buffer_get_extent:
* @buffer: the buffer to operate on.
*
* Returns a pointer to a GeglRectangle structure defining the geometry of a
* specific GeglBuffer, this is also the default width/height of buffers passed
* in to gegl_buffer_set and gegl_buffer_get (with a scale of 1.0 at least).
*/
const GeglRectangle * gegl_buffer_get_extent (GeglBuffer *buffer);
/**
* gegl_buffer_set_extent:
* @buffer: the buffer to operate on.
* @extent: new extent.
*
* Changes the size and position that is considered active in a buffer, this
* operation is valid on any buffer, reads on subbuffers outside the master
* buffer's extent are at the moment undefined.
*
* Returns TRUE if the change of extent was succesful.
*/
gboolean gegl_buffer_set_extent (GeglBuffer *buffer,
const GeglRectangle *extent);
/* convenience access macros */
/**
* gegl_buffer_get_x:
* @buffer: a GeglBuffer
*
* Evaluates to the X coordinate of the upper left corner of the buffer's extent.
*/
#define gegl_buffer_get_x(buffer) (gegl_buffer_get_extent(buffer)->x)
/**
* gegl_buffer_get_y:
* @buffer: a GeglBuffer
*
* Evaluates to the Y coordinate of the upper left corner of the buffer's extent.
*/
#define gegl_buffer_get_y(buffer) (gegl_buffer_get_extent(buffer)->y)
/**
* gegl_buffer_get_width:
* @buffer: a GeglBuffer
*
* Evaluates to the width of the buffer's extent.
*/
#define gegl_buffer_get_width(buffer) (gegl_buffer_get_extent(buffer)->width)
/**
* gegl_buffer_get_height:
* @buffer: a GeglBuffer
*
* Evaluates to the height of the buffer's extent.
*/
#define gegl_buffer_get_height(buffer) (gegl_buffer_get_extent(buffer)->height)
/**
* gegl_buffer_get_pixel_count:
* @buffer: a GeglBuffer
*
* Returns the number of pixels of the extent of the buffer.
*/
#define gegl_buffer_get_pixel_count(buffer) (gegl_buffer_get_width(buffer) * gegl_buffer_get_height(buffer))
#ifndef GEGL_AUTO_ROWSTRIDE
#define GEGL_AUTO_ROWSTRIDE 0
#endif
/**
* gegl_buffer_get:
* @buffer: the buffer to retrieve data from.
* @scale: sampling scale, 1.0 = pixel for pixel 2.0 = magnify, 0.5 scale down.
* @rect: the coordinates we want to retrieve data from, and width/height of
* destination buffer, if NULL equal to the extent of the buffer. The
* coordinates and dimensions are after scale has been applied.
* @format: the BablFormat to store in the linear buffer @dest.
* @dest: the memory destination for a linear buffer for the pixels, the size needed
* depends on the requested BablFormat.
* @rowstride: rowstride in bytes, or GEGL_AUTO_ROWSTRIDE to compute the
* rowstride based on the width and bytes per pixel for the specified format.
*
* Fetch a rectangular linear buffer of pixel data from the GeglBuffer, the
* data is converted to the desired BablFormat, if the BablFormat stored and
* fetched is the same this amounts to a series of memcpy's aligned to demux
* the tile structure into a linear buffer.
*/
void gegl_buffer_get (GeglBuffer *buffer,
gdouble scale,
const GeglRectangle *rect,
const Babl *format,
gpointer dest,
gint rowstride);
/**
* gegl_buffer_set:
* @buffer: the buffer to modify.
* @rect: the coordinates we want to change the data of and the width/height extent, if NULL equal to the extent of the buffer.
* @format: the babl_format the linear buffer @src.
* @src: linear buffer of image data to be stored in @buffer.
* @rowstride: rowstride in bytes, or GEGL_AUTO_ROWSTRIDE to compute the
* rowstride based on the width and bytes per pixel for the specified format.
*
* Store a linear raster buffer into the GeglBuffer.
*/
void gegl_buffer_set (GeglBuffer *buffer,
const GeglRectangle *rect,
const Babl *format,
void *src,
gint rowstride);
/**
* gegl_buffer_get_format:
* @buffer: a #GeglBuffer
*
* Get the native babl format of the buffer.
*
* Returns: the babl format used for storing pixels in the buffer.
*
*/
const Babl *gegl_buffer_get_format (GeglBuffer *buffer);
/**
* gegl_buffer_clear:
* @buffer: a #GeglBuffer
* @roi: a rectangular region
*
* Clears the provided rectangular region by setting all the associated memory
* to 0
*/
void gegl_buffer_clear (GeglBuffer *buffer,
const GeglRectangle *roi);
/**
* gegl_buffer_copy:
* @src: source buffer.
* @src_rect: source rectangle (or NULL to copy entire source buffer)
* @dst: destination buffer.
* @dst_rect: position of upper left destination pixel, or NULL for top
* left coordinates of the buffer extents.
*
* copies a region from source buffer to destination buffer.
*
* If the babl_formats of the buffers are the same, and the tile boundaries
* align, this should optimally lead to shared tiles that are copy on write,
* this functionality is not implemented yet.
*/
void gegl_buffer_copy (GeglBuffer *src,
const GeglRectangle *src_rect,
GeglBuffer *dst,
const GeglRectangle *dst_rect);
/**
* gegl_buffer_dup:
* @buffer: the GeglBuffer to duplicate.
*
* duplicate a buffer (internally uses gegl_buffer_copy), this should ideally
* lead to a buffer that shares the raster data with the original on a tile
* by tile COW basis. This is not yet implemented
*/
GeglBuffer * gegl_buffer_dup (GeglBuffer *buffer);
typedef enum {
GEGL_INTERPOLATION_NEAREST = 0,
GEGL_INTERPOLATION_LINEAR,
GEGL_INTERPOLATION_CUBIC,
GEGL_INTERPOLATION_LANCZOS,
GEGL_INTERPOLATION_SHARP,
GEGL_INTERPOLATION_YAFR
} GeglInterpolation;
/**
* gegl_buffer_sample:
* @buffer: the GeglBuffer to sample from
* @x: x coordinate to sample in buffer coordinates
* @y: y coordinate to sample in buffer coordinates
* @scale: the scale we're fetching at (<1.0 can lead to decimation)
* @dest: buffer capable of storing one pixel in @format.
* @format: the format to store the sampled color in.
* @interpolation: the interpolation behavior to use, currently only nearest
* neighbour is implemented for this API, bilinear, bicubic and lanczos needs
* to be ported from working code. Valid values: GEGL_INTERPOLATION_NEAREST and
* GEGL_INTERPOLATION_LINEAR, GEGL_INTERPOLATON_CUBIC and
* GEGL_INTERPOLATION_LANCZOS.
*
* Query interpolate pixel values at a given coordinate using a specified form
* of interpolation. The samplers used cache for a small neighbourhood of the
* buffer for more efficient access.
*/
void gegl_buffer_sample (GeglBuffer *buffer,
gdouble x,
gdouble y,
gdouble scale,
gpointer dest,
const Babl *format,
GeglInterpolation interpolation);
/**
* gegl_buffer_sample_cleanup:
* @buffer: the GeglBuffer to sample from
*
* Clean up resources used by sampling framework of buffer (will be freed
* automatically later when the buffer is destroyed, for long lived buffers
* cleaning up the sampling infrastructure when it has been used for its
* purpose will sometimes be more efficient).
*/
void gegl_buffer_sample_cleanup (GeglBuffer *buffer);
/**
* gegl_buffer_interpolation_from_string:
* @string: the string to look up
*
* Looks up the GeglInterpolation corresponding to a string, if no matching
* interpolation is found returns GEGL_INTERPOLATION_NEAREST.
*/
GeglInterpolation gegl_buffer_interpolation_from_string (const gchar *string);
/**
* gegl_buffer_linear_new:
* @extent: dimensions of buffer.
* @format: desired pixel format.
*
* Creates a GeglBuffer backed by a linear memory buffer, of the given
* @extent in the specified @format. babl_format ("R'G'B'A u8") for instance
* to make a normal 8bit buffer.
*
* Returns: a GeglBuffer that can be used as any other GeglBuffer.
*/
GeglBuffer *gegl_buffer_linear_new (const GeglRectangle *extent,
const Babl *format);
/**
* gegl_buffer_linear_new_from_data:
* @data: a pointer to a linear buffer in memory.
* @format: the format of the data in memory
* @extent: the dimensions (and upper left coordinates) of linear buffer.
* @rowstride: the number of bytes between rowstarts in memory (or 0 to
* autodetect)
* @destroy_fn: function to call to free data or NULL if memory should not be
* freed.
* @destroy_fn_data: extra argument to be passed to void destroy(ptr, data) type
* function.
*
* Creates a GeglBuffer backed by a linear memory buffer that already exists,
* of the given @extent in the specified @format. babl_format ("R'G'B'A u8")
* for instance to make a normal 8bit buffer.
*
* Returns: a GeglBuffer that can be used as any other GeglBuffer.
*/
GeglBuffer * gegl_buffer_linear_new_from_data (const gpointer data,
const Babl *format,
const GeglRectangle *extent,
gint rowstride,
GCallback destroy_fn,
gpointer destroy_fn_data);
/**
* gegl_buffer_linear_open:
* @buffer: a #GeglBuffer.
* @extent: region to open, pass NULL for entire buffer.
* @rowstride: return location for rowstride.
* @format: desired format or NULL to use buffers format.
*
* Raw direct random access to the full data of a buffer in linear memory.
*
* Returns: a pointer to a linear memory region describing the buffer, if the
* request is compatible with the underlying data storage direct access
* to the underlying data is provided.
*/
gpointer *gegl_buffer_linear_open (GeglBuffer *buffer,
const GeglRectangle *extent,
gint *rowstride,
const Babl *format);
/**
* gegl_buffer_linear_close:
* @buffer: a #GeglBuffer.
* @linear: a previously returned buffer.
*
* This function makes sure GeglBuffer and underlying code is aware of changes
* being made to the linear buffer. If the request was not a compatible one
* it is written back to the buffer. Multiple concurrent users can be handed
* the same buffer (both raw access and converted).
*/
void gegl_buffer_linear_close (GeglBuffer *buffer,
gpointer linear);
/**
*/
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-plugin.h 0000644 0000000 0000000 00000007304 11272023566 020013 0 ustar root root /* 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 .
*
* 2000-2008 Øyvind Kolås.
*/
#ifndef __GEGL_PLUGIN_H__
#define __GEGL_PLUGIN_H__
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include
#include
#include
/* Extra types needed when coding operations */
typedef struct _GeglOperation GeglOperation;
typedef struct _GeglOperationContext GeglOperationContext;
typedef struct _GeglPad GeglPad;
typedef struct _GeglConnection GeglConnection;
#include
#include
#include
#include
#include
typedef struct _GeglModule GeglModule;
typedef struct _GeglModuleInfo GeglModuleInfo;
typedef struct _GeglModuleDB GeglModuleDB;
/***
* Writing GEGL operations
*
*/
/*#include */
/* 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.
*/
#define GEGL_MODULE_ABI_VERSION 0x000A
struct _GeglModuleInfo
{
guint32 abi_version;
};
GType gegl_module_register_type (GTypeModule *module,
GType parent_type,
const gchar *type_name,
const GTypeInfo *type_info,
GTypeFlags flags);
GeglBuffer *gegl_operation_context_get_source (GeglOperationContext *self,
const gchar *padname);
GeglBuffer *gegl_operation_context_get_target (GeglOperationContext *self,
const gchar *padname);
void gegl_operation_context_take_object(GeglOperationContext *context,
const gchar *padname,
GObject *data);
void gegl_extension_handler_register (const gchar *extension,
const gchar *handler);
const gchar * gegl_extension_handler_get (const gchar *extension);
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#endif /* __GEGL_PLUGIN_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/ 0000755 0000000 0000000 00000000000 11272023654 017422 5 ustar root root ./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-point-render.h 0000644 0000000 0000000 00000004521 11272023556 025116 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_POINT_RENDER_H__
#define __GEGL_OPERATION_POINT_RENDER_H__
#include "gegl-operation-source.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_POINT_RENDER (gegl_operation_point_render_get_type ())
#define GEGL_OPERATION_POINT_RENDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_POINT_RENDER, GeglOperationPointRender))
#define GEGL_OPERATION_POINT_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_POINT_RENDER, GeglOperationPointRenderClass))
#define GEGL_IS_OPERATION_POINT_RENDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_POINT_RENDER))
#define GEGL_IS_OPERATION_POINT_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_POINT_RENDER))
#define GEGL_OPERATION_POINT_RENDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_POINT_RENDER, GeglOperationPointRenderClass))
typedef struct _GeglOperationPointRender GeglOperationPointRender;
struct _GeglOperationPointRender
{
GeglOperationSource parent_instance;
};
typedef struct _GeglOperationPointRenderClass GeglOperationPointRenderClass;
struct _GeglOperationPointRenderClass
{
GeglOperationSourceClass parent_class;
gboolean (* process) (GeglOperation *self, /* for parameters */
void *out_buf, /* output buffer */
glong samples, /* number of samples */
const GeglRectangle *roi); /* can be used if position is of importance*/
};
GType gegl_operation_point_render_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-filter.h 0000644 0000000 0000000 00000004060 11272023556 023773 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_FILTER_H__
#define __GEGL_OPERATION_FILTER_H__
#include "gegl-operation.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_FILTER (gegl_operation_filter_get_type ())
#define GEGL_OPERATION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilter))
#define GEGL_OPERATION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilterClass))
#define GEGL_IS_OPERATION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_FILTER))
#define GEGL_IS_OPERATION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_FILTER))
#define GEGL_OPERATION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilterClass))
typedef struct _GeglOperationFilter GeglOperationFilter;
struct _GeglOperationFilter
{
GeglOperation parent_instance;
};
typedef struct _GeglOperationFilterClass GeglOperationFilterClass;
struct _GeglOperationFilterClass
{
GeglOperationClass parent_class;
gboolean (* process) (GeglOperation *self,
GeglBuffer *input,
GeglBuffer *output,
const GeglRectangle *roi);
};
GType gegl_operation_filter_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-composer.h 0000644 0000000 0000000 00000004225 11272023556 024340 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_COMPOSER_H__
#define __GEGL_OPERATION_COMPOSER_H__
#include "gegl-operation.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_COMPOSER (gegl_operation_composer_get_type ())
#define GEGL_OPERATION_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_COMPOSER, GeglOperationComposer))
#define GEGL_OPERATION_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_COMPOSER, GeglOperationComposerClass))
#define GEGL_IS_OPERATION_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_COMPOSER))
#define GEGL_IS_OPERATION_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_COMPOSER))
#define GEGL_OPERATION_COMPOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_COMPOSER, GeglOperationComposerClass))
typedef struct _GeglOperationComposer GeglOperationComposer;
struct _GeglOperationComposer
{
GeglOperation parent_instance;
};
typedef struct _GeglOperationComposerClass GeglOperationComposerClass;
struct _GeglOperationComposerClass
{
GeglOperationClass parent_class;
gboolean (* process) (GeglOperation *self,
GeglBuffer *input,
GeglBuffer *aux,
GeglBuffer *output,
const GeglRectangle *result);
};
GType gegl_operation_composer_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-area-filter.h 0000644 0000000 0000000 00000004203 11272023556 024700 0 ustar root root /* 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 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 .
*
* Copyright 2007 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_AREA_FILTER_H__
#define __GEGL_OPERATION_AREA_FILTER_H__
#include "gegl-operation-filter.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_AREA_FILTER (gegl_operation_area_filter_get_type ())
#define GEGL_OPERATION_AREA_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_AREA_FILTER, GeglOperationAreaFilter))
#define GEGL_OPERATION_AREA_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_AREA_FILTER, GeglOperationAreaFilterClass))
#define GEGL_IS_OPERATION_AREA_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_AREA_FILTER))
#define GEGL_IS_OPERATION_AREA_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_AREA_FILTER))
#define GEGL_OPERATION_AREA_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_AREA_FILTER, GeglOperationAreaFilterClass))
typedef struct _GeglOperationAreaFilter GeglOperationAreaFilter;
struct _GeglOperationAreaFilter
{
GeglOperationFilter parent_instance;
gint left; /* extra pixels needed in each direction */
gint right;
gint top;
gint bottom;
};
typedef struct _GeglOperationAreaFilterClass GeglOperationAreaFilterClass;
struct _GeglOperationAreaFilterClass
{
GeglOperationFilterClass parent_class;
};
GType gegl_operation_area_filter_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-source.h 0000644 0000000 0000000 00000004053 11272023556 024010 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_SOURCE_H__
#define __GEGL_OPERATION_SOURCE_H__
#include "gegl-operation.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_SOURCE (gegl_operation_source_get_type ())
#define GEGL_OPERATION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSource))
#define GEGL_OPERATION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass))
#define GEGL_IS_OPERATION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSource))
#define GEGL_IS_OPERATION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass))
#define GEGL_OPERATION_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass))
typedef struct _GeglOperationSource GeglOperationSource;
struct _GeglOperationSource
{
GeglOperation parent_instance;
};
typedef struct _GeglOperationSourceClass GeglOperationSourceClass;
struct _GeglOperationSourceClass
{
GeglOperationClass parent_class;
gboolean (* process) (GeglOperation *self,
GeglBuffer *output,
const GeglRectangle *roi);
};
GType gegl_operation_source_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-meta.h 0000644 0000000 0000000 00000004523 11272023556 023440 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_META_H__
#define __GEGL_OPERATION_META_H__
#include "gegl-operation.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_META (gegl_operation_meta_get_type ())
#define GEGL_OPERATION_META(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_META, GeglOperationMeta))
#define GEGL_OPERATION_META_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_META, GeglOperationMetaClass))
#define GEGL_IS_OPERATION_META(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_META))
#define GEGL_IS_OPERATION_META_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_META))
#define GEGL_OPERATION_META_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_META, GeglOperationMetaClass))
typedef struct _GeglOperationMeta GeglOperationMeta;
struct _GeglOperationMeta
{
GeglOperation parent_instance;
GSList *redirects;
};
typedef struct _GeglOperationMetaClass GeglOperationMetaClass;
struct _GeglOperationMetaClass
{
GeglOperationClass parent_class;
};
GType gegl_operation_meta_get_type (void) G_GNUC_CONST;
void gegl_operation_meta_redirect (GeglOperation *operation,
const gchar *name,
GeglNode *internal,
const gchar *internal_name);
void gegl_operation_meta_property_changed (GeglOperationMeta *self,
GParamSpec *arg1,
gpointer user_data);
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-sink.h 0000644 0000000 0000000 00000004261 11272023556 023455 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_SINK_H__
#define __GEGL_OPERATION_SINK_H__
#include "gegl-operation.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_SINK (gegl_operation_sink_get_type ())
#define GEGL_OPERATION_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_SINK, GeglOperationSink))
#define GEGL_OPERATION_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_SINK, GeglOperationSinkClass))
#define GEGL_IS_OPERATION_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_SINK))
#define GEGL_IS_OPERATION_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_SINK))
#define GEGL_OPERATION_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_SINK, GeglOperationSinkClass))
typedef struct _GeglOperationSink GeglOperationSink;
struct _GeglOperationSink
{
GeglOperation parent_instance;
};
typedef struct _GeglOperationSinkClass GeglOperationSinkClass;
struct _GeglOperationSinkClass
{
GeglOperationClass parent_class;
/* Wether or not the sink operation needs full input data in one go
* in order to be able to do its processing
*/
gboolean needs_full;
gboolean (* process) (GeglOperation *self,
GeglBuffer *input,
const GeglRectangle *roi);
};
GType gegl_operation_sink_get_type (void) G_GNUC_CONST;
gboolean gegl_operation_sink_needs_full (GeglOperation *operation);
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation.h 0000644 0000000 0000000 00000024273 11272023555 022517 0 ustar root root /* 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 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 .
*
* Copyright 2003 Calvin Williamson
* 2005-2008 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_H__
#define __GEGL_OPERATION_H__
#include
#include
#include "gegl-buffer.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION (gegl_operation_get_type ())
#define GEGL_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION, GeglOperation))
#define GEGL_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION, GeglOperationClass))
#define GEGL_IS_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION))
#define GEGL_IS_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION))
#define GEGL_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION, GeglOperationClass))
typedef struct _GeglOperationClass GeglOperationClass;
struct _GeglOperation
{
GObject parent_instance;
/*< private >*/
GeglNode *node; /* the node that this operation object is communicated
with through */
};
/***
* GeglOperation:
*
* All the image processing code in GEGL is implemented as GeglOperations,
* GEGL operations are implemented as GObject with a convenience API called
* chanting that abstracts away the boiler plater needed to generate introspectable
* named properties of different types.
*
* Most types of operations like: filters, composers, sources, sinks, point
* operations, compositing operations, and spatial operations with fixed
* neighbourhoods. These base classes build on top of the GeglOperationsClass:
*
* See gegl-plugin.h for details.
*/
#define MAX_PROCESSOR 4
void gegl_operation_class_add_processor (GeglOperationClass *cclass,
GCallback process,
const gchar *string);
struct _GeglOperationClass
{
GObjectClass parent_class;
const gchar *name; /* name(string) used to create/indetify
this type of operation in GEGL*/
const gchar *compat_name; /* name used for backwards compatibility
reasons*/
const gchar *description; /* textual description of the operation */
const gchar *categories; /* a colon seperated list of categories */
gboolean no_cache; /* do not create a cache for this operation */
/*
* attach this operation with a GeglNode, override this if you are creating a
* GeglGraph, it is already defined for Filters/Sources/Composers.
*/
void (*attach) (GeglOperation *operation);
/* prepare() is called on each operation providing data to a node that
* is requested to provide a rendered result. When prepare is called all
* properties are known. This is the time to set desired pixel formats
* for input and output pads.
*/
void (*prepare) (GeglOperation *operation);
/* Returns the bounding rectangle for the data that is defined by this op.
* (is already implemented in GeglOperationPointFilter and
* GeglOperationPointComposer, GeglOperationAreaFilter base classes.
*/
GeglRectangle (*get_bounding_box) (GeglOperation *operation);
/* Computes the region in output (same affected rect assumed for all outputs)
* when a given region has changed on an input. Used to aggregate dirt in the
* graph. A default implementation of this, if not provided should probably
* be to report that the entire defined region is dirtied.
*/
GeglRectangle (*get_invalidated_by_change) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
/* Computes the rectangle needed to be correctly computed in a buffer
* on the named input_pad, for a given region of interest.
*/
GeglRectangle (*get_required_for_output) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
/* Adjust result rect, adapts the rectangle used for computing results.
* (useful for global operations like contrast stretching, as well as
* file loaders to force caching of the full raster).
*/
GeglRectangle (*get_cached_region) (GeglOperation *operation,
const GeglRectangle *roi);
/* Perform processing and provide @output_pad with data for the
* region of interest @roi.
*
* For a GeglOperation _without_ output pads, for example a PNG save
* operation, @output_pad shall be ignored and @roi then instead
* specifies the data available for consumption.
*/
gboolean (*process) (GeglOperation *operation,
GeglOperationContext *context,
const gchar *output_pad,
const GeglRectangle *roi);
/* XXX: What is GeglNode doing in this part of the API?
* Returns the node providing data for a specific location within the
* operations output. Does this recurse?, perhaps it should only point out
* which pad the data is coming from?
*/
GeglNode* (*detect) (GeglOperation *operation,
gint x,
gint y);
};
GType gegl_operation_get_type (void) G_GNUC_CONST;
GeglRectangle gegl_operation_get_invalidated_by_change
(GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
GeglRectangle gegl_operation_get_bounding_box (GeglOperation *operation);
/* retrieves the bounding box of an input pad */
GeglRectangle * gegl_operation_source_get_bounding_box
(GeglOperation *operation,
const gchar *pad_name);
GeglRectangle gegl_operation_get_cached_region
(GeglOperation *operation,
const GeglRectangle *roi);
GeglRectangle gegl_operation_get_required_for_output
(GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
GeglNode *gegl_operation_detect (GeglOperation *operation,
gint x,
gint y);
/* virtual method invokers that change behavior based on the roi being computed,
* needs a context_id being based that is used for storing context data.
*/
void gegl_operation_attach (GeglOperation *operation,
GeglNode *node);
void gegl_operation_prepare (GeglOperation *operation);
gboolean gegl_operation_process (GeglOperation *operation,
GeglOperationContext *context,
const gchar *output_pad,
const GeglRectangle *roi);
/* create a pad for a specified property for this operation, this method is
* to be called from the attach method of operations, most operations do not
* have to care about this since a super class like filter, sink, source or
* composer already does so.
*/
void gegl_operation_create_pad (GeglOperation *operation,
GParamSpec *param_spec);
/* specify the bablformat for a pad on this operation (XXX: document when
* this is legal, at the moment, only used internally in some ops,. but might
* turn into a global mechanism) */
void gegl_operation_set_format (GeglOperation *operation,
const gchar *pad_name,
const Babl *format);
const Babl * gegl_operation_get_format (GeglOperation *operation,
const gchar *pad_name);
const gchar * gegl_operation_get_name (GeglOperation *operation);
/* retrieves the node providing data to a named input pad */
GeglNode * gegl_operation_get_source_node (GeglOperation *operation,
const gchar *pad_name);
GParamSpec ** gegl_list_properties (const gchar *operation_type,
guint *n_properties_p);
/* internal utility functions used by gegl, these should not be used
* externally */
gboolean gegl_operation_calc_need_rects (GeglOperation *operation,
gpointer context_id);
void gegl_operation_path_prop_changed (GeglPath *path,
GeglOperation *operation);
void gegl_operation_invalidate (GeglOperation *operation,
const GeglRectangle *roi,
gboolean clear_cache);
G_END_DECLS
/***
*/
#endif /* __GEGL_OPERATION_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-point-composer3.h 0000644 0000000 0000000 00000005106 11272023556 025551 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_POINT_COMPOSER3_H__
#define __GEGL_OPERATION_POINT_COMPOSER3_H__
#include "gegl-operation-composer3.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_POINT_COMPOSER3 (gegl_operation_point_composer3_get_type ())
#define GEGL_OPERATION_POINT_COMPOSER3(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_POINT_COMPOSER3, GeglOperationPointComposer3))
#define GEGL_OPERATION_POINT_COMPOSER3_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_POINT_COMPOSER3, GeglOperationPointComposer3Class))
#define GEGL_IS_OPERATION_POINT_COMPOSER3(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_POINT_COMPOSER3))
#define GEGL_IS_OPERATION_POINT_COMPOSER3_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_POINT_COMPOSER3))
#define GEGL_OPERATION_POINT_COMPOSER3_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_POINT_COMPOSER3, GeglOperationPointComposer3Class))
typedef struct _GeglOperationPointComposer3 GeglOperationPointComposer3;
struct _GeglOperationPointComposer3
{
GeglOperationComposer3 parent_instance;
/*< private >*/
};
typedef struct _GeglOperationPointComposer3Class GeglOperationPointComposer3Class;
struct _GeglOperationPointComposer3Class
{
GeglOperationComposer3Class parent_class;
gboolean (* process) (GeglOperation *self, /* for parameters */
void *in,
void *aux,
void *aux2,
void *out,
glong samples, /* number of samples */
const GeglRectangle *roi /* rectangular region in output buffer */
);
};
GType gegl_operation_point_composer3_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-point-composer.h 0000644 0000000 0000000 00000004770 11272023556 025474 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_POINT_COMPOSER_H__
#define __GEGL_OPERATION_POINT_COMPOSER_H__
#include "gegl-operation-composer.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_POINT_COMPOSER (gegl_operation_point_composer_get_type ())
#define GEGL_OPERATION_POINT_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_POINT_COMPOSER, GeglOperationPointComposer))
#define GEGL_OPERATION_POINT_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_POINT_COMPOSER, GeglOperationPointComposerClass))
#define GEGL_IS_OPERATION_POINT_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_POINT_COMPOSER))
#define GEGL_IS_OPERATION_POINT_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_POINT_COMPOSER))
#define GEGL_OPERATION_POINT_COMPOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_POINT_COMPOSER, GeglOperationPointComposerClass))
typedef struct _GeglOperationPointComposer GeglOperationPointComposer;
struct _GeglOperationPointComposer
{
GeglOperationComposer parent_instance;
/*< private >*/
};
typedef struct _GeglOperationPointComposerClass GeglOperationPointComposerClass;
struct _GeglOperationPointComposerClass
{
GeglOperationComposerClass parent_class;
gboolean (* process) (GeglOperation *self, /* for parameters */
void *in,
void *aux,
void *out,
glong samples, /* number of samples */
const GeglRectangle *roi /* rectangular region in output buffer */
);
};
GType gegl_operation_point_composer_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-temporal.h 0000644 0000000 0000000 00000005216 11272023556 024335 0 ustar root root /* 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 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 .
*
* Copyright 2008 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_TEMPORAL_H__
#define __GEGL_OPERATION_TEMPORAL_H__
#include "gegl-operation-filter.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_TEMPORAL (gegl_operation_temporal_get_type ())
#define GEGL_OPERATION_TEMPORAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_TEMPORAL, GeglOperationTemporal))
#define GEGL_OPERATION_TEMPORAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_TEMPORAL, GeglOperationTemporalClass))
#define GEGL_IS_OPERATION_TEMPORAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_TEMPORAL))
#define GEGL_IS_OPERATION_TEMPORAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_TEMPORAL))
#define GEGL_OPERATION_TEMPORAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_TEMPORAL, GeglOperationTemporalClass))
typedef struct _GeglOperationTemporal GeglOperationTemporal;
typedef struct _GeglOperationTemporalPrivate GeglOperationTemporalPrivate;
struct _GeglOperationTemporal
{
GeglOperationFilter parent_instance;
GeglOperationTemporalPrivate *priv;
};
typedef struct _GeglOperationTemporalClass GeglOperationTemporalClass;
struct _GeglOperationTemporalClass
{
GeglOperationFilterClass parent_class;
gboolean (* process) (GeglOperation *self,
GeglBuffer *input,
GeglBuffer *output,
const GeglRectangle *roi);
};
GType gegl_operation_temporal_get_type (void) G_GNUC_CONST;
void gegl_operation_temporal_set_history_length (GeglOperation *op,
gint history_length);
guint gegl_operation_temporal_get_history_length (GeglOperation *op);
/* you need to unref the buffer when you're done with it */
GeglBuffer *gegl_operation_temporal_get_frame (GeglOperation *op,
gint frame);
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-point-filter.h 0000644 0000000 0000000 00000005136 11272023556 025127 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_POINT_FILTER_H__
#define __GEGL_OPERATION_POINT_FILTER_H__
#include "gegl-operation-filter.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_POINT_FILTER (gegl_operation_point_filter_get_type ())
#define GEGL_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilter))
#define GEGL_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass))
#define GEGL_IS_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_POINT_FILTER))
#define GEGL_IS_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_POINT_FILTER))
#define GEGL_OPERATION_POINT_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass))
typedef struct _GeglOperationPointFilter GeglOperationPointFilter;
struct _GeglOperationPointFilter
{
GeglOperationFilter parent_instance;
};
typedef struct _GeglOperationPointFilterClass GeglOperationPointFilterClass;
struct _GeglOperationPointFilterClass
{
GeglOperationFilterClass parent_class;
gboolean (* process) (GeglOperation *self, /* for parameters */
void *in_buf, /* input buffer */
void *out_buf, /* output buffer */
glong samples, /* number of samples */
const GeglRectangle *roi); /* rectangle out_buf spans
in in buffer, see the
checkerboard op for
semantics */
};
GType gegl_operation_point_filter_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/operation/gegl-operation-composer3.h 0000644 0000000 0000000 00000004340 11272023556 024421 0 ustar root root /* 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 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 .
*
* Copyright 2006 Øyvind Kolås
*/
#ifndef __GEGL_OPERATION_COMPOSER3_H__
#define __GEGL_OPERATION_COMPOSER3_H__
#include "gegl-operation.h"
G_BEGIN_DECLS
#define GEGL_TYPE_OPERATION_COMPOSER3 (gegl_operation_composer3_get_type ())
#define GEGL_OPERATION_COMPOSER3(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_COMPOSER3, GeglOperationComposer3))
#define GEGL_OPERATION_COMPOSER3_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_COMPOSER3, GeglOperationComposer3Class))
#define GEGL_IS_OPERATION_COMPOSER3(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_COMPOSER3))
#define GEGL_IS_OPERATION_COMPOSER3_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_COMPOSER3))
#define GEGL_OPERATION_COMPOSER3_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_COMPOSER3, GeglOperationComposer3Class))
typedef struct _GeglOperationComposer3 GeglOperationComposer3;
struct _GeglOperationComposer3
{
GeglOperation parent_instance;
};
typedef struct _GeglOperationComposer3Class GeglOperationComposer3Class;
struct _GeglOperationComposer3Class
{
GeglOperationClass parent_class;
gboolean (* process) (GeglOperation *self,
GeglBuffer *input,
GeglBuffer *aux,
GeglBuffer *aux2,
GeglBuffer *output,
const GeglRectangle *result);
};
GType gegl_operation_composer3_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-curve.h 0000644 0000000 0000000 00000013203 11272023566 017634 0 ustar root root /* 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 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 .
*
* Copyright 2007 Mark Probst
*/
#ifndef __GEGL_CURVE_H__
#define __GEGL_CURVE_H__
/***
* GeglCurve:
*
* #GeglCurve is a curve describing a unique mapping of values.
*
* Used for things like the curves widget in gimp it is a form of doodle
* alpha.
*/
#include
G_BEGIN_DECLS
#define GEGL_TYPE_CURVE (gegl_curve_get_type ())
#define GEGL_CURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_CURVE, GeglCurve))
#define GEGL_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_CURVE, GeglCurveClass))
#define GEGL_IS_CURVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_CURVE))
#define GEGL_IS_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_CURVE))
#define GEGL_CURVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_CURVE, GeglCurveClass))
typedef struct _GeglCurveClass GeglCurveClass;
struct _GeglCurve
{
GObject parent_instance;
};
struct _GeglCurveClass
{
GObjectClass parent_class;
};
GType gegl_curve_get_type (void) G_GNUC_CONST;
/**
* gegl_curve_new:
* @y_min: minimum y value for curve.
* @y_max: maximum y value for curve.
*
* Create a #GeglCurve that can store a curve with values between @y_min and
* @y_max.
*
* Returns the newly created #GeglCurve.
*/
GeglCurve * gegl_curve_new (gdouble y_min,
gdouble y_max);
/**
* gegl_curve_get_y_bounds:
* @curve: a #GeglCurve.
* @min_y: return location for minimal value.
* @max_y: return location for maximal value.
*
* Get the bounds on the values of the curve and store the values in
* the return locaitons provided in @min_y and @max_y.
*/
void gegl_curve_get_y_bounds (GeglCurve *curve,
gdouble *min_y,
gdouble *max_y);
/**
* gegl_curve_add_point:
* @curve: a #GeglCurve.
* @x: x coordinate
* @y: y coordinate
*
* Add a point to the curve at @x @y (replacing the value exactly for @x if it
* already exists.
*/
guint gegl_curve_add_point (GeglCurve *curve,
gdouble x,
gdouble y);
/**
* gegl_curve_get_point:
* @curve: a #GeglCurve.
* @index: the position of the value number to retrieve.
* @x: x coordinate return location.
* @y: y coordinate return location.
*
* Retrive the coordinates for an index.
*/
void gegl_curve_get_point (GeglCurve *curve,
guint index,
gdouble *x,
gdouble *y);
/**
* gegl_curve_set_point:
* @curve: a #GeglCurve.
* @index: the position of the value number to retrieve.
* @x: x coordinate
* @y: y coordinate
*
* Replace an existing point in a curve.
*/
void gegl_curve_set_point (GeglCurve *curve,
guint index,
gdouble x,
gdouble y);
/**
* gegl_curve_num_points:
* @curve: a #GeglCurve.
*
* Retrieve the number of points in the curve.
*
* Returns the number of points for the coordinates in the curve.
*/
guint gegl_curve_num_points (GeglCurve *curve);
/**
* gegl_curve_calc_value:
* @curve: a #GeglCurve.
*
* Retrieve the number of points in the curve.
*
* Returns the number of points for the coordinates in the curve.
*/
gdouble gegl_curve_calc_value (GeglCurve *curve,
gdouble x);
/**
* gegl_curve_calc_values:
* @curve: a #GeglCurve.
* @x_min: the minimum value to compute for
* @x_max: the maxmimum value to compute for
* @num_samples: number of samples to calculate
* @xs: return location for the x coordinates
* @ys: return location for the y coordinates
*
* Compute a set (lookup table) of coordinates.
*/
void gegl_curve_calc_values (GeglCurve *curve,
gdouble x_min,
gdouble x_max,
guint num_samples,
gdouble *xs,
gdouble *ys);
/***
*/
#define GEGL_TYPE_PARAM_CURVE (gegl_param_curve_get_type ())
#define GEGL_IS_PARAM_SPEC_CURVE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_CURVE))
GeglCurve * gegl_curve_default_curve (void) G_GNUC_CONST;
GType gegl_param_curve_get_type (void) G_GNUC_CONST;
GParamSpec * gegl_param_spec_curve (const gchar *name,
const gchar *nick,
const gchar *blurb,
GeglCurve *default_curve,
GParamFlags flags);
G_END_DECLS
#endif /* __GEGL_CURVE_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl.h 0000644 0000000 0000000 00000072017 11272023566 016522 0 ustar root root /* This file is the public GEGL API
*
* 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 .
*
* 2000-2008 © Calvin Williamson, Øyvind Kolås.
*/
#ifndef __GEGL_H__
#define __GEGL_H__
#include
#include
#include
#include
#include
#include
#include
#include
/***
* The GEGL API:
*
* This document is both a tutorial and a reference for the C API of GEGL.
* The concepts covered in this reference should also be applicable when
* using other languages.
*
* The core API of GEGL isn't frozen yet and feedback regarding its use as
* well as the clarity of this documentation is most welcome.
*/
G_BEGIN_DECLS
/***
* Introduction:
*
* Algorithms created with GEGL are expressed as graphs of nodes. The nodes
* have associated image processing operations. A node has output and input
* pads which can be connected. By connecting these nodes in chains a set of
* image operation filters and combinators can be applied to the image data.
*
* To make GEGL process data you request a rectangular region of a node's
* output pad to be rendered into a provided linear buffer of any (supported
* by babl) pixel format. GEGL uses information provided by the nodes to
* determine the smallest buffers needed at each stage of processing.
*/
/***
* Initialization:
*
* Before GEGL can be used the engine should be initialized by either calling
* #gegl_init or through the use of #gegl_get_option_group. To shut down the
* GEGL engine call #gegl_exit.
*
* ---Code sample:
* #include
*
* int main(int argc, char **argv)
* {
* gegl_init (&argc, &argv);
* # other GEGL code
* gegl_exit ();
* }
*/
/**
* gegl_init:
* @argc: a pointer to the number of command line arguments.
* @argv: a pointer to the array of command line arguments.
*
* Call this function before using any other GEGL functions. It will
* initialize everything needed to operate GEGL and parses some
* standard command line options. @argc and @argv are adjusted
* accordingly so your own code will never see those standard
* arguments. gegl_init() will call g_thread_init(), unless you, or
* some other code already has initialized gthread.
*
* Note that there is an alternative way to initialize GEGL: if you
* are calling g_option_context_parse() with the option group returned
* by #gegl_get_option_group(), you don't have to call #gegl_init() but
* you have to call g_thread_init() before any glib or glib dependant code
* yourself.
**/
void gegl_init (gint *argc,
gchar ***argv);
/**
* gegl_get_option_group:
*
* Returns a GOptionGroup for the commandline arguments recognized
* by GEGL. You should add this group to your GOptionContext
* with g_option_context_add_group() if you are using
* g_option_context_parse() to parse your commandline arguments.
*/
GOptionGroup * gegl_get_option_group (void);
/**
* gegl_exit:
*
* Call this function when you're done using GEGL. It will clean up
* caches and write/dump debug information if the correct debug flags
* are set.
*/
void gegl_exit (void);
/***
* Available operations:
* Gegl provides means to check for available processing operations that
* can be used with nodes using #gegl_list_operations and for a specified
* op give a list of properties with #gegl_list_properties.
*/
/**
* gegl_list_operations:
* @n_operations_p: return location for number of operations.
*
* Returns an alphabetically sorted array of available operation names. The
* list should be freed with g_free after use.
* ---
* gchar **operations;
* guint n_operations;
* gint i;
*
* operations = gegl_list_operations (&n_operations);
* g_print ("Available operations:\n");
* for (i=0; i < n_operations; i++)
* {
* g_print ("\t%s\n", operations[i]);
* }
* g_free (operations);
*/
gchar **gegl_list_operations (guint *n_operations_p);
/**
* gegl_list_properties:
* @operation_type: the name of the operation type we want to query to properties of.
* @n_properties_p: return location for number of properties.
*
* Returns an allocated array of #GParamSpecs describing the properties
* of the operation available when a node has operation_type set.
*/
GParamSpec** gegl_list_properties (const gchar *operation_type,
guint *n_properties_p);
/***
* GeglNode:
*
* The Node is the image processing primitive connected to create compositions
* in GEGL. The toplevel #GeglNode which contains a graph of #GeglNodes is
* created with #gegl_node_new. Using this toplevel node we can create children
* of this node which are individual processing elements using #gegl_node_new_child
*
* A node either has an associated operation or is a parent for other nodes,
* that are connected to their parent through proxies created with
* #gegl_node_get_input_proxy and #gegl_node_get_output_proxy.
*
* The properties available on a node depends on which operation is specified.
*
* ---
* GeglNode *gegl, *load, *bcontrast;
*
* gegl = gegl_node_new ();
* load = gegl_node_new_child (gegl,
* "operation", "load",
* "path", "input.png",
* NULL);
* bcontrast = gegl_node_new_child (gegl,
* "operation", "brightness-contrast",
* "brightness", 0.2,
* "contrast", 1.5,
* NULL);
*/
/**
* gegl_node_new:
*
* Create a new graph that can contain further processing nodes.
*
* Returns a new top level #GeglNode (which can be used as a graph). When you
* are done using this graph instance it should be unreferenced with g_object_unref.
* This will also free any sub nodes created from this node.
*/
GeglNode * gegl_node_new (void);
/**
* gegl_node_new_child:
* @parent: a #GeglNode
* @first_property_name: the first property name
* @...: first property value, optionally followed by more key/value pairs, ended
* terminated with NULL.
*
* Creates a new processing node that performs the specified operation with
* a NULL terminated list of key/value pairs for initial parameter values
* configuring the operation. Usually the first pair should be "operation"
* and the type of operation to be associated. If no operation is provided
* the node doesn't have an initial operation and can be used to construct
* a subgraph with special middle-man routing nodes created with
* #gegl_node_get_output_proxy and #gegl_node_get_input_proxy.
*
* Returns a newly created node. The node will be destroyed by the parent.
* Calling g_object_unref on a node will cause the node to be dropped by the
* parent. (You may also add additional references using
* g_object_ref/g_object_unref, but in general relying on the parents reference
* counting is easiest.)
*/
GeglNode * gegl_node_new_child (GeglNode *parent,
const gchar *first_property_name,
...) G_GNUC_NULL_TERMINATED;
/***
* Making connections:
*
* Nodes in GEGL are connected to each other. The resulting graph of nodes
* represents the image processing pipeline to be processed.
*
* ---
* gegl_node_link_many (background, over, png_save, NULL);
* gegl_node_connect_to (translate, "output", over, "aux");
* gegl_node_link_many (text, blur, translate, NULL);
*/
/**
* gegl_node_connect_from:
* @sink: the node we're connecting an input to
* @input_pad_name: the name of the input pad we are connecting to
* @source: the node producing data we want to connect.
* @output_pad_name: the output pad we want to use on the source.
*
* Makes a connection between the pads of two nodes.
*
* Returns TRUE if the connection was succesfully made.
*/
gboolean gegl_node_connect_from (GeglNode *sink,
const gchar *input_pad_name,
GeglNode *source,
const gchar *output_pad_name);
/**
* gegl_node_connect_to:
* @source: the node producing data we want to connect.
* @output_pad_name: the output pad we want to use on the source.
* @sink: the node we're connecting an input to
* @input_pad_name: the name of the input pad we are connecting to
*
* Makes a connection between the pads of two nodes.
*
* Returns TRUE if the connection was succesfully made.
*/
gboolean gegl_node_connect_to (GeglNode *source,
const gchar *output_pad_name,
GeglNode *sink,
const gchar *input_pad_name);
/**
* gegl_node_link:
* @source: the producer of data.
* @sink: the consumer of data.
*
* Synthetic sugar for linking the "output" pad of @source to the "input"
* pad of @sink.
*/
void gegl_node_link (GeglNode *source,
GeglNode *sink);
/**
* gegl_node_link_many:
* @source: the producer of data.
* @first_sink: the first consumer of data.
* @...: NULL, or optionally more consumers followed by NULL.
*
* Synthetic sugar for linking a chain of nodes with "input"->"output". The
* list is NULL terminated.
*/
void gegl_node_link_many (GeglNode *source,
GeglNode *first_sink,
...) G_GNUC_NULL_TERMINATED;
/**
* gegl_node_disconnect:
* @node: a #GeglNode
* @input_pad: the input pad to disconnect.
*
* Disconnects node connected to @input_pad of @node (if any).
*
* Returns TRUE if a connection was broken.
*/
gboolean gegl_node_disconnect (GeglNode *node,
const gchar *input_pad);
/***
* Properties:
*
* Properties can be set either when creating the node with
* #gegl_node_new_child as well as later when changing the initial
* value with #gegl_node_set.
*
* To see what properties are available for a given operation look in the Operations reference or use
* #gegl_node_get.
*/
/**
* gegl_node_set:
* @node: a #GeglNode
* @first_property_name: name of the first property to set
* @...: value for the first property, followed optionally by more name/value
* pairs, followed by NULL.
*
* Set properties on a node, possible properties to be set are the properties
* of the currently set operations as well as "name" and
* "operation". "operation" changes the current operations
* set for the node, "name" doesn't have any role internally in
* GEGL.
* ---
* gegl_node_set (node, "brightness", -0.2,
* "contrast", 2.0,
* NULL);
*/
void gegl_node_set (GeglNode *node,
const gchar *first_property_name,
...) G_GNUC_NULL_TERMINATED;
/**
* gegl_node_set_valist:
* @node: a #GeglNode
* @first_property_name: name of the first property to set
* @...: value for the first property, followed optionally by more name/value
* pairs, followed by NULL.
*
* valist version of #gegl_node_set
*/
void gegl_node_set_valist (GeglNode *node,
const gchar *first_property_name,
va_list args);
/**
* gegl_node_get:
* @node: a #GeglNode
* @first_property_name: name of the first property to get.
* @...: return location for the first property, followed optionally by more
* name/value pairs, followed by NULL.
*
* Gets properties of a #GeglNode.
* ---
* double level;
* char *path;
*
* gegl_node_get (png_save, "path", &path, NULL);
* gegl_node_get (threshold, "level", &level, NULL);
*/
void gegl_node_get (GeglNode *node,
const gchar *first_property_name,
...) G_GNUC_NULL_TERMINATED;
/**
* gegl_node_get_valist:
* @node: a #GeglNode
* @first_property_name: name of the first property to get.
* @...: return location for the first property, followed optionally by more
* name/value pairs, followed by NULL.
*
* valist version of #gegl_node_get
*/
void gegl_node_get_valist (GeglNode *node,
const gchar *first_property_name,
va_list args);
/***
* Processing:
*
* There are two different ways to do processing with GEGL, either you
* query any node providing output for a rectangular region to be rendered
* using #gegl_node_blit, or you use #gegl_node_process on a sink node (A
* display node, an image file writer or similar). To do iterative processing
* you need to use a #GeglProcessor. See #gegl_processor_work for a code
* sample.
*/
/**
* gegl_node_blit:
* @node: a #GeglNode
* @scale: the scale to render at 1.0 is default, other values changes the
* width/height of the sampled region.
* @roi: the rectangle to render from the node, the coordinate system used is
* coordinates after scale has been applied.
* @format: the #BablFormat desired.
* @destination_buf: a memory buffer large enough to contain the data, can be
* left as NULL when forcing a rendering of a region.
* @rowstride: rowstride in bytes, or GEGL_AUTO_ROWSTRIDE to compute the
* rowstride based on the width and bytes per pixel for the specified format.
* @flags: an or'ed combination of GEGL_BLIT_DEFAULT, GEGL_BLIT_CACHE and
* GEGL_BLIT_DIRTY. if cache is enabled, a cache will be set up for subsequent
* requests of image data from this node. By passing in GEGL_BLIT_DIRTY the
* function will return with the latest rendered results in the cache without
* regard to wheter the regions has been rendered or not.
*
* Render a rectangular region from a node.
*/
void gegl_node_blit (GeglNode *node,
gdouble scale,
const GeglRectangle *roi,
const Babl *format,
gpointer destination_buf,
gint rowstride,
GeglBlitFlags flags);
/**
* gegl_node_process:
* @sink_node: a #GeglNode without outputs.
*
* Render a composition. This can be used for instance on a node with a "png-save"
* operation to render all neccesary data, and make it be written to file. This
* function wraps the usage of a GeglProcessor in a single blocking function
* call. If you need a non-blocking operation, then make a direct use of
* #gegl_processor_work. See #GeglProcessor.
*
* ---
* GeglNode *gegl;
* GeglRectangle roi;
* GeglNode *png_save;
* unsigned char *buffer;
*
* gegl = gegl_parse_xml (xml_data);
* roi = gegl_node_get_bounding_box (gegl);
* # create png_save from the graph, the parent/child relationship
* # only mean anything when it comes to memory management.
* png_save = gegl_node_new_child (gegl,
* "operation", "png-save",
* "path", "output.png",
* NULL);
*
* gegl_node_link (gegl, png_save);
* gegl_node_process (png_save);
*
* buffer = malloc (roi.w*roi.h*4);
* gegl_node_blit (gegl,
* &roi,
* 1.0,
* babl_format("R'G'B'A u8",
* roi.w*4,
* buffer,
* GEGL_BLIT_DEFAULT);
*/
void gegl_node_process (GeglNode *sink_node);
/***
* Reparenting:
*
* Sometimes it is useful to be able to move nodes between graphs or even
* handle orphaned nods that are not part of a graph. gegl_node_adopt_child
* and gegl_node_get_parent are provided to handle such cases.
*
* (gegl_node_adopt_child is deprecated, and will be removed in a future
* release)
*/
/**
* gegl_node_adopt_child:
* @parent: a #GeglNode or NULL.
* @child: a #GeglNode
*
* Adds @child to the responsibilities of @node, this makes the parent node
* take a reference on the child that is kept as long as the parent itself is
* being referenced. The node is stolen from an existing parent if there is one,
* or a presumed existing reference is used. If @parent is NULL the child will
* be orphaned and the developer is given a reference to be responsible of.
*
* Returns the child, or NULL if there was a problem with the arguments.
*/
GeglNode * gegl_node_adopt_child (GeglNode *parent,
GeglNode *child);
/**
* gegl_node_add_child:
* @graph: a GeglNode (graph)
* @child: a GeglNode.
*
* Make the GeglNode @graph, take a reference on child. This reference
* will be dropped when the reference count on the graph reaches zero.
*
* Returns the child.
*/
GeglNode * gegl_node_add_child (GeglNode *graph,
GeglNode *child);
/**
* gegl_node_remove_child:
* @graph: a GeglNode (graph)
* @child: a GeglNode.
*
* Removes a child from a GeglNode. The reference previously held will be
* dropped so increase the reference count before removing when reparenting
* a child between two graphs.
*
* Returns the child.
*/
GeglNode * gegl_node_remove_child (GeglNode *graph,
GeglNode *child);
/**
* gegl_node_get_parent:
* @node: a #GeglNode
*
* Returns a GeglNode that keeps a reference on a child.
*
* Returns the parent of a node or NULL.
*/
GeglNode * gegl_node_get_parent (GeglNode *node);
/***
* State queries:
*
* This section lists functions that retrieve information, mostly needed
* for interacting with a graph in a GUI, not creating one from scratch.
*
* You can figure out what the bounding box of a node is with #gegl_node_get_bounding_box,
* retrieve the values of named properties using #gegl_node_get.
*/
/**
* gegl_node_detect:
* @node: a #GeglNode
* @x: x coordinate
* @y: y coordinate
*
* Performs hit detection by returning the node providing data at a given
* coordinate pair. Currently operates only on bounding boxes and not
* pixel data.
*
* Returns the GeglNode providing the data ending up at @x,@y in the output
* of @node.
*/
GeglNode * gegl_node_detect (GeglNode *node,
gint x,
gint y);
/**
* gegl_node_find_property:
* @node: the node to lookup a paramspec on
* @property_name: the name of the property to get a paramspec for.
*
* Returns the GParamSpec of property or NULL if no such property exists.
*/
GParamSpec * gegl_node_find_property (GeglNode *node,
const gchar *property_name);
/**
* gegl_node_get_bounding_box:
* @node: a #GeglNode
*
* Returns the position and dimensions of a rectangle spanning the area
* defined by a node.
*/
GeglRectangle gegl_node_get_bounding_box (GeglNode *node);
/**
* gegl_node_get_children:
* @node: the node to retrieve the children of.
*
* Returns a list of nodes with children/internal nodes. The list must be
* freed by the caller.
*/
GSList * gegl_node_get_children (GeglNode *node);
/**
* gegl_node_get_consumers:
* @node: the node we are querying.
* @output_pad: the output pad we want to know who uses.
* @nodes: optional return location for array of nodes.
* @pads: optional return location for array of pad names.
*
* Retrieve which pads on which nodes are connected to a named output_pad,
* and the number of connections. Both the location for the generated
* nodes array and pads array can be left as NULL. If they are non NULL
* both should be freed with g_free. The arrays are NULL terminated.
*
* Returns the number of consumers connected to this output_pad.
*/
gint gegl_node_get_consumers (GeglNode *node,
const gchar *output_pad,
GeglNode ***nodes,
const gchar ***pads);
/**
* gegl_node_get_input_proxy:
* @node: a #GeglNode
* @pad_name: the name of the pad.
*
* Proxies are used to route between nodes of a subgraph contained within
* a node.
*
* Returns an input proxy for the named pad. If no input proxy exists with
* this name a new one will be created.
*/
GeglNode * gegl_node_get_input_proxy (GeglNode *node,
const gchar *pad_name);
/**
* gegl_node_get_operation:
* @node: a #GeglNode
*
* Returns the type of processing operation associated with this node, or
* NULL if there is no op associated. The special name "GraphNode"
* is returned if the node is the container of a subgraph.
*/
const gchar * gegl_node_get_operation (const GeglNode *node);
/**
* gegl_node_get_output_proxy:
* @node: a #GeglNode
* @pad_name: the name of the pad.
*
* Proxies are used to route between nodes of a subgraph contained within
* a node.
*
* Returns a output proxy for the named pad. If no output proxy exists with
* this name a new one will be created.
*/
GeglNode * gegl_node_get_output_proxy (GeglNode *node,
const gchar *pad_name);
/**
* gegl_node_get_producer:
* @node: the node we are querying
* @input_pad_name: the input pad we want to get the producer for
* @output_pad_name: optional pointer to a location where we can store a
* freshly allocated string with the name of the output pad.
*
* Returns the node providing data or NULL if no node is connected to the
* input_pad.
*/
GeglNode * gegl_node_get_producer (GeglNode *node,
gchar *input_pad_name,
gchar **output_pad_name);
/***
* Binding conveniences:
*
* The following functions are mostly included to make it easier to create
* language bindings for the nodes. The varargs versions will in most cases
* lead to both more efficient and readable code from C.
*/
/**
* gegl_node_create_child:
* @parent: a #GeglNode
* @operation: the type of node to create.
*
* Creates a new processing node that performs the specified operation.
* All properties of the operation will have their default values. This
* is included as an addiiton to #gegl_node_new_child in the public API to have
* a non varargs entry point for bindings as well as sometimes simpler more
* readable code.
*
* Returns a newly created node. The node will be destroyed by the parent.
* Calling g_object_unref on a node will cause the node to be dropped by the
* parent. (You may also add additional references using
* g_object_ref/g_object_unref, but in general relying on the parents reference
* counting is easiest.)
*/
GeglNode * gegl_node_create_child (GeglNode *parent,
const gchar *operation);
/**
* gegl_node_get_property:
* @node: the node to get a property from
* @property_name: the name of the property to get
* @value: pointer to a GValue where the value of the property should be stored
*
* This is mainly included for language bindings. Using #gegl_node_get is
* more convenient when programming in C.
*
*/
void gegl_node_get_property (GeglNode *node,
const gchar *property_name,
GValue *value);
/**
* gegl_node_set_property:
* @node: a #GeglNode
* @property_name: the name of the property to set
* @value: a GValue containing the value to be set in the property.
*
* This is mainly included for language bindings. Using #gegl_node_set is
* more convenient when programming in C.
*/
void gegl_node_set_property (GeglNode *node,
const gchar *property_name,
const GValue *value);
/***
* XML:
* The XML format used by GEGL is not stable and should not be relied on
* for anything but testing purposes yet.
*/
/**
* gegl_node_new_from_xml:
* @xmldata: a \0 terminated string containing XML data to be parsed.
* @path_root: a file system path that relative paths in the XML will be
* resolved in relation to.
*
* The #GeglNode returned contains the graph described by the tree of stacks
* in the XML document. The tree is connected to the "output" pad of the
* returned node and thus can be used directly for processing.
*
* Returns a GeglNode containing the parsed XML as a subgraph.
*/
GeglNode * gegl_node_new_from_xml (const gchar *xmldata,
const gchar *path_root);
/**
* gegl_node_new_from_file:
* @path: the path to a file on the local file system to be parsed.
*
* The #GeglNode returned contains the graph described by the tree of stacks
* in the XML document. The tree is connected to the "output" pad of the
* returned node and thus can be used directly for processing.
*
* Returns a GeglNode containing the parsed XML as a subgraph.
*/
GeglNode * gegl_node_new_from_file (const gchar *path);
/**
* gegl_node_to_xml:
* @node: a #GeglNode
* @path_root: filesystem path to construct relative paths from.
*
* Returns a freshly allocated \0 terminated string containing a XML
* serialization of the composition produced by a node (and thus also
* the nodes contributing data to the specified node). To export a
* gegl graph, connect the internal output node to an output proxy (see
* #gegl_node_get_output_proxy.) and use the proxy node as the basis
* for the serialization.
*/
gchar * gegl_node_to_xml (GeglNode *node,
const gchar *path_root);
/***
* GeglProcessor:
*
* A #GeglProcessor, is a worker that can be used for background rendering
* of regions in a node's cache. Or for processing a sink node. For most
* non GUI tasks using #gegl_node_blit and #gegl_node_process directly
* should be sufficient. See #gegl_processor_work for a code sample.
*
*/
/**
* gegl_node_new_processor:
* @node: a #GeglNode
* @rectangle: the #GeglRectangle to work on or NULL to work on all available
* data.
*
* Returns a new #GeglProcessor.
*/
GeglProcessor *gegl_node_new_processor (GeglNode *node,
const GeglRectangle *rectangle);
/**
* gegl_processor_set_rectangle:
* @processor: a #GeglProcessor
* @rectangle: the new #GeglRectangle the processor shold work on or NULL
* to make it work on all data in the buffer.
*
* Change the rectangle a #GeglProcessor is working on.
*/
void gegl_processor_set_rectangle (GeglProcessor *processor,
const GeglRectangle *rectangle);
/**
* gegl_processor_work:
* @processor: a #GeglProcessor
* @progress: a location to store the (estimated) percentage complete.
*
* Do an iteration of work for the processor.
*
* Returns TRUE if there is more work to be done.
*
* ---
* GeglProcessor *processor = gegl_node_new_processor (node, &roi);
* double progress;
*
* while (gegl_processor_work (processor, &progress))
* g_warning ("%f%% complete", progress);
* gegl_processor_destroy (processor);
*/
gboolean gegl_processor_work (GeglProcessor *processor,
gdouble *progress);
/**
* gegl_processor_destroy:
* @processor: a #GeglProcessor
*
* Frees up resources used by a processing handle.
*/
void gegl_processor_destroy (GeglProcessor *processor);
/***
* GeglConfig:
*
* GEGL uses a singleton configuration object
*/
/**
* gegl_config:
*
* Returns a GeglConfig object with properties that can be manipulated to control
* GEGLs behavior. Properties available on the object are:
*
* "cache-size" "quality" and "swap", the two first is an integer denoting
* number of bytes, the secons a double value between 0 and 1 and the last
* the path of the directory to swap to (or "ram" to not use diskbased swap)
*/
GeglConfig * gegl_config (void);
G_END_DECLS
#endif /* __GEGL_H__ */
./gegl-0.1.0-i686/usr/include/gegl-0.0/gegl-simd.h 0000644 0000000 0000000 00000004170 11272023566 017447 0 ustar root root #ifndef __GEGL_SIMD_H__
#define __GEGL_SIMD_H__
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define HAS_G4FLOAT 1
#include
typedef float g4float __attribute__ ((vector_size (4*sizeof(float))));
#define g4float_a(a) ((float *)(&a))
#define g4floatR(a) g4float_a(a)[0]
#define g4floatG(a) g4float_a(a)[1]
#define g4floatB(a) g4float_a(a)[2]
#define g4floatA(a) g4float_a(a)[3]
#define g4float(a,b,c,d) ((g4float){a,b,c,d})
#define g4float_all(val) g4float(val,val,val,val)
#define g4float_zero g4float_all(0.0)
#define g4float_one g4float_all(1.0)
#define g4float_half g4float_all(0.5)
#define g4float_half g4float_all(0.5)
#define g4float_mul(a,val) g4float_all(val)*(a)
#ifdef USE_SSE
#define g4float_sqrt(v) __builtin_ia32_sqrtps((v))
#define g4float_max(a,b) __builtin_ia32_maxps((a,b))
#define g4float_min(a,b) __builtin_ia32_minps((a,b))
#define g4float_rcp(a,b) __builtin_ia32_rcpps((v))
#else
#define g4float_sqrt(v) g4float(sqrt(g4floatR(v)),\
sqrt(g4floatG(v)),\
sqrt(g4floatB(v)),\
sqrt(g4floatA(v)))
#define g4float_rcp(v) g4float(1.0/(g4floatR(v)),\
1.0/(g4floatG(v)),\
1.0/(g4floatB(v)),\
1.0/(g4floatA(v)))
#define g4float_max(a,b) g4float(\
gfloat4R(a)>gfloat4R(b)?gfloat4R(a):gfloat4R(b),\
gfloat4G(a)>gfloat4G(b)?gfloat4G(a):gfloat4G(b),\
gfloat4B(a)>gfloat4B(b)?gfloat4B(a):gfloat4B(b),\
gfloat4A(a)>gfloat4A(b)?gfloat4A(a):gfloat4A(b))
#define g4float_min(a,b) g4float(\
gfloat4R(a)