[gegl] transform/chant.h: remove unused macro to avoid confusion with the real chant.h
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] transform/chant.h: remove unused macro to avoid confusion with the real chant.h
- Date: Tue, 17 Jul 2012 13:45:58 +0000 (UTC)
commit 7fe798bb38a65a4efeab4f544d8454041648b461
Author: Michael Murà <batolettre gmail com>
Date: Tue Jul 17 22:44:56 2012 +0900
transform/chant.h: remove unused macro to avoid confusion with the real chant.h
operations/transform/chant.h | 133 ------------------------------------------
1 files changed, 0 insertions(+), 133 deletions(-)
---
diff --git a/operations/transform/chant.h b/operations/transform/chant.h
index 3e0b590..8e52328 100644
--- a/operations/transform/chant.h
+++ b/operations/transform/chant.h
@@ -24,26 +24,16 @@ typedef struct GeneratedClass ChantClass;
struct Generated
{
GEGL_CHANT_PARENT_TypeName parent_instance;
-#define gegl_chant_int(name, min, max, def, blurb) gint name;
#define gegl_chant_double(name, min, max, def, blurb) gdouble name;
-#define gegl_chant_float(name, min, max, def, blurb) gfloat name;
-#define gegl_chant_boolean(name, def, blurb) gboolean name;
#define gegl_chant_string(name, def, blurb) gchar *name;
-#define gegl_chant_object(name, blurb) GObject *name;
-#define gegl_chant_pointer(name, blurb) gpointer name;
#include GEGL_CHANT_SELF
/****************************************************************************/
/* undefining the chant macros before all subsequent inclusions */
-#undef gegl_chant_int
#undef gegl_chant_double
-#undef gegl_chant_float
-#undef gegl_chant_boolean
#undef gegl_chant_string
-#undef gegl_chant_object
-#undef gegl_chant_pointer
/****************************************************************************/
};
@@ -104,23 +94,13 @@ M_DEFINE_TYPE (GEGL_CHANT_NAME, GEGL_CHANT_PARENT_TYPE)
enum
{
PROP_0,
-#define gegl_chant_int(name, min, max, def, blurb) PROP_##name,
#define gegl_chant_double(name, min, max, def, blurb) PROP_##name,
-#define gegl_chant_float(name, min, max, def, blurb) PROP_##name,
-#define gegl_chant_boolean(name, def, blurb) PROP_##name,
#define gegl_chant_string(name, def, blurb) PROP_##name,
-#define gegl_chant_object(name, blurb) PROP_##name,
-#define gegl_chant_pointer(name, blurb) PROP_##name,
#include GEGL_CHANT_SELF
-#undef gegl_chant_int
#undef gegl_chant_double
-#undef gegl_chant_float
-#undef gegl_chant_boolean
#undef gegl_chant_string
-#undef gegl_chant_object
-#undef gegl_chant_pointer
PROP_LAST
};
@@ -134,30 +114,15 @@ get_property (GObject *gobject,
switch (property_id)
{
-#define gegl_chant_int(name, min, max, def, blurb)\
- case PROP_##name: g_value_set_int (value, self->name);break;
#define gegl_chant_double(name, min, max, def, blurb)\
case PROP_##name: g_value_set_double (value, self->name);break;
-#define gegl_chant_float(name, min, max, def, blurb)\
- case PROP_##name: g_value_set_float (value, self->name);break;
-#define gegl_chant_boolean(name, def, blurb)\
- case PROP_##name: g_value_set_boolean (value, self->name);break;
#define gegl_chant_string(name, def, blurb)\
case PROP_##name: g_value_set_string (value, self->name);break;
-#define gegl_chant_object(name, blurb)\
- case PROP_##name: g_value_set_object (value, self->name);break;
-#define gegl_chant_pointer(name, blurb)\
- case PROP_##name: g_value_set_pointer (value, self->name);break;
#include GEGL_CHANT_SELF
-#undef gegl_chant_int
#undef gegl_chant_double
-#undef gegl_chant_float
-#undef gegl_chant_boolean
#undef gegl_chant_string
-#undef gegl_chant_object
-#undef gegl_chant_pointer
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
break;
@@ -175,48 +140,21 @@ set_property (GObject *gobject,
switch (property_id)
{
-#define gegl_chant_int(name, min, max, def, blurb)\
- case PROP_##name:\
- self->name = g_value_get_int (value);\
- break;
#define gegl_chant_double(name, min, max, def, blurb)\
case PROP_##name:\
self->name = g_value_get_double (value);\
break;
-#define gegl_chant_float(name, min, max, def, blurb)\
- case PROP_##name:\
- self->name = g_value_get_float (value);\
- break;
-#define gegl_chant_boolean(name, def, blurb)\
- case PROP_##name:\
- self->name = g_value_get_boolean (value);\
- break;
#define gegl_chant_string(name, def, blurb)\
case PROP_##name:\
if (self->name)\
g_free (self->name);\
self->name = g_strdup (g_value_get_string (value));\
break;
-#define gegl_chant_object(name, blurb)\
- case PROP_##name:\
- if (self->name != NULL) \
- g_object_unref (self->name);\
- self->name = g_value_get_object (value);\
- break;
-#define gegl_chant_pointer(name, blurb)\
- case PROP_##name:\
- self->name = g_value_get_pointer (value);\
- break;
#include GEGL_CHANT_SELF
-#undef gegl_chant_int
#undef gegl_chant_double
-#undef gegl_chant_float
-#undef gegl_chant_boolean
#undef gegl_chant_string
-#undef gegl_chant_object
-#undef gegl_chant_pointer
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
@@ -229,29 +167,6 @@ static void gegl_chant_init (GeglChantOperation *self)
{
}
-#ifdef GEGL_CHANT_INIT
-static void init (GeglChantOperation *self);
-
-static GObject *
-gegl_chant_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_properties)
-{
- GObject *obj;
-
- obj = G_OBJECT_CLASS (gegl_chant_parent_class)->constructor (
- type, n_construct_properties, construct_properties);
-
- init (GEGL_CHANT_OPERATION (obj));
-
- return obj;
-}
-#endif
-
-#ifdef GEGL_CHANT_CLASS_INIT
-static void class_init (GeglOperationClass *operation_class);
-#endif
-
static void create_matrix (OpTransform *transform,
GeglMatrix3 *matrix);
@@ -269,31 +184,15 @@ gegl_chant_class_init (ChantClass * klass)
parent_class->create_matrix = create_matrix;
-#ifdef GEGL_CHANT_INIT
- object_class->constructor = gegl_chant_constructor;
-#endif
-#ifdef GEGL_CHANT_CLASS_INIT
- class_init (operation_class);
-#endif
-
-#if 1
#define M_GEGL_CHANT_SET_NAME_EXTENDED(nam) \
operation_class->name=g_strdup("gegl:"#nam);
#define M_GEGL_CHANT_SET_NAME(name) M_GEGL_CHANT_SET_NAME_EXTENDED(name)
M_GEGL_CHANT_SET_NAME (GEGL_CHANT_NAME);
-#endif
#ifdef GEGL_CHANT_DESCRIPTION
gegl_operation_class_set_key (operation_class, "description", GEGL_CHANT_DESCRIPTION);
#endif
-#define gegl_chant_int(name, min, max, def, blurb) \
- g_object_class_install_property (object_class, PROP_##name,\
- g_param_spec_int (#name, #name, blurb,\
- min, max, def,\
- G_PARAM_READWRITE |\
- G_PARAM_CONSTRUCT |\
- GEGL_PARAM_PAD_INPUT));
#define gegl_chant_double(name, min, max, def, blurb) \
g_object_class_install_property (object_class, PROP_##name,\
g_param_spec_double (#name, #name, blurb,\
@@ -301,20 +200,6 @@ gegl_chant_class_init (ChantClass * klass)
G_PARAM_READWRITE |\
G_PARAM_CONSTRUCT |\
GEGL_PARAM_PAD_INPUT));
-#define gegl_chant_float(name, min, max, def, blurb) \
- g_object_class_install_property (object_class, PROP_##name,\
- g_param_spec_float (#name, #name, blurb,\
- min, max, def,\
- G_PARAM_READWRITE |\
- G_PARAM_CONSTRUCT |\
- GEGL_PARAM_PAD_INPUT));
-#define gegl_chant_boolean(name, def, blurb) \
- g_object_class_install_property (object_class, PROP_##name,\
- g_param_spec_boolean (#name, #name, blurb,\
- def,\
- G_PARAM_READWRITE |\
- G_PARAM_CONSTRUCT |\
- GEGL_PARAM_PAD_INPUT));
#define gegl_chant_string(name, def, blurb) \
g_object_class_install_property (object_class, PROP_##name,\
g_param_spec_string (#name, #name, blurb,\
@@ -322,28 +207,10 @@ gegl_chant_class_init (ChantClass * klass)
G_PARAM_READWRITE |\
G_PARAM_CONSTRUCT |\
GEGL_PARAM_PAD_INPUT));
-#define gegl_chant_object(name, blurb) \
- g_object_class_install_property (object_class, PROP_##name,\
- g_param_spec_object (#name, #name, blurb,\
- G_TYPE_OBJECT,\
- G_PARAM_READWRITE |\
- G_PARAM_CONSTRUCT |\
- GEGL_PARAM_PAD_INPUT));
-#define gegl_chant_pointer(name, blurb) \
- g_object_class_install_property (object_class, PROP_##name,\
- g_param_spec_pointer (#name, #name, blurb,\
- G_PARAM_READWRITE |\
- G_PARAM_CONSTRUCT |\
- GEGL_PARAM_PAD_INPUT));
#include GEGL_CHANT_SELF
-#undef gegl_chant_int
#undef gegl_chant_double
-#undef gegl_chant_float
-#undef gegl_chant_boolean
#undef gegl_chant_string
-#undef gegl_chant_object
-#undef gegl_chant_pointer
}
/****************************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]