[gegl] Revert "add GeglInterpolation enum in the chant system"



commit 6ab55a1f2b70ef68a5a43269ffdbd4672267ce8b
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sun Jul 3 02:59:20 2011 +0100

    Revert "add GeglInterpolation enum in the chant system"
    
    This reverts commit 9abea8ed0d24074df83b77204b8a13a1fede0303.

 gegl/buffer/gegl-buffer.h        |    7 +++++
 gegl/gegl-chant.h                |   54 ++++++++++----------------------------
 gegl/gegl-types.h                |    7 -----
 operations/common/map-absolute.c |    4 +--
 4 files changed, 22 insertions(+), 50 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index f5f6d7b..f303f52 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -307,6 +307,13 @@ void            gegl_buffer_copy              (GeglBuffer          *src,
  */
 GeglBuffer    * gegl_buffer_dup               (GeglBuffer       *buffer);
 
+typedef enum {
+  GEGL_INTERPOLATION_NEAREST = 0,
+  GEGL_INTERPOLATION_LINEAR,
+  GEGL_INTERPOLATION_CUBIC,
+  GEGL_INTERPOLATION_LANCZOS,
+  GEGL_INTERPOLATION_LOHALO
+} GeglInterpolation;
 
 /**
  * gegl_buffer_sample:
diff --git a/gegl/gegl-chant.h b/gegl/gegl-chant.h
index f1cbb3c..24de227 100644
--- a/gegl/gegl-chant.h
+++ b/gegl/gegl-chant.h
@@ -341,19 +341,18 @@ struct _GeglChantO
                         * in finalize). Also serves as a filler making sure that we
                         * do not create an empty struct if there are no chanted properties.
                         */
-#define gegl_chant_int(name, nick, min, max, def, blurb)     gint               name;
-#define gegl_chant_double(name, nick, min, max, def, blurb)  gdouble            name;
-#define gegl_chant_boolean(name, nick, def, blurb)           gboolean           name;
-#define gegl_chant_string(name, nick, def, blurb)            gchar             *name;
-#define gegl_chant_file_path(name, nick, def, blurb)         gchar             *name;
-#define gegl_chant_multiline(name, nick, def, blurb)         gchar             *name;
-#define gegl_chant_object(name,nick,  blurb)                 GObject           *name;
-#define gegl_chant_pointer(name, nick, blurb)                gpointer           name;
-#define gegl_chant_color(name, nick, def, blurb)             GeglColor         *name;
-#define gegl_chant_curve(name, nick, blurb)                  GeglCurve         *name;
-#define gegl_chant_path(name, nick, blurb)                   GeglPath          *name;\
-                                                          guint path_changed_handler;
-#define gegl_chant_interpolation(name, nick, def, blurb)     GeglInterpolation  name;
+#define gegl_chant_int(name, nick, min, max, def, blurb)     gint        name;
+#define gegl_chant_double(name, nick, min, max, def, blurb)  gdouble     name;
+#define gegl_chant_boolean(name, nick, def, blurb)           gboolean    name;
+#define gegl_chant_string(name, nick, def, blurb)            gchar      *name;
+#define gegl_chant_file_path(name, nick, def, blurb)         gchar      *name;
+#define gegl_chant_multiline(name, nick, def, blurb)         gchar      *name;
+#define gegl_chant_object(name,nick,  blurb)                 GObject    *name;
+#define gegl_chant_pointer(name, nick, blurb)                gpointer    name;
+#define gegl_chant_color(name, nick, def, blurb)             GeglColor  *name;
+#define gegl_chant_curve(name, nick, blurb)                  GeglCurve  *name;
+#define gegl_chant_path(name, nick, blurb)                   GeglPath   *name;\
+                                                   guint path_changed_handler;
 
 #include GEGL_CHANT_C_FILE
 
@@ -368,7 +367,6 @@ struct _GeglChantO
 #undef gegl_chant_color
 #undef gegl_chant_curve
 #undef gegl_chant_path
-#undef gegl_chant_interpolation
 };
 
 #define GEGL_CHANT_OPERATION(obj) ((Operation*)(obj))
@@ -387,7 +385,6 @@ enum
 #define gegl_chant_color(name, nick, def, blurb)             PROP_##name,
 #define gegl_chant_curve(name, nick, blurb)                  PROP_##name,
 #define gegl_chant_path(name, nick, blurb)                   PROP_##name,
-#define gegl_chant_interpolation(name, nick, def, blurb)     PROP_##name,
 
 #include GEGL_CHANT_C_FILE
 
@@ -402,7 +399,6 @@ enum
 #undef gegl_chant_color
 #undef gegl_chant_curve
 #undef gegl_chant_path
-#undef gegl_chant_interpolation
   PROP_LAST
 };
 
