[gegl] workshop: port ops to gegl-op.h



commit c7d8cd209db75201b5a1616154fc0e4a1210816c
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed May 21 00:42:08 2014 +0200

    workshop: port ops to gegl-op.h

 operations/workshop/box-max.c               |   21 ++--
 operations/workshop/box-min.c               |   21 ++--
 operations/workshop/box-percentile.c        |   25 +++--
 operations/workshop/buffer-cache.c          |   20 ++--
 operations/workshop/color-rotate.c          |   80 ++++++++++------
 operations/workshop/convolution-matrix.c    |  131 ++++++++++---------------
 operations/workshop/demosaic-bimedian.c     |   19 ++--
 operations/workshop/demosaic-simple.c       |   19 ++--
 operations/workshop/disc-percentile.c       |   24 +++--
 operations/workshop/ditto.c                 |   17 ++--
 operations/workshop/external/ff-save.c      |   78 ++++++++-------
 operations/workshop/external/gluas.c        |   27 +++--
 operations/workshop/external/lens-correct.c |  138 ++++++++++++++------------
 operations/workshop/external/line-profile.c |   50 +++++++---
 operations/workshop/gaussian-blur-iir.c     |   60 +++++++-----
 operations/workshop/gblur-1d.c              |   70 +++++++-------
 operations/workshop/gradient-map.c          |   40 ++++----
 operations/workshop/hstack.c                |   10 +-
 operations/workshop/ink-simulator.c         |   70 +++++++-------
 operations/workshop/kuwahara.c              |   19 ++--
 operations/workshop/mandelbrot.c            |   33 ++++---
 operations/workshop/rawbayer-load.c         |   41 ++++----
 operations/workshop/snn-percentile.c        |   31 ++++---
 operations/workshop/unpremul.c              |   10 +-
 24 files changed, 558 insertions(+), 496 deletions(-)
---
diff --git a/operations/workshop/box-max.c b/operations/workshop/box-max.c
index e10be1f..dcf457e 100644
--- a/operations/workshop/box-max.c
+++ b/operations/workshop/box-max.c
@@ -20,17 +20,18 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_double (radius, _("Radius"), 0.0, 200.0, 4.0,
-  _("Radius of square pixel region (width and height will be radius*2+1)"))
+property_double (radius, _("Radius"), 4.0)
+  value_range (0.0, 200.0)
+  description (_("Radius of square pixel region (width and height will be radius*2+1)"))
 
 #else
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "box-max.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "box-max.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <stdio.h>
 #include <math.h>
 
@@ -158,7 +159,7 @@ static void prepare (GeglOperation *operation)
   area->left  =
   area->right =
   area->top   =
-  area->bottom = GEGL_CHANT_PROPERTIES (operation)->radius;
+  area->bottom = GEGL_PROPERTIES (operation)->radius;
   gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
   gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
 }
@@ -247,7 +248,7 @@ cl_process (GeglOperation       *operation,
   gint err;
 
   GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
 
   GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,
                                                          result,
@@ -300,7 +301,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
   GeglRectangle input_rect = gegl_operation_get_required_for_output (operation, "input", result);
 
   if (gegl_cl_is_accelerated ())
@@ -316,7 +317,7 @@ 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/workshop/box-min.c b/operations/workshop/box-min.c
index 93faa51..6685215 100644
--- a/operations/workshop/box-min.c
+++ b/operations/workshop/box-min.c
@@ -20,17 +20,18 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_double (radius, _("Radius"), 0.0, 200.0, 4.0,
-  _("Radius of square pixel region (width and height will be radius*2+1)"))
+property_double (radius, _("Radius"), 4.0)
+  value_range   (0.0, 200.0)
+  description   (_("Radius of square pixel region (width and height will be radius*2+1)"))
 
 #else
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "box-min.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "box-min.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <stdio.h>
 #include <math.h>
 
@@ -158,7 +159,7 @@ static void prepare (GeglOperation *operation)
   area->left  =
   area->right =
   area->top   =
-  area->bottom = GEGL_CHANT_PROPERTIES (operation)->radius;
+  area->bottom = GEGL_PROPERTIES (operation)->radius;
   gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
   gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
 }
