[gegl] stretch-contrast: use gegl-op.h



commit f906735321750ef64fe29d34016335ad8b65a9a0
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat May 17 14:13:04 2014 +0200

    stretch-contrast: use gegl-op.h

 operations/common/stretch-contrast.c |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/operations/common/stretch-contrast.c b/operations/common/stretch-contrast.c
index 06c2a27..6d832ea 100644
--- a/operations/common/stretch-contrast.c
+++ b/operations/common/stretch-contrast.c
@@ -20,17 +20,19 @@
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_boolean (keep_colors, _("Keep colors"), TRUE,
-                    _("Impact each channel with the same amount"))
+gegl_property_boolean (keep_colors, "nick", _("Keep colors"),
+    "blurb", _("Impact each channel with the same amount"),
+    "default", TRUE,
+    NULL)
 
 #else
 
-#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE       "stretch-contrast.c"
+#define GEGL_OP_FILTER
+#define GEGL_OP_C_FILE       "stretch-contrast.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 #include <math.h>
 
 static void
@@ -349,10 +351,10 @@ cl_process (GeglOperation       *operation,
   cl_int    err = 0;
   gint      read, c;
   GeglBufferClIterator *i;
-  GeglChantO           *o;
+  GeglProperties           *o;
   cl_float4 cl_min, cl_diff;
 
-  o = GEGL_CHANT_PROPERTIES (operation);
+  o = GEGL_PROPERTIES (operation);
 
   if (cl_build_kernels ())
     return FALSE;
@@ -456,14 +458,14 @@ process (GeglOperation       *operation,
 {
   gfloat  min[3], max[3], diff[3];
   GeglBufferIterator *gi;
-  GeglChantO         *o;
+  GeglProperties         *o;
   gint                c;
 
   if (gegl_cl_is_accelerated ())
     if (cl_process (operation, input, output, result))
       return TRUE;
 
-  o = GEGL_CHANT_PROPERTIES (operation);
+  o = GEGL_PROPERTIES (operation);
 
   buffer_get_min_max (input, min, max);
 
@@ -523,7 +525,7 @@ operation_process (GeglOperation        *operation,
   const GeglRectangle *in_rect =
     gegl_operation_source_get_bounding_box (operation, "input");
 
-  operation_class = GEGL_OPERATION_CLASS (gegl_chant_parent_class);
+  operation_class = GEGL_OPERATION_CLASS (gegl_op_parent_class);
 
   if (in_rect && gegl_rectangle_is_infinite_plane (in_rect))
     {
@@ -546,7 +548,7 @@ operation_process (GeglOperation        *operation,
  * computations.
  */
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass       *operation_class;
   GeglOperationFilterClass *filter_class;


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