@@ -463,10 +459,6 @@ get_property (GObject      *gobject,
       if (!properties->name)properties->name = gegl_path_new (); /* this feels ugly */\
       g_value_set_object (value, properties->name);           \
       break;/*XXX*/
-#define gegl_chant_interpolation(name, nick, def, blurb)      \
-    case PROP_##name:                                         \
-      g_value_set_enum (value, properties->name);             \
-      break;
 
 #include GEGL_CHANT_C_FILE
 
@@ -481,7 +473,6 @@ get_property (GObject      *gobject,
 #undef gegl_chant_color
 #undef gegl_chant_curve
 #undef gegl_chant_path
-#undef gegl_chant_interpolation
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
       break;
@@ -569,10 +560,6 @@ set_property (GObject      *gobject,
           G_CALLBACK(path_changed), gobject);     \
          }\
       break; /*XXX*/
-#define gegl_chant_interpolation(name, nick, def, blurb)              \
-    case PROP_##name:                                                 \
-      properties->name = g_value_get_enum (value);                    \
-      break;
 
 #include GEGL_CHANT_C_FILE
 
@@ -587,7 +574,6 @@ set_property (GObject      *gobject,
 #undef gegl_chant_color
 #undef gegl_chant_curve
 #undef gegl_chant_path
-#undef gegl_chant_interpolation
 
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
@@ -647,7 +633,6 @@ static void gegl_chant_destroy_notify (gpointer data)
       g_object_unref (properties->name);            \
       properties->name = NULL;                      \
     }
-#define gegl_chant_interpolation(name, nick, def, blurb)
 
 #include GEGL_CHANT_C_FILE
 
@@ -662,7 +647,6 @@ static void gegl_chant_destroy_notify (gpointer data)
 #undef gegl_chant_color
 #undef gegl_chant_curve
 #undef gegl_chant_path
-#undef gegl_chant_interpolation
 
   g_slice_free (GeglChantO, properties);
 }
@@ -694,7 +678,6 @@ gegl_chant_constructor (GType                  type,
     {properties->name = gegl_color_new(def?def:"black");}
 #define gegl_chant_path(name, nick, blurb)
 #define gegl_chant_curve(name, nick, blurb)
-#define gegl_chant_interpolation(name, nick, def, blurb)
 
 #include GEGL_CHANT_C_FILE
 
@@ -709,7 +692,6 @@ gegl_chant_constructor (GType                  type,
 #undef gegl_chant_color
 #undef gegl_chant_curve
 #undef gegl_chant_path
-#undef gegl_chant_interpolation
 
   g_object_set_data_full (obj, "chant-data", obj, gegl_chant_destroy_notify);
   properties ++; /* evil hack to silence gcc */
@@ -795,7 +777,7 @@ gegl_chant_class_intern_init (gpointer klass)
                                                           def,               \
                                                           (GParamFlags) (    \
                                                           G_PARAM_READWRITE |\
-                                                          G_PARAM_CONSTRUCT | \
+														  G_PARAM_CONSTRUCT | \
                                                           GEGL_PARAM_PAD_INPUT)));
 #define gegl_chant_path(name, nick, blurb)                                 \
   g_object_class_install_property (object_class, PROP_##name,                \
@@ -813,14 +795,7 @@ gegl_chant_class_intern_init (gpointer klass)
                                                           G_PARAM_READWRITE |\
                                                           G_PARAM_CONSTRUCT |\
                                                           GEGL_PARAM_PAD_INPUT)));
-#define gegl_chant_interpolation(name, nick, def, blurb)                     \
-  g_object_class_install_property (object_class, PROP_##name,                \
-                                   g_param_spec_enum (#name, nick, blurb,    \
-                                                      GeglInterpolation,     \
-                                                      def,                   \
-                                                      G_PARAM_READWRITE |    \
-                                                      G_PARAM_CONSTRUCT |    \
-                                                      GEGL_PARAM_PAD_INPUT));
+
 
 #include GEGL_CHANT_C_FILE
 
@@ -835,7 +810,6 @@ gegl_chant_class_intern_init (gpointer klass)
 #undef gegl_chant_color
 #undef gegl_chant_curve
 #undef gegl_chant_path
-#undef gegl_chant_interpolation
 }
 
 
diff --git a/gegl/gegl-types.h b/gegl/gegl-types.h
index 9004da8..f42e6ca 100644
--- a/gegl/gegl-types.h
+++ b/gegl/gegl-types.h
@@ -64,13 +64,6 @@ GType gegl_processor_get_type  (void) G_GNUC_CONST;
 #define GEGL_PROCESSOR(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PROCESSOR, GeglProcessor))
 #define GEGL_IS_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PROCESSOR))
 
-typedef enum {
-  GEGL_INTERPOLATION_NEAREST = 0,
-  GEGL_INTERPOLATION_LINEAR,
-  GEGL_INTERPOLATION_CUBIC,
-  GEGL_INTERPOLATION_LANCZOS,
-  GEGL_INTERPOLATION_LOHALO
-} GeglInterpolation;
 
 G_END_DECLS
 
diff --git a/operations/common/map-absolute.c b/operations/common/map-absolute.c
index 8f6898c..d913035 100644
--- a/operations/common/map-absolute.c
+++ b/operations/common/map-absolute.c
@@ -26,12 +26,10 @@
 #include "buffer/gegl-sampler.h"
 #include "buffer/gegl-buffer-iterator.h"
 
+#include <stdio.h>
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-gegl_chant_interpolation (interp, _("Interpolation"),
-                          GEGL_INTERPOLATION_CUBIC, _("Interpolation used internaly"))
-
 #else
 
 #define GEGL_CHANT_TYPE_COMPOSER



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