[gegl] gegl-op, operations: get rid of gegl_ prefix for enum declaration
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl-op, operations: get rid of gegl_ prefix for enum declaration
- Date: Tue, 20 May 2014 12:51:32 +0000 (UTC)
commit ab600797806137949ee6acbdc5e25c0f7331d870
Author: Øyvind Kolås <pippin gimp org>
Date: Tue May 20 04:44:11 2014 +0200
gegl-op, operations: get rid of gegl_ prefix for enum declaration
gegl/gegl-op.h | 30 ++++++++++++------------
operations/common/emboss.c | 42 +++++++++++++++++-----------------
operations/common/fractal-explorer.c | 32 +++++++++++++-------------
operations/common/gaussian-blur.c | 10 ++++----
operations/common/mosaic.c | 12 +++++-----
operations/common/pixelize.c | 10 ++++----
operations/common/ripple.c | 8 +++---
operations/common/shift.c | 8 +++---
operations/common/texturize-canvas.c | 12 +++++-----
operations/common/vignette.c | 10 ++++----
10 files changed, 87 insertions(+), 87 deletions(-)
---
diff --git a/gegl/gegl-op.h b/gegl/gegl-op.h
index 5571b29..c68845c 100644
--- a/gegl/gegl-op.h
+++ b/gegl/gegl-op.h
@@ -268,17 +268,17 @@ gegl_module_register (GTypeModule *module)
#define gegl_property_seed(name, label, rand_name, ...) ITEM(name,label,def_val,int)
#define gegl_property_enum(name, label, enm, enum_name, ...) ITEM(name,label,def_val,enum)
-#define gegl_enum_start(enum_name) typedef enum {
-#define gegl_enum_value(value, nick) value ,
-#define gegl_enum_end(enum) } enum ;
+#define enum_start(enum_name) typedef enum {
+#define enum_value(value, nick) value ,
+#define enum_end(enum) } enum ;
#include GEGL_OP_C_FILE
-#undef gegl_enum_start
-#undef gegl_enum_value
-#undef gegl_enum_end
+#undef enum_start
+#undef enum_value
+#undef enum_end
-#define gegl_enum_start(enum_name) \
+#define enum_start(enum_name) \
GType enum_name ## _get_type (void) G_GNUC_CONST; \
GType enum_name ## _get_type (void) \
{ \
@@ -286,10 +286,10 @@ GType enum_name ## _get_type (void) \
if (etype == 0) { \
static const GEnumValue values[] = {
-#define gegl_enum_value(value, nick) \
+#define enum_value(value, nick) \
{ value, nick, nick },
-#define gegl_enum_end(enum) \
+#define enum_end(enum) \
{ 0, NULL, NULL } \
}; \
etype = g_enum_register_static (#enum, values); \
@@ -325,12 +325,12 @@ GType enum_name ## _get_type (void) \
#undef gegl_property_curve
#undef gegl_property_seed
#undef gegl_property_path
-#undef gegl_enum_start
-#undef gegl_enum_value
-#undef gegl_enum_end
-#define gegl_enum_start(enum_name)
-#define gegl_enum_value(value, nick)
-#define gegl_enum_end(enum)
+#undef enum_start
+#undef enum_value
+#undef enum_end
+#define enum_start(enum_name)
+#define enum_value(value, nick)
+#define enum_end(enum)
/* Properties */
diff --git a/operations/common/emboss.c b/operations/common/emboss.c
index ae3ae44..02ccdac 100644
--- a/operations/common/emboss.c
+++ b/operations/common/emboss.c
@@ -22,28 +22,28 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_emboss_type)
- gegl_enum_value (GEGL_EMBOSS_TYPE_EMBOSS, "Emboss")
- gegl_enum_value (GEGL_EMBOSS_TYPE_BUMPMAP, "Bumpmap (preserve original colors)")
-gegl_enum_end (GeglEmbossType)
-
-gegl_property_enum (type, _("Emboss Type"),
- GeglEmbossType, gegl_emboss_type,
- "description" , _("Rendering type"),
- "default", GEGL_EMBOSS_TYPE_EMBOSS,
- NULL)
-gegl_property_double (azimuth, _("Azimuth"),
- "description", _("Light angle (degrees)"),
- "min" , 0.0, "max", 360.0, "default", 30.0,
- NULL)
-gegl_property_double (elevation, _("Elevation"),
- "description", _("Elevation angle (degrees)"),
- "default", 45.0, "min", 0.0, "max", 180.0,
- NULL)
-gegl_property_int (depth, _("Depth"),
- "description", _("Filter width"),
- "default", 20, "min", 1, "max", 100,
- NULL)
+enum_start (gegl_emboss_type)
+ enum_value (GEGL_EMBOSS_TYPE_EMBOSS, "Emboss")
+ enum_value (GEGL_EMBOSS_TYPE_BUMPMAP, "Bumpmap (preserve original colors)")
+enum_end (GeglEmbossType)
+
+property_enum (type, _("Emboss Type"),
+ GeglEmbossType, gegl_emboss_type, GEGL_EMBOSS_TYPE_EMBOSS)
+ description(_("Rendering type"))
+
+property_double (azimuth, _("Azimuth"), 30.0)
+ description (_("Light angle (degrees)"))
+ value_range (0, 360)
+ ui_meta ("unit", "degree")
+
+property_double (elevation, _("Elevation"), 45.0)
+ description (_("Elevation angle (degrees)"))
+ value_range (0, 180)
+ ui_meta ("unit", "degree")
+
+property_int (depth, _("Depth"), 20)
+ description (_("Filter width"))
+ value_range (1, 100)
#else
diff --git a/operations/common/fractal-explorer.c b/operations/common/fractal-explorer.c
index 6116703..bda6548 100644
--- a/operations/common/fractal-explorer.c
+++ b/operations/common/fractal-explorer.c
@@ -27,17 +27,17 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_fractal_explorer_type)
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_MANDELBROT, "Mandelbrot")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_JULIA, "Julia")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_BARNSLEY_1, "Barnsley 1")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_BARNSLEY_2, "Barnsley 2")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_BARNSLEY_3, "Barnsley 3")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_SPIDER, "Spider")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_MAN_O_WAR, "Man O War")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_LAMBDA, "Lambda")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_TYPE_SIERPINSKI, "Sierpinski")
-gegl_enum_end (GeglFractalExplorerType)
+enum_start (gegl_fractal_explorer_type)
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_MANDELBROT, "Mandelbrot")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_JULIA, "Julia")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_BARNSLEY_1, "Barnsley 1")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_BARNSLEY_2, "Barnsley 2")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_BARNSLEY_3, "Barnsley 3")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_SPIDER, "Spider")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_MAN_O_WAR, "Man O War")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_LAMBDA, "Lambda")
+ enum_value (GEGL_FRACTAL_EXPLORER_TYPE_SIERPINSKI, "Sierpinski")
+enum_end (GeglFractalExplorerType)
gegl_property_enum (fractaltype, _("Fractal type"),
GeglFractalExplorerType, gegl_fractal_explorer_type,
@@ -82,11 +82,11 @@ gegl_property_double (bluestretch, _("Blue stretch"),
"default", 1.0, "min", 0.0, "max", 1.0,
NULL)
-gegl_enum_start (gegl_fractal_explorer_mode)
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_MODE_SIN , "Sine")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_MODE_COS , "Cosinus")
- gegl_enum_value (GEGL_FRACTAL_EXPLORER_MODE_NONE, "None")
-gegl_enum_end (GeglFractalExplorerMode)
+enum_start (gegl_fractal_explorer_mode)
+ enum_value (GEGL_FRACTAL_EXPLORER_MODE_SIN , "Sine")
+ enum_value (GEGL_FRACTAL_EXPLORER_MODE_COS , "Cosinus")
+ enum_value (GEGL_FRACTAL_EXPLORER_MODE_NONE, "None")
+enum_end (GeglFractalExplorerMode)
gegl_property_enum (redmode, _("Red mode"),
GeglFractalExplorerMode, gegl_fractal_explorer_mode,
diff --git a/operations/common/gaussian-blur.c b/operations/common/gaussian-blur.c
index 9c95a12..65e1476 100644
--- a/operations/common/gaussian-blur.c
+++ b/operations/common/gaussian-blur.c
@@ -27,11 +27,11 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_gaussian_blur_filter)
- gegl_enum_value (GEGL_GAUSSIAN_BLUR_FILTER_AUTO, "Auto")
- gegl_enum_value (GEGL_GAUSSIAN_BLUR_FILTER_FIR, "FIR")
- gegl_enum_value (GEGL_GAUSSIAN_BLUR_FILTER_IIR, "IIR")
-gegl_enum_end (GeglGaussianBlurFilter)
+enum_start (gegl_gaussian_blur_filter)
+ enum_value (GEGL_GAUSSIAN_BLUR_FILTER_AUTO, "Auto")
+ enum_value (GEGL_GAUSSIAN_BLUR_FILTER_FIR, "FIR")
+ enum_value (GEGL_GAUSSIAN_BLUR_FILTER_IIR, "IIR")
+enum_end (GeglGaussianBlurFilter)
gegl_property_double (std_dev_x, _("Size X"),
"description", _("Standard deviation for the horizontal axis (multiply by ~2 to get radius)"),
diff --git a/operations/common/mosaic.c b/operations/common/mosaic.c
index 2cce5b1..25e68a6 100644
--- a/operations/common/mosaic.c
+++ b/operations/common/mosaic.c
@@ -28,12 +28,12 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_mosaic_tile)
- gegl_enum_value (GEGL_MOSAIC_TILE_SQUARES, "SQUARES")
- gegl_enum_value (GEGL_MOSAIC_TILE_HEXAGONS, "HEXAGONS")
- gegl_enum_value (GEGL_MOSAIC_TILE_OCTAGONS, "OCTAGONS")
- gegl_enum_value (GEGL_MOSAIC_TILE_TRIANGLES, "TRIANGLES")
-gegl_enum_end (GeglMosaicTile)
+enum_start (gegl_mosaic_tile)
+ enum_value (GEGL_MOSAIC_TILE_SQUARES, "SQUARES")
+ enum_value (GEGL_MOSAIC_TILE_HEXAGONS, "HEXAGONS")
+ enum_value (GEGL_MOSAIC_TILE_OCTAGONS, "OCTAGONS")
+ enum_value (GEGL_MOSAIC_TILE_TRIANGLES, "TRIANGLES")
+enum_end (GeglMosaicTile)
gegl_property_enum (tile_type, _("Tile geometry"),
GeglMosaicTile, gegl_mosaic_tile,
diff --git a/operations/common/pixelize.c b/operations/common/pixelize.c
index e5f3eca..098dabf 100644
--- a/operations/common/pixelize.c
+++ b/operations/common/pixelize.c
@@ -23,11 +23,11 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_pixelize_norm)
- gegl_enum_value (GEGL_PIXELIZE_NORM_MANHATTAN, "Diamond")
- gegl_enum_value (GEGL_PIXELIZE_NORM_EUCLIDEAN, "Round")
- gegl_enum_value (GEGL_PIXELIZE_NORM_INFINITY, "Square")
-gegl_enum_end (GeglPixelizeNorm)
+enum_start (gegl_pixelize_norm)
+ enum_value (GEGL_PIXELIZE_NORM_MANHATTAN, "Diamond")
+ enum_value (GEGL_PIXELIZE_NORM_EUCLIDEAN, "Round")
+ enum_value (GEGL_PIXELIZE_NORM_INFINITY, "Square")
+enum_end (GeglPixelizeNorm)
gegl_property_enum (norm, _("Shape"),
GeglPixelizeNorm, gegl_pixelize_norm,
diff --git a/operations/common/ripple.c b/operations/common/ripple.c
index bbb7426..97c8df6 100644
--- a/operations/common/ripple.c
+++ b/operations/common/ripple.c
@@ -24,10 +24,10 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_ripple_wave_type)
- gegl_enum_value (GEGL_RIPPLE_WAVE_TYPE_SINE, "Sine")
- gegl_enum_value (GEGL_RIPPLE_WAVE_TYPE_SAWTOOTH, "Sawtooth")
-gegl_enum_end (GeglRippleWaveType)
+enum_start (gegl_ripple_wave_type)
+ enum_value (GEGL_RIPPLE_WAVE_TYPE_SINE, "Sine")
+ enum_value (GEGL_RIPPLE_WAVE_TYPE_SAWTOOTH, "Sawtooth")
+enum_end (GeglRippleWaveType)
gegl_property_double (amplitude, _("Amplitude"),
"default", 25.0, "min", 0.0, "max", 1000.0,
diff --git a/operations/common/shift.c b/operations/common/shift.c
index ba50d9f..eedd6fa 100644
--- a/operations/common/shift.c
+++ b/operations/common/shift.c
@@ -23,10 +23,10 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_shift_direction)
- gegl_enum_value (GEGL_SHIFT_DIRECTION_HORIZONTAL, "Horizontal")
- gegl_enum_value (GEGL_SHIFT_DIRECTION_VERTICAL, "Vertical")
-gegl_enum_end (GeglShiftDirection)
+enum_start (gegl_shift_direction)
+ enum_value (GEGL_SHIFT_DIRECTION_HORIZONTAL, "Horizontal")
+ enum_value (GEGL_SHIFT_DIRECTION_VERTICAL, "Vertical")
+enum_end (GeglShiftDirection)
gegl_property_int (shift, _("Shift"),
"description", _("Maximum amount to shift"),
diff --git a/operations/common/texturize-canvas.c b/operations/common/texturize-canvas.c
index ad4bb2a..be92e96 100644
--- a/operations/common/texturize-canvas.c
+++ b/operations/common/texturize-canvas.c
@@ -24,12 +24,12 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_texturize_canvas_direction)
- gegl_enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_TOP_RIGHT, "Top-right")
- gegl_enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_TOP_LEFT, "Top-left")
- gegl_enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_BOTTOM_LEFT, "Bottom-left")
- gegl_enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_BOTTOM_RIGHT, "Bottom-right")
-gegl_enum_end (GeglTexturizeCanvasDirection)
+enum_start (gegl_texturize_canvas_direction)
+ enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_TOP_RIGHT, "Top-right")
+ enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_TOP_LEFT, "Top-left")
+ enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_BOTTOM_LEFT, "Bottom-left")
+ enum_value (GEGL_TEXTURIZE_CANVAS_DIRECTION_BOTTOM_RIGHT, "Bottom-right")
+enum_end (GeglTexturizeCanvasDirection)
gegl_property_enum (direction, _("Direction"),
GeglTexturizeCanvasDirection, gegl_texturize_canvas_direction,
diff --git a/operations/common/vignette.c b/operations/common/vignette.c
index a873287..1bc3c8e 100644
--- a/operations/common/vignette.c
+++ b/operations/common/vignette.c
@@ -21,11 +21,11 @@
#ifdef GEGL_PROPERTIES
-gegl_enum_start (gegl_vignette_shape)
- gegl_enum_value (GEGL_VIGNETTE_SHAPE_CIRCLE, "Circle")
- gegl_enum_value (GEGL_VIGNETTE_SHAPE_SQUARE, "Square")
- gegl_enum_value (GEGL_VIGNETTE_SHAPE_DIAMOND, "Diamond")
-gegl_enum_end (GeglVignetteShape)
+enum_start (gegl_vignette_shape)
+ enum_value (GEGL_VIGNETTE_SHAPE_CIRCLE, "Circle")
+ enum_value (GEGL_VIGNETTE_SHAPE_SQUARE, "Square")
+ enum_value (GEGL_VIGNETTE_SHAPE_DIAMOND, "Diamond")
+enum_end (GeglVignetteShape)
gegl_property_enum (shape, _("Vignette shape"),
GeglVignetteShape, gegl_vignette_shape,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]