[gegl] operations/external: port to gegl-op.h
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations/external: port to gegl-op.h
- Date: Tue, 20 May 2014 21:47:52 +0000 (UTC)
commit 032c5005059072dcb05b9c9d5ae5e687a1eead8e
Author: Øyvind Kolås <pippin gimp org>
Date: Tue May 20 23:47:36 2014 +0200
operations/external: port to gegl-op.h
gegl/gegl-op.h | 2 +-
operations/external/exr-load.cpp | 17 ++++----
operations/external/ff-load.c | 58 +++++++++++++------------
operations/external/jp2-load.c | 17 ++++----
operations/external/jpg-load.c | 17 ++++----
operations/external/jpg-save.c | 43 ++++++++++--------
operations/external/lcms-from-profile.c | 33 +++++++-------
operations/external/matting-levin.c | 24 +++++-----
operations/external/npy-save.c | 16 ++++----
operations/external/openraw.c | 54 ++++++++++++-----------
operations/external/path.c | 60 ++++++++++++++------------
operations/external/pixbuf.c | 18 ++++----
operations/external/png-load.c | 17 ++++----
operations/external/png-save.c | 26 ++++++-----
operations/external/ppm-load.c | 17 ++++----
operations/external/ppm-save.c | 25 ++++++-----
operations/external/rgbe-load.c | 17 ++++----
operations/external/rgbe-save.c | 16 ++++----
operations/external/save-pixbuf.c | 14 +++---
operations/external/sdl-display.c | 36 ++++++++--------
operations/external/svg-load.c | 28 +++++++------
operations/external/text.c | 71 +++++++++++++++++-------------
operations/external/v4l.c | 50 +++++++++++-----------
operations/external/vector-fill.c | 43 ++++++++++---------
operations/external/vector-stroke.c | 42 ++++++++++---------
operations/external/webp-load.c | 16 ++++----
operations/external/webp-save.c | 16 ++++----
27 files changed, 416 insertions(+), 377 deletions(-)
---
diff --git a/gegl/gegl-op.h b/gegl/gegl-op.h
index 0f4fde8..d34dcd1 100644
--- a/gegl/gegl-op.h
+++ b/gegl/gegl-op.h
@@ -777,7 +777,7 @@ gegl_op_class_intern_init (gpointer klass)
gboolean G_GNUC_UNUSED ui_range_set = FALSE;
gboolean G_GNUC_UNUSED ui_steps_set = FALSE;
gboolean G_GNUC_UNUSED ui_digits_set = FALSE;
- GParamFlags flags G_GNUC_UNUSED = G_PARAM_READWRITE | G_PARAM_CONSTRUCT | GEGL_PARAM_PAD_INPUT;
+ GParamFlags flags G_GNUC_UNUSED = (GParamFlags)(G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
GEGL_PARAM_PAD_INPUT);
object_class->set_property = set_property;
object_class->get_property = get_property;
diff --git a/operations/external/exr-load.cpp b/operations/external/exr-load.cpp
index 07fe80b..0961ba8 100644
--- a/operations/external/exr-load.cpp
+++ b/operations/external/exr-load.cpp
@@ -18,17 +18,18 @@
* Copyright 2006 Dominik Ernst <dernst gmx de>
*/
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, "File", "", "Path of file to load.")
+property_file_path (path, "File", "")
+ description ("Path of file to load.")
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "exr-load.cpp"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "exr-load.cpp"
extern "C" {
-#include "gegl-chant.h"
+#include "gegl-op.h"
}
#include <ImfInputFile.h>
@@ -617,7 +618,7 @@ query_exr (const gchar *path,
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle result = {0, 0, 10, 10};
gint w, h, ff;
gpointer format;
@@ -638,7 +639,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
int level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gint w,h,ff;
gpointer format;
gboolean ok;
@@ -665,7 +666,7 @@ get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 76b683d..9a46cf1 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -20,17 +20,21 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Path of video file to load"))
-gegl_chant_int (frame, _("Frame"), 0, 1000000, 0, _("Frame number"))
+property_file_path (path, _("File"), "")
+ description (_("Path of video file to load"))
+
+property_int (frame, _("Frame number"), 0)
+ value_range (0, G_MAXINT)
+ ui_range (0, 10000)
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "ff-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "ff-load.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <errno.h>
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
@@ -97,15 +101,15 @@ print_error (const char *filename, int err)
}
static void
-init (GeglChantO *o)
+init (GeglProperties *o)
{
static gint inited = 0; /*< this is actually meant to be static, only to be done once */
- Priv *p = (Priv*)o->chant_data;
+ Priv *p = (Priv*)o->user_data;
if (p==NULL)
{
p = g_new0 (Priv, 1);
- o->chant_data = (void*) p;
+ o->user_data = (void*) p;
}
p->width = 320;
@@ -124,9 +128,9 @@ init (GeglChantO *o)
/* FIXME: probably some more stuff to free here */
static void
-ff_cleanup (GeglChantO *o)
+ff_cleanup (GeglProperties *o)
{
- Priv *p = (Priv*)o->chant_data;
+ Priv *p = (Priv*)o->user_data;
if (p)
{
if (p->codec_name)
@@ -163,8 +167,8 @@ static int
decode_frame (GeglOperation *operation,
glong frame)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- Priv *p = (Priv*)o->chant_data;
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ Priv *p = (Priv*)o->user_data;
glong prevframe = p->prevframe;
glong decodeframe; /*< frame to be requested decoded */
@@ -252,14 +256,14 @@ decode_frame (GeglOperation *operation,
static void
prepare (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- Priv *p = (Priv*)o->chant_data;
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ Priv *p = (Priv*)o->user_data;
if (p == NULL)
init (o);
- p = (Priv*)o->chant_data;
+ p = (Priv*)o->user_data;
- g_assert (o->chant_data != NULL);
+ g_assert (o->user_data != NULL);
gegl_operation_set_format (operation, "output", babl_format ("R'G'B'A u8"));
@@ -355,7 +359,7 @@ static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
GeglRectangle result = {0,0,320,200};
- Priv *p = (Priv*)GEGL_CHANT_PROPERTIES (operation)->chant_data;
+ Priv *p = (Priv*)GEGL_PROPERTIES (operation)->user_data;
result.width = p->width;
result.height = p->height;
return result;
@@ -367,8 +371,8 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- Priv *p = (Priv*)o->chant_data;
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ Priv *p = (Priv*)o->user_data;
{
if (p->ic && !decode_frame (operation, o->frame))
@@ -425,21 +429,21 @@ process (GeglOperation *operation,
static void
finalize (GObject *object)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (object);
+ GeglProperties *o = GEGL_PROPERTIES (object);
- if (o->chant_data)
+ if (o->user_data)
{
- Priv *p = (Priv*)o->chant_data;
+ Priv *p = (Priv*)o->user_data;
g_free (p->loadedfilename);
g_free (p->fourcc);
g_free (p->codec_name);
- g_free (o->chant_data);
- o->chant_data = NULL;
+ g_free (o->user_data);
+ o->user_data = NULL;
}
- G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gegl_op_parent_class)->finalize (object);
}
static GeglRectangle
@@ -450,7 +454,7 @@ get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/jp2-load.c b/operations/external/jp2-load.c
index 08921ee..d28d467 100644
--- a/operations/external/jp2-load.c
+++ b/operations/external/jp2-load.c
@@ -20,16 +20,17 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Path of file to load"))
+property_file_path (path, _("File"), "")
+ description (_("Path of file to load"))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "jp2-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "jp2-load.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <stdio.h>
#include <jasper/jasper.h>
@@ -170,7 +171,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle rect = {0,0,0,0};
jas_image_t *image;
gint width, height, depth;
@@ -339,7 +340,7 @@ process (GeglOperation *operation,
static GeglRectangle
get_bounding_box (GeglOperation * operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle result = { 0, 0, 0, 0 };
gint width, height, depth;
@@ -378,7 +379,7 @@ get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/jpg-load.c b/operations/external/jpg-load.c
index 1e5cbdc..3ac1cf8 100644
--- a/operations/external/jpg-load.c
+++ b/operations/external/jpg-load.c
@@ -20,16 +20,17 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Path of file to load"))
+property_file_path (path, _("File"), "")
+ description (_("Path of file to load"))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "jpg-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "jpg-load.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <stdio.h>
#include <jpeglib.h>
@@ -141,7 +142,7 @@ gegl_jpg_load_buffer_import_jpg (GeglBuffer *gegl_buffer,
static GeglRectangle
gegl_jpg_load_get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gint width, height, components;
gint status;
status = gegl_jpg_load_query_jpg (o->path, &width, &height, &components);
@@ -168,7 +169,7 @@ gegl_jpg_load_process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
if (gegl_jpg_load_buffer_import_jpg (output, o->path, 0, 0))
{
@@ -189,7 +190,7 @@ gegl_jpg_load_get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/jpg-save.c b/operations/external/jpg-save.c
index f5f06c0..df7bac9 100644
--- a/operations/external/jpg-save.c
+++ b/operations/external/jpg-save.c
@@ -20,27 +20,32 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_file_path (path, _("File"), "",
- _("Target path and filename, use '-' for stdout"))
-gegl_chant_int (quality, _("Quality"), 1, 100, 90,
- _("JPEG compression quality (between 1 and 100)"))
-gegl_chant_int (smoothing, _("Smoothing"),
- 0, 100, 0, _("Smoothing factor from 1 to 100; 0 disables smoothing"))
-gegl_chant_boolean (optimize, _("Optimize"), TRUE,
- _("Use optimized huffman tables"))
-gegl_chant_boolean (progressive, _("Progressive"), TRUE,
- _("Create progressive JPEG images"))
-gegl_chant_boolean (grayscale, _("Grayscale"), FALSE,
- _("Create a grayscale (monochrome) image"))
+#ifdef GEGL_PROPERTIES
+
+property_file_path (path, _("File"), "")
+ description (_("Target path and filename, use '-' for stdout"))
+
+property_int (quality, _("Quality"), 90)
+ description (_("JPEG compression quality (between 1 and 100)"))
+ value_range (1, 100)
+
+property_int (smoothing, _("Smoothing"), 0)
+ description(_("Smoothing factor from 1 to 100; 0 disables smoothing"))
+ value_range (0, 100)
+
+property_boolean (optimize, _("Optimize"), TRUE)
+ description (_("Use optimized huffman tables"))
+property_boolean (progressive, _("Progressive"), TRUE)
+ description (_("Create progressive JPEG images"))
+property_boolean (grayscale, _("Grayscale"), FALSE)
+ description (_("Create a grayscale (monochrome) image"))
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "jpg-save.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "jpg-save.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <stdio.h>
#include <jpeglib.h>
@@ -163,7 +168,7 @@ gegl_jpg_save_process (GeglOperation *operation,
const GeglRectangle *result,
int level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gegl_buffer_export_jpg (input, o->path, o->quality, o->smoothing,
o->optimize, o->progressive, o->grayscale,
@@ -174,7 +179,7 @@ gegl_jpg_save_process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
diff --git a/operations/external/lcms-from-profile.c b/operations/external/lcms-from-profile.c
index 47ba036..87d4c21 100644
--- a/operations/external/lcms-from-profile.c
+++ b/operations/external/lcms-from-profile.c
@@ -19,35 +19,36 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_pointer (src_profile, _("Source Profile"),
+property_pointer (src_profile, _("Source Profile"),
_("The cmsHPROFILE corresponding to the icc profile for "
"the input data."))
/* These are positioned so their values match up with the LCMS enum */
-gegl_chant_register_enum (gegl_rendering_intent)
+enum_start (gegl_rendering_intent)
enum_value (GEGL_RENDERING_INTENT_PERCEPTUAL, "Perceptual")
enum_value (GEGL_RENDERING_INTENT_RELATIVE_COLORIMETRIC, "Relative Colorimetric")
enum_value (GEGL_RENDERING_INTENT_SATURATION, "Saturation")
enum_value (GEGL_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, "Absolute Colorimetric")
/* TODO: Add the K_ONLY and K_PLANE intents */
-gegl_chant_register_enum_end (GeglRenderingIntent)
+enum_end (GeglRenderingIntent)
-gegl_chant_enum (intent, _("Rendering Intent"),
+property_enum (intent, _("Rendering Intent"),
GeglRenderingIntent, gegl_rendering_intent,
- GEGL_RENDERING_INTENT_PERCEPTUAL,
- _("The rendering intent to use in the conversion."))
+ GEGL_RENDERING_INTENT_PERCEPTUAL)
+ description(_("The rendering intent to use in the conversion."))
-gegl_chant_boolean (black_point_compensation, _("Black Point Compensation"),
- FALSE, _("Convert using black point compensation."))
+property_boolean (black_point_compensation, _("Black Point Compensation"),
+ FALSE)
+ description (_("Convert using black point compensation."))
#else
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE "lcms-from-profile.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE "lcms-from-profile.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <lcms2.h>
static void prepare (GeglOperation *operation)
@@ -128,7 +129,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
cmsHTRANSFORM transform;
const Babl *in_format, *out_format;
@@ -200,10 +201,10 @@ operation_process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglOperationClass *operation_class;
- operation_class = GEGL_OPERATION_CLASS (gegl_chant_parent_class);
+ operation_class = GEGL_OPERATION_CLASS (gegl_op_parent_class);
/* If the profile is NULL, simply become a nop */
if (!o->src_profile)
@@ -219,7 +220,7 @@ operation_process (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
diff --git a/operations/external/matting-levin.c b/operations/external/matting-levin.c
index 1cbff3f..ba99d43 100644
--- a/operations/external/matting-levin.c
+++ b/operations/external/matting-levin.c
@@ -21,30 +21,30 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_int (epsilon, _("Epsilon"),
+#ifdef GEGL_PROPERTIES
+property_int (epsilon, _("Epsilon"),
-9, -1, -6,
_("Log of the error weighting"))
-gegl_chant_int (radius, _("Radius"),
+property_int (radius, _("Radius"),
1, 3, 1,
_("Radius of the processing window"))
-gegl_chant_double (threshold, _("Threshold"),
+property_double (threshold, _("Threshold"),
0.0, 0.1, 0.02,
_("Alpha threshold for multilevel processing"))
-gegl_chant_double (lambda, _("Lambda"),
+property_double (lambda, _("Lambda"),
0.0, 100.0, 100.0, _("Trimap influence factor"))
-gegl_chant_int (levels, _("Levels"),
+property_int (levels, _("Levels"),
0, 8, 4,
_("Number of downsampled levels to use"))
-gegl_chant_int (active_levels, _("Active Levels"),
+property_int (active_levels, _("Active Levels"),
0, 8, 2,
_("Number of levels to perform solving"))
#else
-#define GEGL_CHANT_TYPE_COMPOSER
-#define GEGL_CHANT_C_FILE "matting-levin.c"
+#define GEGL_OP_COMPOSER
+#define GEGL_OP_C_FILE "matting-levin.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include "gegl-debug.h"
#include <stdlib.h>
@@ -1387,7 +1387,7 @@ matting_process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- const GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ const GeglProperties *o = GEGL_PROPERTIES (operation);
gdouble *input = NULL,
*trimap = NULL;
gdouble *output = NULL;
@@ -1427,7 +1427,7 @@ matting_process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationComposerClass *composer_class;
diff --git a/operations/external/npy-save.c b/operations/external/npy-save.c
index 5838346..458dbc2 100644
--- a/operations/external/npy-save.c
+++ b/operations/external/npy-save.c
@@ -26,17 +26,17 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "",
- _("Target path and filename, use '-' for stdout."))
+property_file_path (path, _("File"), "")
+ description (_("Target path and filename, use '-' for stdout."))
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "npy-save.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "npy-save.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <stdio.h>
static int npywrite_header(FILE *fp, int width, int height, int num_channels)
@@ -71,7 +71,7 @@ process (GeglOperation *operation,
const GeglRectangle *rect,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
FILE *fp;
guchar *data;
@@ -126,7 +126,7 @@ process (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
diff --git a/operations/external/openraw.c b/operations/external/openraw.c
index 9fc1e95..18b8c54 100644
--- a/operations/external/openraw.c
+++ b/operations/external/openraw.c
@@ -18,15 +18,17 @@
*/
#include "config.h"
+#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, "File", "", "Path of file to load.")
+property_file_path (path, "File", "")
+ description (_("Path of file to load."))
#else
#include "gegl-plugin.h"
-struct _GeglChant
+struct _GeglOp
{
GeglOperationSource parent_instance;
gpointer properties;
@@ -37,10 +39,10 @@ struct _GeglChant
typedef struct
{
GeglOperationSourceClass parent_class;
-} GeglChantClass;
+} GeglOpClass;
-#define GEGL_CHANT_C_FILE "openraw.c"
-#include "gegl-chant.h"
+#define GEGL_OP_C_FILE "openraw.c"
+#include "gegl-op.h"
GEGL_DEFINE_DYNAMIC_OPERATION(GEGL_TYPE_OPERATION_SOURCE)
#include <stdio.h>
@@ -60,14 +62,14 @@ destroy_rawdata (void * rawdata)
static void
free_buffer (GeglOperation * operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- GeglChant *self = GEGL_CHANT(operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ GeglOp *self = GEGL_OP(operation);
- if (o->chant_data)
+ if (o->user_data)
{
g_assert (self->cached_path);
- g_object_unref (o->chant_data);
- o->chant_data = NULL;
+ g_object_unref (o->user_data);
+ o->user_data = NULL;
}
if (self->cached_path)
@@ -85,8 +87,8 @@ free_buffer (GeglOperation * operation)
static GeglBuffer *
load_buffer (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- GeglChant *self = GEGL_CHANT(operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ GeglOp *self = GEGL_OP(operation);
ORRawDataRef rawdata;
ORRawFileRef rawfile;
@@ -97,9 +99,9 @@ load_buffer (GeglOperation *operation)
free_buffer(operation);
}
- if (o->chant_data)
+ if (o->user_data)
{
- return o->chant_data;
+ return o->user_data;
}
g_assert (self->cached_path == NULL);
@@ -132,8 +134,8 @@ load_buffer (GeglOperation *operation)
extent.width = width;
extent.height = height;
- g_assert (o->chant_data == NULL);
- o->chant_data = gegl_buffer_linear_new_from_data(data,
+ g_assert (o->user_data == NULL);
+ o->user_data = gegl_buffer_linear_new_from_data(data,
babl_format ("Y u16"),
&extent,
GEGL_AUTO_ROWSTRIDE,
@@ -146,7 +148,7 @@ load_buffer (GeglOperation *operation)
clean_file:
or_rawfile_release(rawfile);
- return o->chant_data;
+ return o->user_data;
}
@@ -160,14 +162,14 @@ prepare (GeglOperation *operation)
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
if (!load_buffer (operation))
{
GeglRectangle nullrect = { 0, 0, 0, 0 };
return nullrect;
}
- return *gegl_buffer_get_extent (o->chant_data);
+ return *gegl_buffer_get_extent (o->user_data);
}
@@ -186,7 +188,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
g_assert (g_str_equal (output_pad, "output"));
if (!load_buffer (operation))
@@ -199,9 +201,9 @@ process (GeglOperation *operation,
* we continue to service metadata calls after giving the object to the
* context.
*/
- g_assert(o->chant_data);
- gegl_operation_context_take_object (context, "output", G_OBJECT (o->chant_data));
- g_object_ref (G_OBJECT (o->chant_data));
+ g_assert(o->user_data);
+ gegl_operation_context_take_object (context, "output", G_OBJECT (o->user_data));
+ g_object_ref (G_OBJECT (o->user_data));
return TRUE;
}
@@ -214,12 +216,12 @@ finalize (GObject *object)
{
free_buffer (GEGL_OPERATION (object));
- G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gegl_op_parent_class)->finalize (object);
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
static gboolean done = FALSE;
diff --git a/operations/external/path.c b/operations/external/path.c
index 2b3ac86..52677d0 100644
--- a/operations/external/path.c
+++ b/operations/external/path.c
@@ -21,39 +21,43 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
+property_color (fill, _("Fill Color"), "rgba(0.0,0.0,0.0,0.6)")
+ description(_("Color of paint to use for filling, use 0 opacity to disable filling"))
-gegl_chant_color (fill, _("Fill Color"), "rgba(0.0,0.0,0.0,0.6)",
- _("Color of paint to use for filling, use 0 opacity to disable filling"))
-gegl_chant_color (stroke, _("Stroke Color"), "rgba(0.0,0.0,0.0,0.0)",
- _("Color of paint to use for stroking"))
+property_color (stroke, _("Stroke Color"), "rgba(0.0,0.0,0.0,0.0)")
+ description(_("Color of paint to use for stroking"))
-gegl_chant_double (stroke_width,_("Stroke width"), 0.0, 200.0, 2.0,
- _("The width of the brush used to stroke the path"))
+property_double (stroke_width,_("Stroke width"), 2.0)
+ description (_("The width of the brush used to stroke the path"))
+ value_range (0.0, 200.0)
-gegl_chant_double (stroke_opacity, _("Stroke opacity"), -2.0, 2.0, 1.0,
- _("Opacity of stroke, note, does not behave like SVG since at the moment
stroking is done using an airbrush tool"))
+property_double (stroke_opacity, _("Stroke opacity"), 1.0)
+ description (_("Opacity of stroke, note, does not behave like SVG since at the moment stroking is done
using an airbrush tool"))
+ value_range (-2.0, 2.0)
-gegl_chant_double (stroke_hardness, _("Hardness"), 0.0, 1.0, 0.6,
- _("Hardness of the brush, 0.0 for a soft brush, 1.0 for a hard brush"))
+property_double (stroke_hardness, _("Hardness"), 0.6)
+ description (_("Hardness of the brush, 0.0 for a soft brush, 1.0 for a hard brush"))
+ value_range (0.0, 1.0)
-gegl_chant_string (fill_rule,_("Fill rule"), "nonzero",
- _("How to determine what to fill (nonzero|evenodd)"))
+property_string (fill_rule,_("Fill rule"), "nonzero")
+ description(_("How to determine what to fill (nonzero|evenodd)"))
-gegl_chant_string (transform,_("Transform"), "",
- _("SVG style description of transform"))
+property_string (transform,_("Transform"), "")
+ description(_("SVG style description of transform"))
-gegl_chant_double (fill_opacity, _("Fill opacity"), -2.0, 2.0, 1.0,
- _("The fill opacity to use"))
+property_double (fill_opacity, _("Fill opacity"), 1.0)
+ description(_("The fill opacity to use"))
+ value_range (-2.0, 2.0)
-gegl_chant_path (d, _("Vector"),
- _("A GeglVector representing the path of the stroke"))
+property_path (d, _("Vector"), NULL)
+ description (_("A GeglVector representing the path of the stroke"))
#else
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE "path.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE "path.c"
#include "gegl-plugin.h"
#include "gegl-path.h"
@@ -61,7 +65,7 @@ static void path_changed (GeglPath *path,
const GeglRectangle *roi,
gpointer userdata);
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <cairo.h>
#include <math.h>
@@ -295,7 +299,7 @@ static void path_changed (GeglPath *path,
gpointer userdata)
{
GeglRectangle rect = *roi;
- GeglChantO *o = GEGL_CHANT_PROPERTIES (userdata);
+ GeglProperties *o = GEGL_PROPERTIES (userdata);
/* invalidate the incoming rectangle */
rect.x -= o->stroke_width/2;
@@ -309,7 +313,7 @@ static void path_changed (GeglPath *path,
static void
prepare (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gegl_operation_set_format (operation, "output", babl_format ("R'aG'aB'aA float"));
if (o->transform && o->transform[0] != '\0')
{
@@ -322,7 +326,7 @@ prepare (GeglOperation *operation)
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle defined = { 0, 0, 512, 512 };
GeglRectangle *in_rect;
gdouble x0, x1, y0, y1;
@@ -353,7 +357,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
if (input)
{
@@ -451,7 +455,7 @@ static GeglNode *detect (GeglOperation *operation,
gint x,
gint y)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
cairo_t *cr;
cairo_surface_t *surface;
gchar *data = " ";
@@ -489,7 +493,7 @@ static GeglNode *detect (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
diff --git a/operations/external/pixbuf.c b/operations/external/pixbuf.c
index 8e5f28f..c738c24 100644
--- a/operations/external/pixbuf.c
+++ b/operations/external/pixbuf.c
@@ -20,23 +20,23 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_pointer (pixbuf, _("Pixbuf"), _("GdkPixbuf to use"))
+property_pointer (pixbuf, _("Pixbuf"), _("GdkPixbuf to use"))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "pixbuf.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "pixbuf.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixdata.h>
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle result = {0,0,0,0};
if (!o->pixbuf)
@@ -53,7 +53,7 @@ get_bounding_box (GeglOperation *operation)
static void prepare (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gegl_operation_set_format (operation, "output",
babl_format(gdk_pixbuf_get_has_alpha(o->pixbuf)?"R'G'B'A u8":"R'G'B' u8"));
}
@@ -64,7 +64,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
if (o->pixbuf)
{
@@ -83,7 +83,7 @@ process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/png-load.c b/operations/external/png-load.c
index 0505934..a35c08b 100644
--- a/operations/external/png-load.c
+++ b/operations/external/png-load.c
@@ -22,16 +22,17 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+property_file_path (path, _("File"), "")
+ description (_("Path of file to load."))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "png-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "png-load.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <png.h>
static FILE * open_png(const gchar *path)
@@ -368,7 +369,7 @@ static gint query_png (const gchar *path,
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle result = {0,0,0,0};
gint width, height;
gint status;
@@ -394,7 +395,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gint problem;
gpointer format;
gint width, height;
@@ -428,7 +429,7 @@ get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/png-save.c b/operations/external/png-save.c
index 18d9033..313e2f8 100644
--- a/operations/external/png-save.c
+++ b/operations/external/png-save.c
@@ -21,21 +21,23 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "",
- _("Target path and filename, use '-' for stdout."))
-gegl_chant_int (compression, _("Compression"),
- 1, 9, 1, _("PNG compression level from 1 to 9"))
-gegl_chant_int (bitdepth, _("Bitdepth"),
- 8, 16, 16, _("8 and 16 are amongst the currently accepted values."))
+property_file_path (path, _("File"), "")
+ description (_("Target path and filename, use '-' for stdout."))
+property_int (compression, _("Compression"), 3)
+ description (_("PNG compression level from 1 to 9"))
+ value_range (1, 9)
+property_int (bitdepth, _("Bitdepth"), 16)
+ description(_("8 and 16 are the currently accepted values."))
+ value_range (8, 16)
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "png-save.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "png-save.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <png.h>
#include <stdio.h>
@@ -200,7 +202,7 @@ gegl_png_save_process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gegl_buffer_export_png (input, o->path, o->compression, o->bitdepth,
result->x, result->y,
@@ -210,7 +212,7 @@ gegl_png_save_process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
index d299498..0175d8c 100644
--- a/operations/external/ppm-load.c
+++ b/operations/external/ppm-load.c
@@ -20,21 +20,22 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+property_file_path (path, _("File"), "")
+ description (_("Path of file to load."))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "ppm-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "ppm-load.c"
#define MAX_CHARS_IN_ROW 500
#define CHANNEL_COUNT 3
#define CHANNEL_COUNT_GRAY 1
#define ASCII_P 'P'
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -218,7 +219,7 @@ ppm_load_read_image(FILE *fp,
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle result = {0,0,0,0};
pnm_struct img;
FILE *fp;
@@ -268,7 +269,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
FILE *fp;
pnm_struct img;
GeglRectangle rect = {0,0,0,0};
@@ -363,7 +364,7 @@ get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/ppm-save.c b/operations/external/ppm-save.c
index bed723a..2edcef8 100644
--- a/operations/external/ppm-save.c
+++ b/operations/external/ppm-save.c
@@ -20,23 +20,24 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "",
- _("Target path and filename, use '-' for stdout."))
-gegl_chant_boolean (rawformat, _("Raw format"), TRUE, _("Raw format"))
-gegl_chant_int (bitdepth, _("Bitdepth"),
- 8, 16, 16,
- _("8 and 16 are amongst the currently accepted values."))
+property_file_path (path, _("File"), "")
+ description (_("Target path and filename, use '-' for stdout."))
+
+property_boolean (rawformat, _("Raw format"), TRUE)
+property_int (bitdepth, _("Bitdepth"), 16)
+ description (_("8 and 16 are the currently accepted values."))
+ value_range (8, 16)
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "ppm-save.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "ppm-save.c"
#define CHANNEL_COUNT 3
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <stdio.h>
typedef enum {
@@ -115,7 +116,7 @@ process (GeglOperation *operation,
const GeglRectangle *rect,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
FILE *fp;
guchar *data;
@@ -172,7 +173,7 @@ process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
diff --git a/operations/external/rgbe-load.c b/operations/external/rgbe-load.c
index 785b8cc..4b7a286 100644
--- a/operations/external/rgbe-load.c
+++ b/operations/external/rgbe-load.c
@@ -21,16 +21,17 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+property_file_path (path, _("File"), "")
+ description (_("Path of file to load."))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "rgbe-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "rgbe-load.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include "rgbe/rgbe.h"
@@ -44,7 +45,7 @@ static const gchar* FORMAT = "RGBA float";
static GeglRectangle
gegl_rgbe_load_get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle result = {0,0,0,0};
rgbe_file *file;
guint width, height;
@@ -75,7 +76,7 @@ gegl_rgbe_load_process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gboolean success = FALSE;
gfloat *pixels = NULL;
rgbe_file *file;
@@ -117,7 +118,7 @@ gegl_rgbe_load_get_cached_region (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/rgbe-save.c b/operations/external/rgbe-save.c
index 7109554..c765496 100644
--- a/operations/external/rgbe-save.c
+++ b/operations/external/rgbe-save.c
@@ -21,17 +21,17 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "",
- _("Target path and filename, use '-' for stdout."))
+property_file_path (path, _("File"), "")
+ description (_("Target path and filename, use '-' for stdout."))
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "rgbe-save.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "rgbe-save.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include "rgbe/rgbe.h"
@@ -44,7 +44,7 @@ gegl_rgbe_save_process (GeglOperation *operation,
const GeglRectangle *rect,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gfloat *pixels = NULL;
gboolean success = FALSE;
@@ -68,7 +68,7 @@ cleanup:
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
diff --git a/operations/external/save-pixbuf.c b/operations/external/save-pixbuf.c
index cb5b1d3..243882b 100644
--- a/operations/external/save-pixbuf.c
+++ b/operations/external/save-pixbuf.c
@@ -23,17 +23,17 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_pointer (pixbuf, _("Pixbuf location"),
+property_pointer (pixbuf, _("Pixbuf location"),
_("The location where to store the output GdkPixbuf."))
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "save-pixbuf.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "save-pixbuf.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
static gboolean
@@ -42,7 +42,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
if (o->pixbuf)
{
@@ -89,7 +89,7 @@ process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
diff --git a/operations/external/sdl-display.c b/operations/external/sdl-display.c
index 85097e9..ef0674e 100644
--- a/operations/external/sdl-display.c
+++ b/operations/external/sdl-display.c
@@ -20,18 +20,18 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_string (window_title, _(""), "window_title",
- _("Title to be given to output window"))
-gegl_chant_string (icon_title, _(""), "icon_title",
- _("Icon to be used for output window"))
+property_string (window_title, _(""), "window_title")
+ description (_("Title to be given to output window"))
+property_string (icon_title, _(""), "icon_title")
+ description (_("Icon to be used for output window"))
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "sdl-display.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "sdl-display.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <SDL.h>
typedef struct {
@@ -81,12 +81,12 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
SDLState *state = NULL;
- if(!o->chant_data)
- o->chant_data = g_new0 (SDLState, 1);
- state = o->chant_data;
+ if(!o->user_data)
+ o->user_data = g_new0 (SDLState, 1);
+ state = o->user_data;
init_sdl ();
@@ -139,19 +139,19 @@ process (GeglOperation *operation,
static void
finalize (GObject *object)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (object);
+ GeglProperties *o = GEGL_PROPERTIES (object);
- if (o->chant_data)
+ if (o->user_data)
{
- g_free (o->chant_data);
- o->chant_data = NULL;
+ g_free (o->user_data);
+ o->user_data = NULL;
}
- G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gegl_op_parent_class)->finalize (object);
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
diff --git a/operations/external/svg-load.c b/operations/external/svg-load.c
index 74a6d97..4a0b174 100644
--- a/operations/external/svg-load.c
+++ b/operations/external/svg-load.c
@@ -20,21 +20,23 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "",
- _("Path to SVG file to load"))
-gegl_chant_int (width, _("Width"), -1, G_MAXINT, -1,
- _("Width for rendered image"))
-gegl_chant_int (height, _("Height"), -1, G_MAXINT, -1,
- _("Height for rendered image"))
+property_file_path (path, _("File"), "")
+ description (_("Path to SVG file to load"))
+
+property_int (width, _("Width"), -1)
+ description (_("Width for rendered image"))
+
+property_int (height, _("Height"), -1)
+ description (_("Height for rendered image"))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "svg-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "svg-load.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <cairo.h>
#include <librsvg/rsvg.h>
@@ -103,7 +105,7 @@ gegl_buffer_import_svg (GeglBuffer *gegl_buffer,
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gint width = o->width;
gint height = o->height;
@@ -141,7 +143,7 @@ process (GeglOperation *operation,
const GeglRectangle *result_foo,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gint result;
gint width, height;
@@ -161,7 +163,7 @@ process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/text.c b/operations/external/text.c
index 19ec92c..52f646f 100644
--- a/operations/external/text.c
+++ b/operations/external/text.c
@@ -20,25 +20,34 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_multiline (string, _("Text"), "Hello",
- _("String to display (utf8)"))
-gegl_chant_string (font, _("Font family"), "Sans",
- _("Font family (utf8)"))
-gegl_chant_double (size, _("Size"), 1.0, 2048.0, 10.0,
- _("Approximate height of text in pixels."))
-gegl_chant_color (color, _("Color"), "black",
- _("Color for the text (defaults to 'white')"))
-gegl_chant_int (wrap, _("Wrap width"), -1, 1000000, -1,
- _("Sets the width in pixels at which long lines will wrap. "
+#ifdef GEGL_PROPERTIES
+
+property_string (string, _("Text"), "Hello")
+ description(_("String to display (utf8)"))
+ ui_meta ("multiline", "true")
+
+property_string (font, _("Font family"), "Sans")
+ description(_("Font family (utf8)"))
+
+property_double (size, _("Size"), 10.0)
+ description (_("Approximate height of text in pixels."))
+ value_range (1.0, 2048.0)
+
+property_color (color, _("Color"), "black")
+ description(_("Color for the text (defaults to 'white')"))
+property_int (wrap, _("Wrap width"), -1)
+ description (_("Sets the width in pixels at which long lines will wrap. "
"Use -1 for no wrapping."))
-gegl_chant_int (alignment, _("Justification"), 0, 2, 0,
- _("Alignment for multi-line text (0=Left, 1=Center, 2=Right)"))
-gegl_chant_int (width, _("Width"), 0, 1000000, 0,
- _("Rendered width in pixels. (read only)"))
-gegl_chant_int (height, _("Height"), 0, 1000000, 0,
- _("Rendered height in pixels. (read only)"))
+ value_range (-1, 1000000)
+
+property_int (alignment, _("Justification"), 0)
+ value_range (0, 2)
+ description (_("Alignment for multi-line text (0=Left, 1=Center, 2=Right)"))
+
+property_int (width, _("Width"), 0)
+ description (_("Rendered width in pixels. (read only)"))
+property_int (height, _("Height"), 0)
+ description (_("Rendered height in pixels. (read only)"))
#else
@@ -48,7 +57,7 @@ gegl_chant_int (height, _("Height"), 0, 1000000, 0,
#include <pango/pangocairo.h>
/* XXX: this struct is unneeded and could be folded directly into
- * struct _GeglChant
+ * struct _GeglOp
*/
typedef struct {
gchar *string;
@@ -59,7 +68,7 @@ typedef struct {
GeglRectangle defined;
} CachedExtent;
-struct _GeglChant
+struct _GeglOp
{
GeglOperationSource parent_instance;
gpointer properties;
@@ -69,23 +78,23 @@ struct _GeglChant
typedef struct
{
GeglOperationSourceClass parent_class;
-} GeglChantClass;
+} GeglOpClass;
-#define GEGL_CHANT_C_FILE "text.c"
-#include "gegl-chant.h"
+#define GEGL_OP_C_FILE "text.c"
+#include "gegl-op.h"
GEGL_DEFINE_DYNAMIC_OPERATION (GEGL_TYPE_OPERATION_SOURCE)
-static void text_layout_text (GeglChant *self,
+static void text_layout_text (GeglOp *self,
cairo_t *cr,
gdouble rowstride,
gdouble *width,
gdouble *height)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (self);
+ GeglProperties *o = GEGL_PROPERTIES (self);
PangoFontDescription *desc;
PangoLayout *layout;
PangoAttrList *attrs;
@@ -173,7 +182,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChant *self = GEGL_CHANT (operation);
+ GeglOp *self = GEGL_OP (operation);
guchar *data = g_new0 (guchar, result->width * result->height * 4);
cairo_t *cr;
@@ -202,8 +211,8 @@ process (GeglOperation *operation,
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChant *self = GEGL_CHANT (operation);
- GeglChantO *o = GEGL_CHANT_PROPERTIES (self);
+ GeglOp *self = GEGL_OP (operation);
+ GeglProperties *o = GEGL_PROPERTIES (self);
CachedExtent *extent;
gint status = FALSE;
@@ -262,14 +271,14 @@ get_bounding_box (GeglOperation *operation)
static void
finalize (GObject *object)
{
- GeglChant *self = GEGL_CHANT (object);
+ GeglOp *self = GEGL_OP (object);
if (self->cex.string)
g_free (self->cex.string);
if (self->cex.font)
g_free (self->cex.font);
- G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gegl_op_parent_class)->finalize (object);
}
static void
@@ -280,7 +289,7 @@ prepare (GeglOperation *operation)
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
diff --git a/operations/external/v4l.c b/operations/external/v4l.c
index fc75ac5..b7b9fc0 100644
--- a/operations/external/v4l.c
+++ b/operations/external/v4l.c
@@ -21,22 +21,22 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("Path"), "/dev/video0", _("Path to v4l device"))
-gegl_chant_int (width, _("Width"), 0, G_MAXINT, 320, _("Width for rendered image"))
-gegl_chant_int (height, _("Height"), 0, G_MAXINT, 240, _("Height for rendered image"))
-gegl_chant_int (frame, _("Frame"), 0, G_MAXINT, 0,
+property_file_path (path, _("Path"), "/dev/video0", _("Path to v4l device"))
+property_int (width, _("Width"), 0, G_MAXINT, 320, _("Width for rendered image"))
+property_int (height, _("Height"), 0, G_MAXINT, 240, _("Height for rendered image"))
+property_int (frame, _("Frame"), 0, G_MAXINT, 0,
_("current frame number, can be changed to trigger a reload of the image."))
-gegl_chant_int (fps, _("FPS"), 0, G_MAXINT, 0,
+property_int (fps, _("FPS"), 0, G_MAXINT, 0,
_("autotrigger reload this many times a second."))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "v4l.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "v4l.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include "v4lutils/v4lutils.h"
#include "v4lutils/v4lutils.c"
@@ -54,14 +54,14 @@ typedef struct
} Priv;
static void
-init (GeglChantO *o)
+init (GeglProperties *o)
{
- Priv *p = (Priv*)o->chant_data;
+ Priv *p = (Priv*)o->user_data;
if (p==NULL)
{
p = g_new0 (Priv, 1);
- o->chant_data = (void*) p;
+ o->user_data = (void*) p;
}
p->w = 320;
@@ -73,7 +73,7 @@ static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
GeglRectangle result ={0,0,320,200};
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
result.width = o->width;
result.height = o->height;
@@ -83,12 +83,12 @@ get_bounding_box (GeglOperation *operation)
static void
prepare (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- Priv *p= (Priv*)o->chant_data;
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ Priv *p= (Priv*)o->user_data;
if (p == NULL)
init (o);
- p = (Priv*)o->chant_data;
+ p = (Priv*)o->user_data;
gegl_operation_set_format (operation, "output",
babl_format_new (
@@ -174,11 +174,11 @@ prepare (GeglOperation *operation)
static void
finalize (GObject *object)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (object);
+ GeglProperties *o = GEGL_PROPERTIES (object);
- if (o->chant_data)
+ if (o->user_data)
{
- Priv *p = (Priv*)o->chant_data;
+ Priv *p = (Priv*)o->user_data;
if (p->vd)
{
@@ -186,11 +186,11 @@ finalize (GObject *object)
v4lclose (p->vd);
g_free (p->vd);
}
- g_free (o->chant_data);
- o->chant_data = NULL;
+ g_free (o->user_data);
+ o->user_data = NULL;
}
- G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gegl_op_parent_class)->finalize (object);
}
static gboolean update (gpointer operation)
@@ -206,8 +206,8 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- Priv *p = (Priv*)o->chant_data;
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ Priv *p = (Priv*)o->user_data;
guchar *capbuf;
static gboolean inited = FALSE;
@@ -301,7 +301,7 @@ get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/vector-fill.c b/operations/external/vector-fill.c
index 354a88c..7384630 100644
--- a/operations/external/vector-fill.c
+++ b/operations/external/vector-fill.c
@@ -21,28 +21,29 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
+property_color (color, _("Color"), "rgba(0.0,0.0,0.0,1.0)")
+ description(_("Color of paint to use for filling."))
-gegl_chant_color (color, _("Color"), "rgba(0.0,0.0,0.0,1.0)",
- _("Color of paint to use for filling."))
+property_double (opacity, _("Opacity"), 1.0)
+ description(_("The fill opacity to use."))
+ value_range (-2.0, 2.0)
-gegl_chant_double (opacity, _("Opacity"), -2.0, 2.0, 1.0,
- _("The fill opacity to use."))
+ /* XXX: replace with enum? */
+property_string (fill_rule,_("Fill rule."), "nonzero")
+ description(_("how to determine what to fill (nonzero|evenodd)"))
-gegl_chant_string (fill_rule,_("Fill rule."), "nonzero",
- _("how to determine what to fill (nonzero|evenodd)"))
+property_string (transform,_("Transform"), "")
+ description (_("svg style description of transform."))
-gegl_chant_string (transform,_("Transform"), "",
- _("svg style description of transform."))
-
-gegl_chant_path (d, _("Vector"),
- _("A GeglVector representing the path of the stroke"))
+property_path (d, _("Vector"), NULL)
+ description (_("A GeglVector representing the path of the stroke"))
#else
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE "vector-fill.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE "vector-fill.c"
#include "gegl-plugin.h"
@@ -52,14 +53,14 @@ static void path_changed (GeglPath *path,
const GeglRectangle *roi,
gpointer userdata);
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <cairo.h>
static void path_changed (GeglPath *path,
const GeglRectangle *roi,
gpointer userdata)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (userdata);
+ GeglProperties *o = GEGL_PROPERTIES (userdata);
GeglRectangle rect;
gdouble x0, x1, y0, y1;
@@ -75,7 +76,7 @@ static void path_changed (GeglPath *path,
static void
prepare (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gegl_operation_set_format (operation, "output", babl_format ("R'aG'aB'aA float"));
if (o->transform && o->transform[0] != '\0')
@@ -89,7 +90,7 @@ prepare (GeglOperation *operation)
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle defined = { 0, 0, 512, 512 };
GeglRectangle *in_rect;
gdouble x0, x1, y0, y1;
@@ -120,7 +121,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gboolean need_fill = FALSE;
gdouble color[4] = {0, 0, 0, 0};
@@ -207,7 +208,7 @@ static GeglNode *detect (GeglOperation *operation,
gint x,
gint y)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
cairo_t *cr;
cairo_surface_t *surface;
gchar *data = " ";
@@ -239,7 +240,7 @@ static GeglNode *detect (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
diff --git a/operations/external/vector-stroke.c b/operations/external/vector-stroke.c
index 2d832ea..5f8c444 100644
--- a/operations/external/vector-stroke.c
+++ b/operations/external/vector-stroke.c
@@ -21,28 +21,30 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_color (color, _("Color"), "rgba(0.0,0.0,0.0,1.0)",
- _("Color of paint to use for stroking."))
+property_color (color, _("Color"), "rgba(0.0,0.0,0.0,1.0)")
+ description (_("Color of paint to use for stroking."))
-gegl_chant_double (width, _("Width"), 0.0, 200.0, 2.0,
- _("The width of the brush used to stroke the path."))
+property_double (width, _("Width"), 2.0)
+ value_range (0.0, 200.0)
+ description (_("The width of the brush used to stroke the path."))
-gegl_chant_double (opacity, _("Opacity"), -2.0, 2.0, 1.0,
- _("Opacity of stroke, note, does not behave like SVG since at the moment
stroking is done using an airbrush tool."))
+property_double (opacity, _("Opacity"), 1.0)
+ value_range (-2.0, 2.0)
+ description (_("Opacity of stroke, note, does not behave like SVG since at the moment stroking is done
using an airbrush tool."))
-gegl_chant_string (transform,_("Transform"), "",
- _("svg style description of transform."))
+property_string (transform,_("Transform"), "")
+ description (_("svg style description of transform."))
-gegl_chant_path (d, _("Vector"),
- _("A GeglVector representing the path of the stroke"))
+property_path (d, _("Vector"), NULL)
+ description (_("A GeglVector representing the path of the stroke"))
#else
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE "vector-stroke.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE "vector-stroke.c"
#include "gegl-plugin.h"
@@ -52,7 +54,7 @@ static void path_changed (GeglPath *path,
const GeglRectangle *roi,
gpointer userdata);
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <cairo.h>
static void path_changed (GeglPath *path,
@@ -60,7 +62,7 @@ static void path_changed (GeglPath *path,
gpointer userdata)
{
GeglRectangle rect = *roi;
- GeglChantO *o = GEGL_CHANT_PROPERTIES (userdata);
+ GeglProperties *o = GEGL_PROPERTIES (userdata);
/* invalidate the incoming rectangle */
rect.x -= o->width/2;
@@ -74,7 +76,7 @@ static void path_changed (GeglPath *path,
static void
prepare (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gegl_operation_set_format (operation, "output", babl_format ("R'aG'aB'aA float"));
if (o->transform && o->transform[0] != '\0')
@@ -88,7 +90,7 @@ prepare (GeglOperation *operation)
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle defined = { 0, 0, 512, 512 };
GeglRectangle *in_rect;
gdouble x0, x1, y0, y1;
@@ -147,7 +149,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
gboolean need_stroke = FALSE;
gdouble color[4] = {0, 0, 0, 0};
@@ -235,7 +237,7 @@ static GeglNode *detect (GeglOperation *operation,
gint x,
gint y)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
cairo_t *cr;
cairo_surface_t *surface;
gchar *data = " ";
@@ -261,7 +263,7 @@ static GeglNode *detect (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
diff --git a/operations/external/webp-load.c b/operations/external/webp-load.c
index 590e822..c65eb46 100644
--- a/operations/external/webp-load.c
+++ b/operations/external/webp-load.c
@@ -20,16 +20,16 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+property_file_path (path, _("File"), "", _("Path of file to load."))
#else
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE "webp-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE "webp-load.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <webp/decode.h>
static gboolean
@@ -94,7 +94,7 @@ read_webp (const gchar *path, GeglBuffer *buf, GeglRectangle *bounds_out, const
static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle result = {0,0,0,0};
const Babl *format = NULL;
@@ -112,7 +112,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
return read_webp (o->path, output, NULL, NULL);
}
@@ -124,7 +124,7 @@ get_cached_region (GeglOperation *operation,
}
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
diff --git a/operations/external/webp-save.c b/operations/external/webp-save.c
index 67ded6f..509e4ae 100644
--- a/operations/external/webp-save.c
+++ b/operations/external/webp-save.c
@@ -20,19 +20,19 @@
#include <glib/gi18n-lib.h>
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
-gegl_chant_file_path (path, _("File"), "", _("Target file path."))
+property_file_path (path, _("File"), "", _("Target file path."))
-gegl_chant_int (quality, _("Quality"), 1, 100, 90,
+property_int (quality, _("Quality"), 1, 100, 90,
_("WebP compression quality"))
#else
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE "webp-save.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE "webp-save.c"
-#include "gegl-chant.h"
+#include "gegl-op.h"
#include <webp/encode.h>
#include <stdio.h>
@@ -51,7 +51,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ GeglProperties *o = GEGL_PROPERTIES (operation);
const GeglRectangle *bounds = gegl_buffer_get_extent (input);
FILE* file;
@@ -97,7 +97,7 @@ process (GeglOperation *operation,
static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]