[gegl/pippin/property-keys] color: migrate to new style chanting



commit 8b0b5b8fa79daadf21e513897c40f3b960e45ac2
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed May 14 20:19:30 2014 +0200

    color: migrate to new style chanting

 operations/common/color.c |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/operations/common/color.c b/operations/common/color.c
index f544026..8516c10 100644
--- a/operations/common/color.c
+++ b/operations/common/color.c
@@ -19,25 +19,27 @@
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
-#ifdef GEGL_CHANT_PROPERTIES
-
-gegl_chant_color (value, _("Color"), "black",
-                  _("The color to render (defaults to 'black')"))
-
-gegl_chant_format (format, _("Babl Format"),
-                   _("The babl format of the output"))
-
+#ifdef GEGL_PROPERTIES
+gegl_property_color (value,
+                     "nick", _("Color"),
+                     "default", "black",
+                     "blurb", _("The color to render (defaults to 'black')"),
+                     NULL)
+
+gegl_property_format (format, "nick", _("Babl Format"),
+                     "blurb", _("The babl format of the output"),
+                     NULL)
 #else
 
-#define GEGL_CHANT_TYPE_POINT_RENDER
-#define GEGL_CHANT_C_FILE           "color.c"
+#define GEGL_OP_POINT_RENDER
+#define GEGL_OP_C_FILE           "color.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 static void
 gegl_color_op_prepare (GeglOperation *operation)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
 
   if (o->format)
     gegl_operation_set_format (operation, "output", o->format);
@@ -58,7 +60,7 @@ gegl_color_op_process (GeglOperation       *operation,
                        const GeglRectangle *roi,
                        gint                 level)
 {
-  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+  GeglProperties *o = GEGL_PROPERTIES (operation);
   const Babl *out_format = gegl_operation_get_format (operation, "output");
   gint        pixel_size = babl_format_get_bytes_per_pixel (out_format);
   void       *out_color  = alloca(pixel_size);
@@ -72,7 +74,7 @@ gegl_color_op_process (GeglOperation       *operation,
 
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass            *operation_class;
   GeglOperationPointRenderClass *point_render_class;


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