[gegl/pippin/property-keys] threshold: move to new api



commit 1e7b027595d31e7f88362a225773d4d142eb1c40
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed May 14 22:08:47 2014 +0200

    threshold: move to new api

 operations/common/threshold.c |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/operations/common/threshold.c b/operations/common/threshold.c
index 6c06654..2538e5a 100644
--- a/operations/common/threshold.c
+++ b/operations/common/threshold.c
@@ -20,17 +20,22 @@
 #include <glib/gi18n-lib.h>
 
 
-#ifdef GEGL_CHANT_PROPERTIES
+#ifdef GEGL_PROPERTIES
 
-gegl_chant_double_ui (value, _("Threshold"), -10.0, 10.0, 0.5, 0.0, 1.0, 1.0, 
-   _("Global threshold level (used when there is no auxiliary input buffer)."))
+gegl_property_double (value,
+     "nick", _("Threshold"),
+     "min", -10.0,
+     "max", 10.0,
+     "default", 0.5,
+     "blurb", _("Global threshold level (used when there is no auxiliary input buffer)."),
+     NULL)
 
 #else
 
-#define GEGL_CHANT_TYPE_POINT_COMPOSER
-#define GEGL_CHANT_C_FILE       "threshold.c"
+#define GEGL_OP_POINT_COMPOSER
+#define GEGL_OP_C_FILE       "threshold.c"
 
-#include "gegl-chant.h"
+#include "gegl-op.h"
 
 static void prepare (GeglOperation *operation)
 {
@@ -55,7 +60,7 @@ process (GeglOperation       *op,
 
   if (aux == NULL)
     {
-      gfloat value = GEGL_CHANT_PROPERTIES (op)->value;
+      gfloat value = GEGL_PROPERTIES (op)->value;
       for (i=0; i<n_pixels; i++)
         {
           gfloat c;
@@ -92,7 +97,7 @@ process (GeglOperation       *op,
 #include "opencl/threshold.cl.h"
 
 static void
-gegl_chant_class_init (GeglChantClass *klass)
+gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass              *operation_class;
   GeglOperationPointComposerClass *point_composer_class;


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