@@ -247,7 +248,7 @@ cl_process (GeglOperation       *operation,
   gint err;
 
   GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
 
   GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,
                                                          result,
@@ -300,7 +301,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
   GeglRectangle input_rect = gegl_operation_get_required_for_output (operation, "input", result);
 
   if (gegl_cl_is_accelerated ())
@@ -315,7 +316,7 @@ 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/workshop/box-percentile.c b/operations/workshop/box-percentile.c
index bbe8af6..994e0d7 100644
--- a/operations/workshop/box-percentile.c
+++ b/operations/workshop/box-percentile.c
@@ -22,21 +22,24 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_double (radius, _("Radius"), 0.0, 70.0, 4.0,
-  _("Radius of square pixel region (width and height will be radius*2+1)"))
-gegl_chant_double (percentile, _("Percentile"), 0.0, 100.0, 50,
-  _("The percentile to compute, defaults to 50, which is a median filter"))
+property_double (radius, _("Radius"), 4.0)
+    description (_("Radius of square pixel region (width and height will be radius*2+1)"))
+    value_range (0.0, 70.0)
+
+property_double (percentile, _("Percentile"), 50.0)
+    description (_("The percentile to compute, defaults to 50, which is a median filter"))
+    value_range (0.0, 100.0)
 
 #else
 
 #define MAX_SAMPLES 20000 /* adapted to max level of radius */
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "box-percentile.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "box-percentile.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <stdio.h>
 #include <math.h>
 
@@ -49,7 +52,7 @@ static void median (GeglBuffer *src,
 static void prepare (GeglOperation *operation)
 {
   GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
-  GeglChantO              *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties              *o = GEGL_PROPERTIES (operation);
   area->left = area->right = area->top = area->bottom = ceil (o->radius);
 
   gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
@@ -62,7 +65,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
   GeglBuffer   *temp_in;
   GeglRectangle compute = gegl_operation_get_required_for_output (operation, "input", result);
 
@@ -212,7 +215,7 @@ median (GeglBuffer *src,
 
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass       *operation_class;
   GeglOperationFilterClass *filter_class;
diff --git a/operations/workshop/buffer-cache.c b/operations/workshop/buffer-cache.c
index d6ff855..b97b750 100644
--- a/operations/workshop/buffer-cache.c
+++ b/operations/workshop/buffer-cache.c
@@ -20,22 +20,22 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_pointer (buffer, _("Cache buffer"),
+property_pointer (buffer, _("Cache buffer"),
                   _("The GeglBuffer where the caching is done"))
 
 #else
 
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE       "buffer-cache.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE       "buffer-cache.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 static GeglRectangle
 get_bounding_box (GeglOperation *operation)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
 
   if (o->buffer)
     return *gegl_buffer_get_extent (GEGL_BUFFER (o->buffer));
@@ -50,7 +50,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO           *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties           *o = GEGL_PROPERTIES (operation);
 
   if (!o->buffer)
     {
@@ -65,7 +65,7 @@ process (GeglOperation       *operation,
 static void
 dispose (GObject *object)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (object);
+  GeglProperties *o = GEGL_PROPERTIES (object);
 
   if (o->buffer)
     {
@@ -73,11 +73,11 @@ dispose (GObject *object)
       o->buffer = NULL;
     }
 
-  G_OBJECT_CLASS (gegl_chant_parent_class)->dispose (object);
+  G_OBJECT_CLASS (gegl_op_parent_class)->dispose (object);
 }
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass         *operation_class;
   GeglOperationFilterClass   *filter_class;
diff --git a/operations/workshop/color-rotate.c b/operations/workshop/color-rotate.c
index 8084e3d..5f6fc63 100644
--- a/operations/workshop/color-rotate.c
+++ b/operations/workshop/color-rotate.c
@@ -28,38 +28,56 @@
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_boolean (s_cl, _("Clockwise"), FALSE,
-                    _("Switch to clockwise"))
-gegl_chant_int (s_fr, _("From:"), 0, 360, 0,
-                _("Starting angle for the color rotation"))
-gegl_chant_int (s_to, _("To:"), 0, 360, 0,
-                _("End angle for the color rotation"))
-gegl_chant_boolean (d_cl, _("Clockwise"), FALSE,
-                    _("Switch to clockwise"))
-gegl_chant_int (d_fr, _("From:"), 0, 360, 0,
-                _("Starting angle for the color rotation"))
-gegl_chant_int (d_to, _("To:"), 0, 360, 0,
-                _("End angle for the color rotation"))
-
-gegl_chant_boolean (gray, _("Grayscale"), FALSE,
-                    _("Choose in case of grayscale images"))
-gegl_chant_double (hue, _("Hue"), 0.0, 2.0, 0.0,
-                   _("The value of hue"))
-gegl_chant_double (saturation, _("Saturation"), 0.0, 1.0, 0.0,
-                   _("The value of saturation"))
-gegl_chant_boolean (change, _("Change/Treat to this"), FALSE,
-                    _("Change/Treat to this"))
-gegl_chant_double (threshold, _("Threshold"), 0.0, 1.0, 0.0,
-                   _("The value of gray threshold"))
+#ifdef GEGL_PROPERTIES
+
+property_boolean (s_cl, _("Clockwise"), FALSE)
+    description (_("Switch to clockwise"))
+
+property_int (s_fr, _("From:"), 0)
+    description (_("Starting angle for the color rotation"))
+    value_range (0, 360)
+    ui_meta     ("unit", "degree")
+
+property_int (s_to, _("To:"), 0)
+    description (_("End angle for the color rotation"))
+    value_range (0, 360)
+    ui_meta     ("unit", "degree")
+
+property_boolean (d_cl, _("Clockwise"), FALSE)
+    description (_("Switch to clockwise"))
+
+property_int (d_fr, _("From:"), 0)
+    value_range (0, 360)
+    description (_("Starting angle for the color rotation"))
+
+property_int (d_to, _("To:"), 0)
+    value_range (0, 360)
+    description (_("End angle for the color rotation"))
+
+property_boolean (gray, _("Grayscale"), FALSE)
+    description (_("Choose in case of grayscale images"))
+
+property_double (hue, _("Hue"), 0.0)
+    value_range (0.0, 2.0)
+    description (_("The value of hue"))
+
+property_double (saturation, _("Saturation"), 0.0)
+    description (_("The value of saturation"))
+    value_range (0.0, 1.0)
+
+property_boolean (change, _("Change/Treat to this"), FALSE)
+    description (_("Change/Treat to this"))
+
+property_double (threshold, _("Threshold"), 0.0)
+    description (_("The value of gray threshold"))
+    value_range (0.0, 1.0)
 
 #else
 
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE       "color-rotate.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE       "color-rotate.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <stdio.h>
 #include <math.h>
 
@@ -284,7 +302,7 @@ right_end (gint     from,
 static void
 color_rotate (gfloat     *src,
               gint        offset,
-              GeglChantO *o)
+              GeglProperties *o)
 {
   gfloat   h, s, v;
   gboolean skip = FALSE;
@@ -344,7 +362,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o      = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o      = GEGL_PROPERTIES (operation);
   const Babl *format = babl_format ("RGBA float");
   gfloat     *src_buf;
   gint        x;
@@ -366,7 +384,7 @@ 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/workshop/convolution-matrix.c b/operations/workshop/convolution-matrix.c
index a542d1b..bdf5511 100644
--- a/operations/workshop/convolution-matrix.c
+++ b/operations/workshop/convolution-matrix.c
@@ -20,84 +20,57 @@
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_double (a1, _("(1,1) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (1,1)"))
-gegl_chant_double (a2, _("(1,2) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (1,2)"))
-gegl_chant_double (a3, _("(1,3) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (1,3)"))
-gegl_chant_double (a4, _("(1,4) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (1,4)"))
-gegl_chant_double (a5, _("(1,5) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (1,5)"))
-gegl_chant_double (b1, _("(2,1) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (2,1)"))
-gegl_chant_double (b2, _("(2,2) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (2,2)"))
-gegl_chant_double (b3, _("(2,3) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (2,3)"))
-gegl_chant_double (b4, _("(2,4) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (2,4)"))
-gegl_chant_double (b5, _("(2,5) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (2,5)"))
-gegl_chant_double (c1, _("(3,1) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (3,1)"))
-gegl_chant_double (c2, _("(3,2) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (3,2)"))
-gegl_chant_double (c3, _("(3,3) "), -G_MAXINT, G_MAXINT, 1.0,
-                   _("Value of the element in position (3,3)"))
-gegl_chant_double (c4, _("(3,4) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (3,4)"))
-gegl_chant_double (c5, _("(3,5) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (3,5)"))
-gegl_chant_double (d1, _("(4,1) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (4,1)"))
-gegl_chant_double (d2, _("(4,2) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (4,2)"))
-gegl_chant_double (d3, _("(4,3) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (4,3)"))
-gegl_chant_double (d4, _("(4,4) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (4,4)"))
-gegl_chant_double (d5, _("(4,5) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (4,5)"))
-gegl_chant_double (e1, _("(5,1) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (5,1)"))
-gegl_chant_double (e2, _("(5,2) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (5,2)"))
-gegl_chant_double (e3, _("(5,3) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (5,3)"))
-gegl_chant_double (e4, _("(5,4) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (5,4)"))
-gegl_chant_double (e5, _("(5,5) "), -G_MAXINT, G_MAXINT, 0.0,
-                   _("Value of the element in position (5,5)"))
-
-gegl_chant_double (div, _("Divisor: "), -G_MAXINT, G_MAXINT, 1.0,
-                   _("The value of the divisor"))
-gegl_chant_double (off, _("Offset: "), -1.0, 1.0, 0.0,
-                   _("The value of the offset"))
-
-gegl_chant_boolean (norm, _("Normalize"), TRUE, _("Normalize or not"))
-
-gegl_chant_boolean (red, _("Red"), TRUE, _("Red channel"))
-gegl_chant_boolean (green, _("Green"), TRUE, _("Green channel"))
-gegl_chant_boolean (blue, _("Blue"), TRUE, _("Blue channel"))
-gegl_chant_boolean (alpha, _("Alpha"), TRUE, _("Alpha channel"))
-
-gegl_chant_boolean (weight, _("Alpha-weighting"), TRUE, _("Alpha weighting"))
-
-gegl_chant_string (border, _("Border"), "extend",
-                   _("Type of border to choose. "
-                     "Choices are extend, wrap, crop. "
-                     "Default is extend"))
+#ifdef GEGL_PROPERTIES
+
+property_double (a1, _("(1,1) "), 0.0)
+property_double (a2, _("(1,2) "), 0.0)
+property_double (a3, _("(1,3) "), 0.0)
+property_double (a4, _("(1,4) "), 0.0)
+property_double (a5, _("(1,5) "), 0.0)
+property_double (b1, _("(2,1) "), 0.0)
+property_double (b2, _("(2,2) "), 0.0)
+property_double (b3, _("(2,3) "), 0.0)
+property_double (b4, _("(2,4) "), 0.0)
+property_double (b5, _("(2,5) "), 0.0)
+property_double (c1, _("(3,1) "), 0.0)
+property_double (c2, _("(3,2) "), 0.0)
+property_double (c3, _("(3,3) "), 1.0)
+property_double (c4, _("(3,4) "), 0.0)
+property_double (c5, _("(3,5) "), 0.0)
+property_double (d1, _("(4,1) "), 0.0)
+property_double (d2, _("(4,2) "), 0.0)
+property_double (d3, _("(4,3) "), 0.0)
+property_double (d4, _("(4,4) "), 0.0)
+property_double (d5, _("(4,5) "), 0.0)
+property_double (e1, _("(5,1) "), 0.0)
+property_double (e2, _("(5,2) "), 0.0)
+property_double (e3, _("(5,3) "), 0.0)
+property_double (e4, _("(5,4) "), 0.0)
+property_double (e5, _("(5,5) "), 0.0)
+
+property_double (div, _("Divisor: "), 1.0)
+property_double (off, _("Offset: "), 0.0)
+   value_range (-1.0, 1.0)
+
+property_boolean (norm, _("Normalize"), TRUE)
+
+property_boolean (red, _("Red channel"), TRUE )
+property_boolean (green, _("Green channel"), TRUE)
+property_boolean (blue, _("Blue channel"), TRUE)
+property_boolean (alpha, _("Alpha channel"), TRUE)
+property_boolean (weight, _("Alpha-weighting"), TRUE)
+
+/* XXX: use enum */
+property_string (border, _("Border"), "extend")
+    description (_("Type of border to choose. Choices are extend, wrap, crop. "
+                   "Default is extend"))
 
 #else
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE        "convolution-matrix.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE        "convolution-matrix.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 #include <stdio.h>
 
@@ -132,7 +105,7 @@ prepare (GeglOperation *operation)
 }
 
 static void
-make_matrix (GeglChantO  *o,
+make_matrix (GeglProperties  *o,
              gdouble    **matrix)
 {
   matrix[0][0] = o->a1;
@@ -167,7 +140,7 @@ make_matrix (GeglChantO  *o,
 }
 
 static void
-normalize_o (GeglChantO  *o,
+normalize_o (GeglProperties  *o,
              gdouble    **matrix)
 {
   gint      x, y;
@@ -207,7 +180,7 @@ convolve_pixel(gfloat               *src_buf,
                const GeglRectangle  *extended,
                const GeglRectangle  *boundary,
                gdouble             **matrix,
-               GeglChantO           *o,
+               GeglProperties           *o,
                GeglBuffer           *input,
                gint                  xx,
                gint                  yy,
@@ -326,7 +299,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO              *o       = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties              *o       = GEGL_PROPERTIES (operation);
   GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
 
   GeglRectangle   rect;
@@ -413,7 +386,7 @@ get_required_for_output (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/workshop/demosaic-bimedian.c b/operations/workshop/demosaic-bimedian.c
index 4e91295..b2cac68 100644
--- a/operations/workshop/demosaic-bimedian.c
+++ b/operations/workshop/demosaic-bimedian.c
@@ -21,17 +21,18 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_int (pattern, _("Bayer pattern"), 0, 3, 0,
-                _("Bayer pattern used, 0 seems to work for some nikon files, 2 for some Fuji files."))
+property_int (pattern, _("Bayer pattern"), 0)
+   description (_("Bayer pattern used, 0 seems to work for some nikon files, 2 for some Fuji files."))
+   value_range (0, 3)
 
 #else
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "demosaic-bimedian.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "demosaic-bimedian.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 
 /* Returns the median of four floats. We define the median as the average of
@@ -79,7 +80,7 @@ m4 (gfloat a, gfloat b, gfloat c, gfloat d)
  * of dst_extent.
  */
 static void
-demosaic (GeglChantO          *op,
+demosaic (GeglProperties          *op,
           GeglBuffer          *src,
           const GeglRectangle *src_rect,
           GeglBuffer          *dst,
@@ -192,7 +193,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
   GeglRectangle src_rect = gegl_operation_get_required_for_output (operation, "input", result);
 
   demosaic (o, input, &src_rect, output, result);
@@ -202,7 +203,7 @@ 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/workshop/demosaic-simple.c b/operations/workshop/demosaic-simple.c
index e3a2a00..b298b4a 100644
--- a/operations/workshop/demosaic-simple.c
+++ b/operations/workshop/demosaic-simple.c
@@ -20,20 +20,21 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_int (pattern, _("Bayer pattern"), 0, 3, 0,
-                _("Bayer pattern used, 0 seems to work for some nikon files, 2 for some Fuji files."))
+property_int (pattern, _("Bayer pattern"), 0)
+   description (_("Bayer pattern used, 0 seems to work for some nikon files, 2 for some Fuji files."))
+   value_range (0, 3)
 
 #else
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "demosaic-simple.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "demosaic-simple.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 static void
-demosaic (GeglChantO          *op,
+demosaic (GeglProperties          *op,
           GeglBuffer          *src,
           const GeglRectangle *src_rect,
           GeglBuffer          *dst,
@@ -124,7 +125,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
   GeglRectangle compute = gegl_operation_get_required_for_output (operation, "input", result);
 
   demosaic (o, input, &compute, output, result);
@@ -134,7 +135,7 @@ 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/workshop/disc-percentile.c b/operations/workshop/disc-percentile.c
index d9b566d..f6f2f83 100644
--- a/operations/workshop/disc-percentile.c
+++ b/operations/workshop/disc-percentile.c
@@ -21,21 +21,23 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_double (radius, _("Radius"), 0.0, 70.0, 4.0,
-  _("Radius of square pixel region (width and height will be radius*2+1)"))
-gegl_chant_double (percentile, _("Percentile"), 0.0, 100.0, 50,
-                   _("The percentile to compute, defaults to 50, which is a median filter."))
+property_double (radius, _("Radius"), 4.0)
+    value_range (0.0, 70.0)
+    description (_("Radius of square pixel region (width and height will be radius*2+1)"))
+property_double (percentile, _("Percentile"), 50.0)
+    description (_("The percentile to compute, defaults to 50, which is a median filter."))
+    value_range (0.0, 100.0)
 
 #else
 
 #define MAX_SAMPLES 20000 /* adapted to max level of radius */
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "disc-percentile.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "disc-percentile.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 
 static void median (GeglBuffer *src,
@@ -182,7 +184,7 @@ median (GeglBuffer *src,
 static void prepare (GeglOperation *operation)
 {
   GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
-  GeglChantO              *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties              *o = GEGL_PROPERTIES (operation);
   area->left = area->right = area->top = area->bottom = ceil (o->radius);
   gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
 }
@@ -194,7 +196,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
   GeglBuffer   *temp_in;
   GeglRectangle compute =
         gegl_operation_get_required_for_output (operation, "input", result);
@@ -216,7 +218,7 @@ 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/workshop/ditto.c b/operations/workshop/ditto.c
index a6a294d..3330153 100644
--- a/operations/workshop/ditto.c
+++ b/operations/workshop/ditto.c
@@ -22,17 +22,18 @@
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_enum (sampler_type, _("Sampler"), GeglSamplerType, gegl_sampler_type,
-                 GEGL_SAMPLER_CUBIC, _("Sampler used internally"))
+property_enum (sampler_type, _("Sampler"), GeglSamplerType, gegl_sampler_type,
+                 GEGL_SAMPLER_CUBIC)
+   description (_("Sampler used internally"))
 
 #else
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "ditto.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "ditto.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -51,7 +52,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
 
   gint x = result->x; /* initial x                   */
   gint y = result->y; /*           and y coordinates */
@@ -95,7 +96,7 @@ 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/workshop/external/ff-save.c b/operations/workshop/external/ff-save.c
index 0f3105d..eb44b6e 100644
--- a/operations/workshop/external/ff-save.c
+++ b/operations/workshop/external/ff-save.c
@@ -25,18 +25,24 @@
 #include <libswscale/swscale.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_string (path, _("File"), "/tmp/fnord.mp4", _("Target path and filename, use '-' for stdout."))
-gegl_chant_double (bitrate, _("Bitrate"), 0.0, 100000000.0, 800000.0, _("target bitrate"))
-gegl_chant_double (fps, _("FPS"), 0.0, 100.0, 25, _("frames per second"))
+property_string (path, _("File"), "/tmp/fnord.mp4")
+    description (_("Target path and filename, use '-' for stdout."))
+
+property_double (bitrate, _("Target itrate"), 800000.0)
+     value_range (0.0, 100000000.0)
+
+property_double (fps, _("FPS"), 25)
+     value_range (0.0, 100.0)
+     description (_("frames per second"))
 
 #else
 
-#define GEGL_CHANT_TYPE_SINK
-#define GEGL_CHANT_C_FILE       "ff-save.c"
+#define GEGL_OP_SINK
+#define GEGL_OP_C_FILE       "ff-save.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
 #include <libavformat/avformat.h>
@@ -110,15 +116,15 @@ typedef struct
 #define DISABLE_AUDIO
 
 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;
     }
 
   if (!inited)
@@ -166,11 +172,11 @@ static void close_video       (Priv            *p,
 void        close_audio       (Priv            *p,
                                AVFormatContext *oc,
                                AVStream        *st);
-static int  tfile             (GeglChantO      *self);
-static void write_video_frame (GeglChantO      *self,
+static int  tfile             (GeglProperties      *self);
+static void write_video_frame (GeglProperties      *self,
                                AVFormatContext *oc,
                                AVStream        *st);
-static void write_audio_frame (GeglChantO      *self,
+static void write_audio_frame (GeglProperties      *self,
                                AVFormatContext *oc,
                                AVStream        *st);
 
@@ -218,7 +224,7 @@ buffer_flush (Priv * p)
 }
 
 static void
-buffer_open (GeglChantOperation *op, int size)
+buffer_open (GeglOpOperation *op, int size)
 {
   Priv     *p = (Priv*)op->priv;
 
@@ -233,7 +239,7 @@ buffer_open (GeglChantOperation *op, int size)
 }
 
 static void
-buffer_close (GeglChantOperation *op)
+buffer_close (GeglOpOperation *op)
 {
   Priv     *p = (Priv*)op->priv;
 
@@ -351,7 +357,7 @@ buffer_write (Priv * p, uint8_t * source, int count)
 #ifndef DISABLE_AUDIO
 /* add an audio output stream */
 static AVStream *
-add_audio_stream (GeglChantOperation *op, AVFormatContext * oc, int codec_id)
+add_audio_stream (GeglOpOperation *op, AVFormatContext * oc, int codec_id)
 {
   Priv     *p = (Priv*)op->priv;
   AVCodecContext *c;
@@ -429,9 +435,9 @@ open_audio (Priv * p, AVFormatContext * oc, AVStream * st)
 }
 
 void
-write_audio_frame (GeglChantO *op, AVFormatContext * oc, AVStream * st)
+write_audio_frame (GeglProperties *op, AVFormatContext * oc, AVStream * st)
 {
-  Priv *p = (Priv*)op->chant_data;
+  Priv *p = (Priv*)op->user_data;
 
   AVCodecContext *c;
   AVPacket  pkt;
@@ -480,9 +486,9 @@ close_audio (Priv * p, AVFormatContext * oc, AVStream * st)
 
 /* add a video output stream */
 static AVStream *
-add_video_stream (GeglChantO *op, AVFormatContext * oc, int codec_id)
+add_video_stream (GeglProperties *op, AVFormatContext * oc, int codec_id)
 {
-  Priv *p = (Priv*)op->chant_data;
+  Priv *p = (Priv*)op->user_data;
 
   AVCodecContext *c;
   AVStream *st;
@@ -624,10 +630,10 @@ close_video (Priv * p, AVFormatContext * oc, AVStream * st)
 
 /* prepare a dummy image */
 static void
-fill_yuv_image (GeglChantO *op,
+fill_yuv_image (GeglProperties *op,
                 AVFrame *pict, int frame_index, int width, int height)
 {
-  Priv     *p = (Priv*)op->chant_data;
+  Priv     *p = (Priv*)op->user_data;
   /*memcpy (pict->data[0],
 
    op->input_pad[0]->data,
@@ -638,10 +644,10 @@ fill_yuv_image (GeglChantO *op,
 }
 
 static void
-write_video_frame (GeglChantO *op,
+write_video_frame (GeglProperties *op,
                    AVFormatContext *oc, AVStream *st)
 {
-  Priv     *p = (Priv*)op->chant_data;
+  Priv     *p = (Priv*)op->user_data;
   int       out_size, ret;
   AVCodecContext *c;
   AVFrame  *picture_ptr;
@@ -734,9 +740,9 @@ write_video_frame (GeglChantO *op,
 }
 
 static int
-tfile (GeglChantO *self)
+tfile (GeglProperties *self)
 {
-  Priv *p = (Priv*)self->chant_data;
+  Priv *p = (Priv*)self->user_data;
 
   p->fmt = av_guess_format (NULL, self->path, NULL);
   if (!p->fmt)
@@ -795,7 +801,7 @@ tfile (GeglChantO *self)
 
 #if 0
 static int
-filechanged (GeglChantOperation *op, const char *att)
+filechanged (GeglOpOperation *op, const char *att)
 {
   init (op);
   return 0;
@@ -809,14 +815,14 @@ process (GeglOperation       *operation,
          gint                 level)
 {
   static gint inited = 0;
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
-  Priv       *p = (Priv*)o->chant_data;
+  GeglProperties *o = GEGL_PROPERTIES (operation);
+  Priv       *p = (Priv*)o->user_data;
 
   g_assert (input);
 
   if (p == NULL)
     init (o);
-  p = (Priv*)o->chant_data;
+  p = (Priv*)o->user_data;
 
   p->width = result->width;
   p->height = result->height;
@@ -838,10 +844,10 @@ process (GeglOperation       *operation,
 static void
 finalize (GObject *object)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (object);
-  if (o->chant_data)
+  GeglProperties *o = GEGL_PROPERTIES (object);
+  if (o->user_data)
     {
-      Priv *p = (Priv*)o->chant_data;
+      Priv *p = (Priv*)o->user_data;
 
     if (p->oc)
       {
@@ -861,8 +867,8 @@ finalize (GObject *object)
         url_fclose (&p->oc->pb);
         free (p->oc);
       }
-      g_free (o->chant_data);
-      o->chant_data = NULL;
+      g_free (o->user_data);
+      o->user_data = NULL;
     }
 
   G_OBJECT_CLASS (g_type_class_peek_parent (G_OBJECT_GET_CLASS (object)))->finalize (object);
@@ -870,7 +876,7 @@ finalize (GObject *object)
 
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass     *operation_class;
   GeglOperationSinkClass *sink_class;
diff --git a/operations/workshop/external/gluas.c b/operations/workshop/external/gluas.c
index 63e82a2..46e1aa3 100644
--- a/operations/workshop/external/gluas.c
+++ b/operations/workshop/external/gluas.c
@@ -20,7 +20,7 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
 #define THRESHOLD_SCRIPT \
 "level = user_value/2\n"\
@@ -38,18 +38,23 @@
 "  progress (y/height)\n"\
 "end"
 
-gegl_chant_multiline (script, _("Script"), THRESHOLD_SCRIPT,
-         _("The lua script containing the implementation of this operation."))
-gegl_chant_file_path (file, _("File"), "", _("a stored lua script on disk implementing an operation."))
-gegl_chant_double (user_value, _("User value"), -1000.0, 1000.0, 1.0,
-         _("(appears in the global variable 'user_value' in lua."))
+property_string (script, _("Script"), THRESHOLD_SCRIPT)
+    description(_("The lua script containing the implementation of this operation."))
+    ui_meta    ("multiline", "true")
+
+property_file_path (file, _("File"), "")
+    description(_("a stored lua script on disk implementing an operation."))
+
+property_double (user_value, _("User value"), 1.0)
+    description(_("(appears in the global variable 'user_value' in lua."))
+    value_range (-1000.0, 1000.0)
 
 #else
 
-#define GEGL_CHANT_TYPE_COMPOSER
-#define GEGL_CHANT_C_FILE       "gluas.c"
+#define GEGL_OP_COMPOSER
+#define GEGL_OP_C_FILE       "gluas.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -940,7 +945,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
 
   if (o->file && g_file_test (o->file, G_FILE_TEST_IS_REGULAR))
     {
@@ -964,7 +969,7 @@ get_required_for_output (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/workshop/external/lens-correct.c b/operations/workshop/external/lens-correct.c
index cd79e48..2205e33 100644
--- a/operations/workshop/external/lens-correct.c
+++ b/operations/workshop/external/lens-correct.c
@@ -23,70 +23,80 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_string (maker, _("Maker:"),"none",
-                   _("Write lens maker correctly"))
-gegl_chant_string (Camera, _("Camera:"),"none",
-                   _("Write camera name correctly"))
-gegl_chant_string (Lens, _("Lens:"),"none",
-                   _("Write your lens model with uppercase letters"))
-gegl_chant_double (focal, _("Focal of the camera"), 0.0, 300.0, 20.0,
-                   _("Calculate b value from focal"))
-
-gegl_chant_boolean (center, _("Center"), TRUE,
-                    _("If you want center"))
-gegl_chant_int (cx, _("Lens center x"), -G_MAXINT, G_MAXINT, 0,
-                _("Coordinates of lens center"))
-gegl_chant_int (cy, _("Lens center y"), -G_MAXINT, G_MAXINT, 0,
-                _("Coordinates of lens center"))
-gegl_chant_double (rscale, _("Scale"), 0.001, 10.0, 0.5,
-                   _("Scale of the image"))
-gegl_chant_boolean (correct, _("Autocorrect d values"), TRUE,
-                    _("Autocorrect D values for lens correction models."))
-
-gegl_chant_double (red_a, _("Model red a:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (red_b, _("Model red b:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (red_c, _("Model red c:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (red_d, _("Model red d:"), 0.0, 2.0, 1.0,
-                   _("Correction parameters for each color channel"))
-
-gegl_chant_double (green_a, _("Model green a:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (green_b, _("Model green b:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (green_c, _("Model green c:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (green_d, _("Model green d:"), 0.0, 2.0, 1.00,
-                   _("Correction parameters for each color channel"))
-
-gegl_chant_double (blue_a, _("Model blue a:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (blue_b, _("Model blue b:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (blue_c, _("Model blue c:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for each color channel"))
-gegl_chant_double (blue_d, _("Model blue d:"), 0.0, 2.0, 1.0,
-                   _("Correction parameters for each color channel"))
-
-gegl_chant_double (alpha_a, _("Model alpha a:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for alpha channel"))
-gegl_chant_double (alpha_b, _("Model alpha b:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for alpha channel"))
-gegl_chant_double (alpha_c, _("Model alpha c:"), -1.0, 1.0, 0.0,
-                   _("Correction parameters for alpha channel"))
-gegl_chant_double (alpha_d, _("Model alpha d:"), 0.0, 2.0, 1.0,
-                   _("Correction parameters for alpha channel"))
+#ifdef GEGL_PROPERTIES
+
+property_string (maker, _("Maker:"),"none")
+    description (_("Write lens maker correctly"))
+
+property_string (Camera, _("Camera:"),"none")
+    description (_("Write camera name correctly"))
+
+property_string (Lens, _("Lens:"),"none")
+    description(_("Write your lens model with uppercase letters"))
+
+property_double (focal, _("Focal of the camera"), 20.0)
+    description (_("Calculate b value from focal"))
+    value_range (0.0, 300.0)
+
+property_boolean (center, _("Center"), TRUE)
+    description (_("If you want center"))
+
+property_int (cx, _("Lens center x"), 0)
+    description (_("Coordinates of lens center"))
+
+property_int (cy, _("Lens center y"), 0)
+    description (_("Coordinates of lens center"))
+
+property_double (rscale, _("Scale"), 0.5)
+    description (_("Scale of the image"))
+    value_range (0.001, 10.0)
+
+property_boolean (correct, _("Autocorrect d values"), TRUE)
+    description (_("Autocorrect D values for lens correction models."))
+
+property_double (red_a, _("Model red a:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (red_b, _("Model red b:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (red_c, _("Model red c:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (red_d, _("Model red d:"), 1.0)
+   value_range (0.0, 2.0)
+
+property_double (green_a, _("Model green a:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (green_b, _("Model green b:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (green_c, _("Model green c:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (green_d, _("Model green d:"), 1.0)
+   value_range (0.0, 2.0)
+
+property_double (blue_a, _("Model blue a:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (blue_b, _("Model blue b:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (blue_c, _("Model blue c:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (blue_d, _("Model blue d:"), 1.0)
+   value_range (0.0, 2.0)
+
+
+property_double (alpha_a, _("Model alpha a:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (alpha_b, _("Model alpha b:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (alpha_c, _("Model alpha c:"), 0.0)
+   value_range (-1.0, 1.0)
+property_double (alpha_d, _("Model alpha d:"), 1.0)
+   value_range (0.0, 2.0)
 
 #else
 
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE       "lens-correct.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE       "lens-correct.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 #include <stdio.h>
 
@@ -116,7 +126,7 @@ typedef struct {
 
 static void
 make_lens (LensCorrectionModel *lens,
-           GeglChantO          *o,
+           GeglProperties          *o,
            GeglRectangle        boundary)
 {
   lens->BB.x = boundary.x;
@@ -181,7 +191,7 @@ make_lens (LensCorrectionModel *lens,
 
 static gboolean
 find_make_lens(LensCorrectionModel *lens,
-               GeglChantO          *o,
+               GeglProperties          *o,
                GeglRectangle        boundary)
 {
   struct lfDatabase *ldb;
@@ -422,7 +432,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO          *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties          *o = GEGL_PROPERTIES (operation);
   LensCorrectionModel  lens = { { 0, }, };
   GeglRectangle        boundary = *gegl_operation_source_get_bounding_box
     (operation, "input");
@@ -456,7 +466,7 @@ 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/workshop/external/line-profile.c b/operations/workshop/external/line-profile.c
index 59d83e6..d039eeb 100644
--- a/operations/workshop/external/line-profile.c
+++ b/operations/workshop/external/line-profile.c
@@ -20,23 +20,41 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_int (x0, _("X0"), 0, 1000, 0, _("Start x coordinate"))
-gegl_chant_int (x1, _("X1"), 0, 1000, 200, _("End x coordinate"))
-gegl_chant_int (y0, _("Y0"), 0, 1000, 0, _("Start y coordinate"))
-gegl_chant_int (y1, _("Y1"), 0, 1000, 200, _("End y coordinate"))
-gegl_chant_int (width,  _("Width"),  10, 10000, 1024, _("Width of plot"))
-gegl_chant_int (height, _("Height"), 10, 10000, 256,  _("Height of plot"))
-gegl_chant_double (min, _("Min"), -500.0, 500,  0.0, _("Value at bottom"))
-gegl_chant_double (max, _("Max"), -500.0, 500,  8.0, _("Value at top"))
+#ifdef GEGL_PROPERTIES
+
+property_int (x0, _("X0"), 0)
+  description (_("Start x coordinate"))
+  value_range (0, 1000)
+property_int (x1, _("X1"), 0)
+  description (_("End x coordinate"))
+  value_range (0, 1000)
+
+property_int (y0, _("Y0"), 0)
+  description (_("Start y coordinate"))
+  value_range (0, 1000)
+property_int (y1, _("Y1"), 0)
+  description (_("End y coordinate"))
+  value_range (0, 1000)
+
+property_int (width,  _("Width"),  1024)
+  value_range (10, 10000)
+property_int (height,  _("Height"),  256)
+  value_range (10, 10000)
+
+property_double (min, _("Min"), 500)
+  value_range (-500.0, 500)
+  description (_("Value at bottom"))
+
+property_double (max, _("Max"), 8.0)
+  value_range (-500.0, 500)
+  description (_("Value at top"))
 
 #else
 
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE       "line-profile.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE       "line-profile.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <cairo.h>
 
 static gfloat
@@ -59,7 +77,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
   gint        width = MAX(MAX (o->width, o->x0), o->x1);
   gint        height = MAX(MAX (o->height, o->y0), o->y1);
 
@@ -149,7 +167,7 @@ get_required_for_output (GeglOperation        *self,
 static GeglRectangle
 get_bounding_box (GeglOperation *operation)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
   GeglRectangle defined = {0,0,o->width,o->height};
 
   defined.width  = MAX (MAX (o->width,  o->x0), o->x1);
@@ -159,7 +177,7 @@ get_bounding_box (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/workshop/gaussian-blur-iir.c b/operations/workshop/gaussian-blur-iir.c
index d7200cc..4ef191f 100644
--- a/operations/workshop/gaussian-blur-iir.c
+++ b/operations/workshop/gaussian-blur-iir.c
@@ -19,44 +19,52 @@
 #include <glib/gi18n-lib.h>
 #include <math.h>
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_register_enum (gegl_gaussian_blur_filter2)
-  enum_value (GEGL_GAUSSIAN_BLUR_FILTER2_AUTO, "Auto")
-  enum_value (GEGL_GAUSSIAN_BLUR_FILTER2_FIR,  "FIR")
-  enum_value (GEGL_GAUSSIAN_BLUR_FILTER2_IIR,  "IIR")
-gegl_chant_register_enum_end (GeglGaussianBlurFilter2)
+enum_start (gegl_gaussian_blur_filter2)
+   enum_value (GEGL_GAUSSIAN_BLUR_FILTER2_AUTO, "Auto")
+   enum_value (GEGL_GAUSSIAN_BLUR_FILTER2_FIR,  "FIR")
+   enum_value (GEGL_GAUSSIAN_BLUR_FILTER2_IIR,  "IIR")
+enum_end (GeglGaussianBlurFilter2)
 
-gegl_chant_register_enum (gegl_gaussian_blur_policy)
+enum_start (gegl_gaussian_blur_policy)
    enum_value (GEGL_GAUSSIAN_BLUR_ABYSS_NONE,  "None")
    enum_value (GEGL_GAUSSIAN_BLUR_ABYSS_CLAMP, "Clamp")
    enum_value (GEGL_GAUSSIAN_BLUR_ABYSS_BLACK, "Black")
    enum_value (GEGL_GAUSSIAN_BLUR_ABYSS_WHITE, "White")
-gegl_chant_register_enum_end (GeglGaussianBlurPolicy)
+enum_end (GeglGaussianBlurPolicy)
 
 
-gegl_chant_double_ui (std_dev_x, _("Horizontal Std. Dev."),
-                      0.0, 1500.0, 1.5, 0.24, 100.0, 3.0,
-                      _("Standard deviation (spatial scale factor)"))
-gegl_chant_double_ui (std_dev_y, _("Vertical Std. Dev."),
-                      0.0, 1500.0, 1.5, 0.24, 100.0, 3.0,
-                      _("Standard deviation (spatial scale factor)"))
-gegl_chant_enum      (filter, _("Filter"),
+property_double (std_dev_x, _("Horizontal Std. Dev."), 1.5)
+   description (_("Standard deviation (spatial scale factor)"))
+   value_range (0.0, 1500.0)
+   ui_range (0.24, 100.0)
+   ui_gamma (3.0)
+
+property_double (std_dev_y, _("Vertical Std. Dev."), 1.5)
+   description (_("Standard deviation (spatial scale factor)"))
+   value_range (0.0, 1500.0)
+   ui_range (0.24, 100.0)
+   ui_gamma (3.0)
+
+property_enum      (filter, _("Filter"),
                       GeglGaussianBlurFilter2, gegl_gaussian_blur_filter2,
-                      GEGL_GAUSSIAN_BLUR_FILTER2_AUTO,
-                      _("How the gaussian kernel is discretized"))
-gegl_chant_enum      (abyss_policy, _("Abyss policy"), GeglGaussianBlurPolicy,
-                      gegl_gaussian_blur_policy, GEGL_GAUSSIAN_BLUR_ABYSS_NONE,
-                      _("How image edges are handled"))
-gegl_chant_boolean   (clip_extent, _("Clip to the input extent"), TRUE,
-                      _("Should the output extent be clipped to the input extent"))
+                      GEGL_GAUSSIAN_BLUR_FILTER2_AUTO)
+   description (_("How the gaussian kernel is discretized"))
+
+property_enum      (abyss_policy, _("Abyss policy"), GeglGaussianBlurPolicy,
+                      gegl_gaussian_blur_policy, GEGL_GAUSSIAN_BLUR_ABYSS_NONE)
+   description (_("How image edges are handled"))
+
+property_boolean   (clip_extent, _("Clip to the input extent"), TRUE)
+   description (_("Should the output extent be clipped to the input extent"))
 
 #else
 
-#define GEGL_CHANT_TYPE_META
-#define GEGL_CHANT_C_FILE "gaussian-blur-iir.c"
+#define GEGL_OP_META
+#define GEGL_OP_C_FILE "gaussian-blur-iir.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 static void
 attach (GeglOperation *operation)
@@ -92,7 +100,7 @@ attach (GeglOperation *operation)
 }
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass *operation_class;
 
diff --git a/operations/workshop/gblur-1d.c b/operations/workshop/gblur-1d.c
index 2ea0d87..c2a7048 100644
--- a/operations/workshop/gblur-1d.c
+++ b/operations/workshop/gblur-1d.c
@@ -25,48 +25,50 @@
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_register_enum (gegl_gblur_1d_policy)
+enum_start (gegl_gblur_1d_policy)
    enum_value (GEGL_GBLUR_1D_ABYSS_NONE,  "None")
    enum_value (GEGL_GBLUR_1D_ABYSS_CLAMP, "Clamp")
    enum_value (GEGL_GBLUR_1D_ABYSS_BLACK, "Black")
    enum_value (GEGL_GBLUR_1D_ABYSS_WHITE, "White")
-gegl_chant_register_enum_end (GeglGblur1dPolicy)
+enum_end (GeglGblur1dPolicy)
 
-gegl_chant_register_enum (gegl_gblur_1d_orientation)
+enum_start (gegl_gblur_1d_orientation)
   enum_value (GEGL_GBLUR_1D_HORIZONTAL, "Horizontal")
   enum_value (GEGL_GBLUR_1D_VERTICAL,   "Vertical")
-  gegl_chant_register_enum_end (GeglGblur1dOrientation)
+  enum_end (GeglGblur1dOrientation)
 
-gegl_chant_register_enum (gegl_gblur_1d_filter)
+enum_start (gegl_gblur_1d_filter)
   enum_value (GEGL_GBLUR_1D_AUTO, "Auto")
   enum_value (GEGL_GBLUR_1D_FIR,  "FIR")
   enum_value (GEGL_GBLUR_1D_IIR,  "IIR")
-gegl_chant_register_enum_end (GeglGblur1dFilter)
-
-gegl_chant_double_ui (std_dev, _("Size"),
-                      0.0, 1500.0, 1.5, 0.0, 100.0, 3.0,
-                      _("Standard deviation (spatial scale factor)"))
-gegl_chant_enum      (orientation, _("Orientation"),
+enum_end (GeglGblur1dFilter)
+
+property_double (std_dev, _("Size"), 1.5)
+  description (_("Standard deviation (spatial scale factor)"))
+  value_range   (0.0, 1500.0)
+  ui_range      (0.0, 100.0)
+  ui_gamma      (3.0)
+property_enum      (orientation, _("Orientation"),
                       GeglGblur1dOrientation, gegl_gblur_1d_orientation,
-                      GEGL_GBLUR_1D_HORIZONTAL,
-                      _("The orientation of the blur - hor/ver"))
-gegl_chant_enum      (filter, _("Filter"),
+                      GEGL_GBLUR_1D_HORIZONTAL)
+  description (_("The orientation of the blur - hor/ver"))
+property_enum      (filter, _("Filter"),
                       GeglGblur1dFilter, gegl_gblur_1d_filter,
-                      GEGL_GBLUR_1D_AUTO,
-                      _("How the gaussian kernel is discretized"))
-gegl_chant_enum      (abyss_policy, _("Abyss policy"), GeglGblur1dPolicy,
-                      gegl_gblur_1d_policy, GEGL_GBLUR_1D_ABYSS_NONE,
-                      _("How image edges are handled"))
-gegl_chant_boolean   (clip_extent, _("Clip to the input extent"), TRUE,
-                      _("Should the output extent be clipped to the input extent"))
+                      GEGL_GBLUR_1D_AUTO)
+  description (_("How the gaussian kernel is discretized"))
+property_enum      (abyss_policy, _("Abyss policy"), GeglGblur1dPolicy,
+                      gegl_gblur_1d_policy, GEGL_GBLUR_1D_ABYSS_NONE)
+  description (_("How image edges are handled"))
+property_boolean   (clip_extent, _("Clip to the input extent"), TRUE)
+  description (_("Should the output extent be clipped to the input extent"))
 #else
 
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE       "gblur-1d.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE       "gblur-1d.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 #include <stdio.h>
 
@@ -623,7 +625,7 @@ gegl_gblur_1d_prepare (GeglOperation *operation)
 }
 
 static GeglRectangle
-gegl_gblur_1d_enlarge_extent (GeglChantO          *o,
+gegl_gblur_1d_enlarge_extent (GeglProperties          *o,
                               const GeglRectangle *input_extent)
 {
   gint clen = fir_calc_convolve_matrix_length (o->std_dev);
@@ -650,7 +652,7 @@ gegl_gblur_1d_get_required_for_output (GeglOperation       *operation,
                                        const GeglRectangle *output_roi)
 {
   GeglRectangle        required_for_output = { 0, };
-  GeglChantO          *o       = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties          *o       = GEGL_PROPERTIES (operation);
   GeglGblur1dFilter    filter  = filter_disambiguation (o->filter, o->std_dev);
 
   if (filter == GEGL_GBLUR_1D_IIR)
@@ -695,7 +697,7 @@ gegl_gblur_1d_get_required_for_output (GeglOperation       *operation,
 static GeglRectangle
 gegl_gblur_1d_get_bounding_box (GeglOperation *operation)
 {
-  GeglChantO          *o       = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties          *o       = GEGL_PROPERTIES (operation);
   const GeglRectangle *in_rect =
     gegl_operation_source_get_bounding_box (operation, "input");
 
@@ -721,7 +723,7 @@ gegl_gblur_1d_get_cached_region (GeglOperation       *operation,
                                  const GeglRectangle *output_roi)
 {
   GeglRectangle      cached_region;
-  GeglChantO        *o       = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties        *o       = GEGL_PROPERTIES (operation);
   GeglGblur1dFilter  filter  = filter_disambiguation (o->filter, o->std_dev);
 
   cached_region = *output_roi;
@@ -734,7 +736,7 @@ gegl_gblur_1d_get_cached_region (GeglOperation       *operation,
       if (! gegl_rectangle_is_empty (&in_rect) &&
           ! gegl_rectangle_is_infinite_plane (&in_rect))
         {
-          GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+          GeglProperties *o = GEGL_PROPERTIES (operation);
 
           cached_region = *output_roi;
 
@@ -784,7 +786,7 @@ gegl_gblur_1d_process (GeglOperation       *operation,
                        const GeglRectangle *result,
                        gint                 level)
 {
-  GeglChantO *o      = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o      = GEGL_PROPERTIES (operation);
   const Babl *format = gegl_operation_get_format (operation, "output");
 
   GeglGblur1dFilter filter;
@@ -838,10 +840,10 @@ operation_process (GeglOperation        *operation,
                    gint                  level)
 {
   GeglOperationClass  *operation_class;
-  GeglChantO          *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties          *o = GEGL_PROPERTIES (operation);
   GeglGblur1dFilter    filter  = filter_disambiguation (o->filter, o->std_dev);
 
-  operation_class = GEGL_OPERATION_CLASS (gegl_chant_parent_class);
+  operation_class = GEGL_OPERATION_CLASS (gegl_op_parent_class);
 
   if (filter == GEGL_GBLUR_1D_IIR)
     {
@@ -864,7 +866,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/workshop/gradient-map.c b/operations/workshop/gradient-map.c
index 40bf414..30d384c 100644
--- a/operations/workshop/gradient-map.c
+++ b/operations/workshop/gradient-map.c
@@ -22,17 +22,17 @@
 #include "math.h"
 
 
-#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_color(color1, _("Color 1"), "black",
-                  _("Starting color for gradient"))
-gegl_chant_color(color2, _("Color 2"), "white",
-                  _("End color for gradient"))
+#ifdef GEGL_PROPERTIES
+property_color(color1, _("Color 1"), "black")
+    description (_("Starting color for gradient"))
+property_color(color2, _("Color 2"), "white")
+    description (_("End color for gradient"))
 #else
 
-#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "gradient-map.c"
+#define GEGL_OP_POINT_FILTER
+#define GEGL_OP_C_FILE "gradient-map.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 
 // TODO: create a custom GeglGradient type
@@ -89,8 +89,8 @@ process_pixel_gradient_map(gfloat *in, gfloat *out, gdouble *gradient, gint grad
 
 static void prepare (GeglOperation *operation)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
-  GradientMapProperties *props = (GradientMapProperties*)o->chant_data;
+  GeglProperties *o = GEGL_PROPERTIES (operation);
+  GradientMapProperties *props = (GradientMapProperties*)o->user_data;
 
   gegl_operation_set_format (operation, "input", babl_format ("YA float"));
   gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
@@ -99,22 +99,22 @@ static void prepare (GeglOperation *operation)
     {
       props = g_new(GradientMapProperties, 1);
       props->gradient = NULL;
-      o->chant_data = props;
+      o->user_data = props;
     }
 }
 
 static void finalize (GObject *object)
 {
     GeglOperation *op = (void*)object;
-    GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
-    if (o->chant_data) {
-      GradientMapProperties *props = (GradientMapProperties *) o->chant_data;
+    GeglProperties *o = GEGL_PROPERTIES (op);
+    if (o->user_data) {
+      GradientMapProperties *props = (GradientMapProperties *) o->user_data;
       if (props->gradient) {
         g_free(props->gradient);
       }
-      o->chant_data = NULL;
+      o->user_data = NULL;
     }
-    G_OBJECT_CLASS(gegl_chant_parent_class)->finalize (object);
+    G_OBJECT_CLASS(gegl_op_parent_class)->finalize (object);
 }
 
 
@@ -126,12 +126,12 @@ process (GeglOperation       *op,
          const GeglRectangle *roi,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
+  GeglProperties *o = GEGL_PROPERTIES (op);
   gfloat     * GEGL_ALIGNED in_pixel = in_buf;
   gfloat     * GEGL_ALIGNED out_pixel = out_buf;
   const gint gradient_length = 2048;
   const gint gradient_channels = 4; // RGBA
-  GradientMapProperties *props = (GradientMapProperties*)o->chant_data;
+  GradientMapProperties *props = (GradientMapProperties*)o->user_data;
   gdouble *cached_c1 = props->cached_c1;
   gdouble *cached_c2 = props->cached_c2;
 
@@ -155,7 +155,7 @@ process (GeglOperation       *op,
 }
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass            *operation_class;
   GeglOperationPointFilterClass *point_filter_class;
@@ -189,4 +189,4 @@ gegl_chant_class_init (GeglChantClass *klass)
       NULL);
 }
 
-#endif /* #ifdef GEGL_CHANT_PROPERTIES */
+#endif /* #ifdef GEGL_PROPERTIES */
diff --git a/operations/workshop/hstack.c b/operations/workshop/hstack.c
index 3e41ce7..fd65813 100644
--- a/operations/workshop/hstack.c
+++ b/operations/workshop/hstack.c
@@ -20,16 +20,16 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
     /* No properties */
 
 #else
 
-#define GEGL_CHANT_TYPE_COMPOSER
-#define GEGL_CHANT_C_FILE       "hstack.c"
+#define GEGL_OP_COMPOSER
+#define GEGL_OP_C_FILE       "hstack.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 
 static void prepare (GeglOperation *operation)
@@ -157,7 +157,7 @@ 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/workshop/ink-simulator.c b/operations/workshop/ink-simulator.c
index 06dce3e..21c044b 100644
--- a/operations/workshop/ink-simulator.c
+++ b/operations/workshop/ink-simulator.c
@@ -22,7 +22,7 @@
 
 //#define USE_UI
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
 #define DEFAULT_CONFIG \
 "\n"\
@@ -33,39 +33,43 @@
 "ink2.black=black\n"\
 "\n"\
 
-gegl_chant_register_enum (ink_sim_mode)
+enum_start (ink_sim_mode)
   enum_value (GEGL_SSIM_PROOF, "proof")
   enum_value (GEGL_SSIM_SEPARATE, "separate")
   enum_value (GEGL_SSIM_SEPARATE_PROOF, "separate-proof")
-gegl_chant_register_enum_end (GeglInkSimMode)
+enum_end (GeglInkSimMode)
 
-gegl_chant_multiline (config, _("ink configuration"), DEFAULT_CONFIG,
-         _("Textual desciption of inks used for simulated print-job"))
-gegl_chant_enum (mode, _("mode"), GeglInkSimMode, ink_sim_mode,
-                 GEGL_SSIM_SEPARATE_PROOF, _("how the ink simulator is used"))
+property_string (config, _("ink configuration"), DEFAULT_CONFIG)
+  description (_("Textual desciption of inks used for simulated print-job"))
+
+property_enum (mode, _("mode"), GeglInkSimMode, ink_sim_mode,
+                 GEGL_SSIM_SEPARATE_PROOF)
+  description (_("how the ink simulator is used"))
 
 #ifdef USE_UI
 
-gegl_chant_color (substrate_color, _("Substrate color"), "#ffffff", _("paper/fabric/material color"))
-gegl_chant_color (ink1_color, _("Ink1 color"), "#00ffff00", _("ink color"))
-gegl_chant_color (ink2_color, _("Ink2 color"), "#ff00ff00", _("ink color"))
-gegl_chant_color (ink3_color, _("Ink3 color"), "#ffff0000", _("ink color"))
-gegl_chant_color (ink4_color, _("Ink4 color"), "#00000000", _("ink color"))
-gegl_chant_color (ink5_color, _("Ink5 color"), "#ff000000", _("ink color"))
+property_color (substrate_color, _("Substrate color"), "#ffffff", _("paper/fabric/material color"))
+property_color (ink1_color, _("Ink1 color"), "#00ffff00", _("ink color"))
+property_color (ink2_color, _("Ink2 color"), "#ff00ff00", _("ink color"))
+property_color (ink3_color, _("Ink3 color"), "#ffff0000", _("ink color"))
+property_color (ink4_color, _("Ink4 color"), "#00000000", _("ink color"))
+property_color (ink5_color, _("Ink5 color"), "#ff000000", _("ink color"))
 
-gegl_chant_double (ink_limit, _("Ink limit"), 0.0, 5.0, 3.0,
+property_double (ink_limit, _("Ink limit"), 0.0, 5.0, 3.0,
                    _("maximum amount of ink for one pixel, 2.5 = 250% coverage"))
 
 #endif
 
-gegl_chant_int (debug_width, _("debug width"), 0, 150, 0, _("how wide peel off bands for ink order vis"))
+property_int (debug_width, _("debug width"), 0)
+   value_range (0, 150)
+   description (_("how wide peel off bands for ink order vis"))
 
 #else
 
-#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE       "ink-simulator.c"
+#define GEGL_OP_POINT_FILTER
+#define GEGL_OP_C_FILE       "ink-simulator.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 
 /*********************/
@@ -1212,7 +1216,7 @@ int   ssim_get_halftone_sim (SSim *ssim)
 static void
 prepare (GeglOperation *operation)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
   const Babl *input_format = gegl_operation_get_source_format (operation, "input");
   gint input_components = 1;
   if (input_format)
@@ -1228,7 +1232,7 @@ prepare (GeglOperation *operation)
       break;
     case GEGL_SSIM_SEPARATE:
       //gegl_operation_set_format (operation, "output", 
-      //  babl_format_n (babl_type("float"), ssim_get_ink_count (o->chant_data)));
+      //  babl_format_n (babl_type("float"), ssim_get_ink_count (o->user_data)));
       gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
 
       gegl_operation_set_format (operation, "input",
@@ -1270,16 +1274,16 @@ prepare (GeglOperation *operation)
 
   g_string_append_printf (conf_str, "inklimit=%f\n", o->ink_limit);
 
-  if (o->chant_data)
-    ssim_destroy (o->chant_data);
-  o->chant_data = ssim_new (conf_str->str);
+  if (o->user_data)
+    ssim_destroy (o->user_data);
+  o->user_data = ssim_new (conf_str->str);
 
   g_string_free (conf_str, TRUE);
 #else
 
-  if (o->chant_data)
-    ssim_destroy (o->chant_data);
-  o->chant_data = ssim_new (o->config);
+  if (o->user_data)
+    ssim_destroy (o->user_data);
+  o->user_data = ssim_new (o->config);
 #endif
 }
 
@@ -1291,10 +1295,10 @@ process (GeglOperation       *op,
          const GeglRectangle *roi,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
+  GeglProperties *o = GEGL_PROPERTIES (op);
   gfloat *in  = in_buf;
   gfloat *out = out_buf;
-  SSim *ssim = o->chant_data;
+  SSim *ssim = o->user_data;
   int in_components = 
     babl_format_get_n_components (gegl_operation_get_format (op, "input"));
 
@@ -1387,17 +1391,17 @@ process (GeglOperation       *op,
 static void
 finalize (GObject *object)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (object);
-  if (o->chant_data)
+  GeglProperties *o = GEGL_PROPERTIES (object);
+  if (o->user_data)
   {
-    ssim_destroy (o->chant_data);
-    o->chant_data = NULL;
+    ssim_destroy (o->user_data);
+    o->user_data = NULL;
   }
   G_OBJECT_CLASS (g_type_class_peek_parent (G_OBJECT_GET_CLASS (object)))->finalize (object);
 }
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass            *operation_class;
   GeglOperationPointFilterClass *point_filter_class;
diff --git a/operations/workshop/kuwahara.c b/operations/workshop/kuwahara.c
index e5f30da..bee7a2c 100644
--- a/operations/workshop/kuwahara.c
+++ b/operations/workshop/kuwahara.c
@@ -20,17 +20,18 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_double (radius, _("Radius"), 0.0, 50.0, 10.0,
-  _("Radius of square pixel region (width and height will be radius*2+1)"))
+property_double (radius, _("Radius"), 10.0)
+   value_range (0.0, 50.0)
+   description (_("Radius of square pixel region (width and height will be radius*2+1)"))
 
 #else
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "kuwahara.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "kuwahara.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 
 static inline void
@@ -201,7 +202,7 @@ static void prepare (GeglOperation *operation)
   GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
 
   area->left = area->right = area->top = area->bottom =
-      ceil (GEGL_CHANT_PROPERTIES (operation)->radius);
+      ceil (GEGL_PROPERTIES (operation)->radius);
   gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
 }
 
@@ -212,7 +213,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
   GeglBuffer   *temp_in;
   GeglRectangle compute = gegl_operation_get_required_for_output (operation, "input", result);
 
@@ -226,7 +227,7 @@ 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/workshop/mandelbrot.c b/operations/workshop/mandelbrot.c
index ee9732e..221d5b8 100644
--- a/operations/workshop/mandelbrot.c
+++ b/operations/workshop/mandelbrot.c
@@ -20,26 +20,27 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_double(real, _("Real"),      -200.0, 200.0, -1.77,
-                  _("Real coordinate"))
-gegl_chant_double(img,  _("Imaginary"), -200.0, 200.0, 0.0,
-                  _("Imaginary coordinate"))
-gegl_chant_double(level, _("Level"), -200.0, 200.0, 3.5,
-                  _("Water level"))
-gegl_chant_int (maxiter, _("Iterations"), 0, 512, 128,
-                _("Maximum number of iterations"))
+#ifdef GEGL_PROPERTIES
+
+property_double(real, _("Real coordinate"), -1.77)
+   value_range (-200.0, 200.0)
+property_double(img,  _("Imaginary coordinate"), 0.0)
+   value_range (-200.0, 200.0)
+property_double(level, _("Water level"), 3.5)
+   value_range (-200.0, 200.0)
+property_int (maxiter, _("Iterations"), 128)
+   description (_("Maximum number of iterations"))
+   value_range (0, 512)
 
 #else
 
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE           "mandelbrot.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE           "mandelbrot.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 static gfloat
-mandel_calc(GeglChantO *o, gfloat x, gfloat y)
+mandel_calc(GeglProperties *o, gfloat x, gfloat y)
 {
   gfloat fViewRectReal = o->real;
   gfloat fViewRectImg  = o->img;
@@ -85,7 +86,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
   gfloat     *buf;
   gint        pxsize;
 
@@ -126,7 +127,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/workshop/rawbayer-load.c b/operations/workshop/rawbayer-load.c
index 543051c..33c2dac 100644
--- a/operations/workshop/rawbayer-load.c
+++ b/operations/workshop/rawbayer-load.c
@@ -20,16 +20,17 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_string (path, _("File"), "/tmp/test.raw", _("Path of file to load."))
+property_string (path, _("File"), "/tmp/test.raw")
+   description (_("Path of file to load."))
 
 #else
 
-#define GEGL_CHANT_TYPE_SOURCE
-#define GEGL_CHANT_C_FILE       "rawbayer-load.c"
+#define GEGL_OP_SOURCE
+#define GEGL_OP_C_FILE       "rawbayer-load.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <unistd.h>
 #include <string.h>
 #include <stdio.h>
@@ -40,9 +41,9 @@ gegl_chant_string (path, _("File"), "/tmp/test.raw", _("Path of file to load."))
 #define ERROR -1
 
 static void
-load_buffer (GeglChantO *op_raw_load)
+load_buffer (GeglProperties *op_raw_load)
 {
-  if (!op_raw_load->chant_data)
+  if (!op_raw_load->user_data)
     {
       FILE  *pfp;
       gchar *command;
@@ -64,7 +65,7 @@ load_buffer (GeglChantO *op_raw_load)
 
       {
         GeglRectangle extent = { 0, 0, width, height };
-        op_raw_load->chant_data = (void*)gegl_buffer_new (&extent, babl_format ("Y u16"));
+        op_raw_load->user_data = (void*)gegl_buffer_new (&extent, babl_format ("Y u16"));
       }
          {
            guchar *buf = g_new (guchar, width * height * 3 * 2);
@@ -78,7 +79,7 @@ load_buffer (GeglChantO *op_raw_load)
                 buf[i*2+1] = tmp;
                }
            }
-           gegl_buffer_set (GEGL_BUFFER (op_raw_load->chant_data),
+           gegl_buffer_set (GEGL_BUFFER (op_raw_load->user_data),
                             NULL,
                             0,
                             babl_format_new (
@@ -99,13 +100,13 @@ load_buffer (GeglChantO *op_raw_load)
 static GeglRectangle
 get_bounding_box (GeglOperation *operation)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
   GeglRectangle result = {0,0,0,0};
 
   load_buffer (o);
 
-  result.width  = gegl_buffer_get_width (GEGL_BUFFER (o->chant_data));
-  result.height = gegl_buffer_get_height (GEGL_BUFFER (o->chant_data));
+  result.width  = gegl_buffer_get_width (GEGL_BUFFER (o->user_data));
+  result.height = gegl_buffer_get_height (GEGL_BUFFER (o->user_data));
   return result;
 }
 
@@ -116,21 +117,21 @@ process (GeglOperation        *operation,
          const GeglRectangle  *result,
          gint                  level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
 #if 1
-  g_assert (o->chant_data);
-  gegl_operation_context_take_object (context, "output", G_OBJECT (o->chant_data));
+  g_assert (o->user_data);
+  gegl_operation_context_take_object (context, "output", G_OBJECT (o->user_data));
 
-  o->chant_data = NULL;
+  o->user_data = NULL;
 #else
-  if (o->chant_data)
+  if (o->user_data)
     {
-      g_object_ref (o->chant_data); /* Add an extra reference, since gegl_operation_set_data
+      g_object_ref (o->user_data); /* Add an extra reference, since gegl_operation_set_data
                                       is stealing one.
                                     */
 
       /* override core behaviour, by resetting the buffer in the operation_context */
-      gegl_operation_context_take_object (context, "output", G_OBJECT (o->chant_data));
+      gegl_operation_context_take_object (context, "output", G_OBJECT (o->user_data));
     }
 #endif
   return TRUE;
@@ -138,7 +139,7 @@ process (GeglOperation        *operation,
 
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass       *operation_class;
 
diff --git a/operations/workshop/snn-percentile.c b/operations/workshop/snn-percentile.c
index c8e9a3c..1125314 100644
--- a/operations/workshop/snn-percentile.c
+++ b/operations/workshop/snn-percentile.c
@@ -22,23 +22,28 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_double (radius, _("Radius"), 0.0, 70.0, 8.0,
-  _("Radius of square pixel region (width and height will be radius*2+1)"))
-gegl_chant_int (pairs, _("Pairs"), 1, 2, 2,
-  _("Number of pairs, higher number preserves more acute features"))
-gegl_chant_double (percentile, _("Percentile"), 0.0, 100.0, 50.0,
-  _("The percentile to return, the default value 50 is equal to the median"))
+property_double (radius, _("Radius"), 8.0)
+   description(_("Radius of square pixel region (width and height will be radius*2+1)"))
+   value_range (0.0, 70.0)
+
+property_int (pairs, _("Pairs"), 2)
+   description (_("Number of pairs, higher number preserves more acute features"))
+   value_range (1, 2)
+
+property_double (percentile, _("Percentile"), 50.0)
+   description (_("The percentile to return, the default value 50 is equal to the median"))
+   value_range (0.0, 100.0)
 
 #else
 
 #define MAX_SAMPLES 20000 /* adapted to percentile level of radius */
 
-#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE       "snn-percentile.c"
+#define GEGL_OP_AREA_FILTER
+#define GEGL_OP_C_FILE       "snn-percentile.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 
 #define RGB_LUMINANCE_RED    (0.222491)
@@ -222,7 +227,7 @@ static void prepare (GeglOperation *operation)
 {
   GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
   area->left = area->right = area->top = area->bottom =
-      GEGL_CHANT_PROPERTIES (operation)->radius;
+      GEGL_PROPERTIES (operation)->radius;
   gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
 }
 
@@ -233,7 +238,7 @@ process (GeglOperation       *operation,
          const GeglRectangle *result,
          gint                 level)
 {
-  GeglChantO   *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties   *o = GEGL_PROPERTIES (operation);
   GeglBuffer   *temp_in;
   GeglRectangle compute  = gegl_operation_get_required_for_output (operation, "input", result);
 
@@ -255,7 +260,7 @@ 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/workshop/unpremul.c b/operations/workshop/unpremul.c
index 5731af2..e86a115 100644
--- a/operations/workshop/unpremul.c
+++ b/operations/workshop/unpremul.c
@@ -16,17 +16,17 @@
  * Copyright 2006 Øyvind Kolås <pippin gimp org>
  */
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
    /* no properties */
 
 #else
 
-#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE       "unpremul.c"
+#define GEGL_OP_POINT_FILTER
+#define GEGL_OP_C_FILE       "unpremul.c"
 #define GEGLV4
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 static gboolean
 process (GeglOperation       *op,
@@ -59,7 +59,7 @@ process (GeglOperation       *op,
 
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass            *operation_class;
   GeglOperationPointFilterClass *point_filter_class;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]