[gegl/pippin/property-keys: 3/11] threshold: migrate to new op api
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/pippin/property-keys: 3/11] threshold: migrate to new op api
- Date: Wed, 14 May 2014 23:53:41 +0000 (UTC)
commit 69c91bf61ce6009882caa5f7fddaec87ae728cd4
Author: Øyvind Kolås <pippin gimp org>
Date: Thu May 15 00:56:19 2014 +0200
threshold: migrate to new op api
operations/common/threshold.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/operations/common/threshold.c b/operations/common/threshold.c
index 6c06654..c5f1b7e 100644
--- a/operations/common/threshold.c
+++ b/operations/common/threshold.c
@@ -20,17 +20,23 @@
#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 +61,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 +98,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]