[gimp] app, libgimp*, pdb: move more enums from app/core to libgimpbase
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, libgimp*, pdb: move more enums from app/core to libgimpbase
- Date: Tue, 13 May 2014 22:08:12 +0000 (UTC)
commit 6c7fae9e118d1d6915e90f9681bbd54deb218c5d
Author: Michael Natterer <mitch gimp org>
Date: Wed May 14 00:06:01 2014 +0200
app, libgimp*, pdb: move more enums from app/core to libgimpbase
app/core/core-enums.c | 72 -----------------------------------------
app/core/core-enums.h | 30 -----------------
libgimp/gimp.def | 2 -
libgimp/gimpenums.h | 30 -----------------
libgimpbase/gimpbase.def | 2 +
libgimpbase/gimpbaseenums.c | 74 +++++++++++++++++++++++++++++++++++++++++++
libgimpbase/gimpbaseenums.h | 30 +++++++++++++++++
tools/pdbgen/enums.pl | 52 +++++++++++++++---------------
8 files changed, 132 insertions(+), 160 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index 507bf9a..65c8ff2 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -106,39 +106,6 @@ gimp_convert_dither_type_get_type (void)
}
GType
-gimp_convert_palette_type_get_type (void)
-{
- static const GEnumValue values[] =
- {
- { GIMP_MAKE_PALETTE, "GIMP_MAKE_PALETTE", "make-palette" },
- { GIMP_WEB_PALETTE, "GIMP_WEB_PALETTE", "web-palette" },
- { GIMP_MONO_PALETTE, "GIMP_MONO_PALETTE", "mono-palette" },
- { GIMP_CUSTOM_PALETTE, "GIMP_CUSTOM_PALETTE", "custom-palette" },
- { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] =
- {
- { GIMP_MAKE_PALETTE, NC_("convert-palette-type", "Generate optimum palette"), NULL },
- { GIMP_WEB_PALETTE, NC_("convert-palette-type", "Use web-optimized palette"), NULL },
- { GIMP_MONO_PALETTE, NC_("convert-palette-type", "Use black and white (1-bit) palette"), NULL },
- { GIMP_CUSTOM_PALETTE, NC_("convert-palette-type", "Use custom palette"), NULL },
- { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpConvertPaletteType", values);
- gimp_type_set_translation_context (type, "convert-palette-type");
- gimp_enum_set_value_descriptions (type, descs);
- }
-
- return type;
-}
-
-GType
gimp_convolution_type_get_type (void)
{
static const GEnumValue values[] =
@@ -281,45 +248,6 @@ gimp_histogram_channel_get_type (void)
}
GType
-gimp_hue_range_get_type (void)
-{
- static const GEnumValue values[] =
- {
- { GIMP_ALL_HUES, "GIMP_ALL_HUES", "all-hues" },
- { GIMP_RED_HUES, "GIMP_RED_HUES", "red-hues" },
- { GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", "yellow-hues" },
- { GIMP_GREEN_HUES, "GIMP_GREEN_HUES", "green-hues" },
- { GIMP_CYAN_HUES, "GIMP_CYAN_HUES", "cyan-hues" },
- { GIMP_BLUE_HUES, "GIMP_BLUE_HUES", "blue-hues" },
- { GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", "magenta-hues" },
- { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] =
- {
- { GIMP_ALL_HUES, "GIMP_ALL_HUES", NULL },
- { GIMP_RED_HUES, "GIMP_RED_HUES", NULL },
- { GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", NULL },
- { GIMP_GREEN_HUES, "GIMP_GREEN_HUES", NULL },
- { GIMP_CYAN_HUES, "GIMP_CYAN_HUES", NULL },
- { GIMP_BLUE_HUES, "GIMP_BLUE_HUES", NULL },
- { GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", NULL },
- { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpHueRange", values);
- gimp_type_set_translation_context (type, "hue-range");
- gimp_enum_set_value_descriptions (type, descs);
- }
-
- return type;
-}
-
-GType
gimp_layer_mode_effects_get_type (void)
{
static const GEnumValue values[] =
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 50e8005..a6cbc3b 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -76,20 +76,6 @@ typedef enum
} GimpConvertDitherType;
-#define GIMP_TYPE_CONVERT_PALETTE_TYPE (gimp_convert_palette_type_get_type ())
-
-GType gimp_convert_palette_type_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
- GIMP_MAKE_PALETTE, /*< desc="Generate optimum palette" >*/
- GIMP_REUSE_PALETTE, /*< skip >*/
- GIMP_WEB_PALETTE, /*< desc="Use web-optimized palette" >*/
- GIMP_MONO_PALETTE, /*< desc="Use black and white (1-bit) palette" >*/
- GIMP_CUSTOM_PALETTE /*< desc="Use custom palette" >*/
-} GimpConvertPaletteType;
-
-
#define GIMP_TYPE_CONVOLUTION_TYPE (gimp_convolution_type_get_type ())
GType gimp_convolution_type_get_type (void) G_GNUC_CONST;
@@ -147,22 +133,6 @@ typedef enum
} GimpHistogramChannel;
-#define GIMP_TYPE_HUE_RANGE (gimp_hue_range_get_type ())
-
-GType gimp_hue_range_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
- GIMP_ALL_HUES,
- GIMP_RED_HUES,
- GIMP_YELLOW_HUES,
- GIMP_GREEN_HUES,
- GIMP_CYAN_HUES,
- GIMP_BLUE_HUES,
- GIMP_MAGENTA_HUES
-} GimpHueRange;
-
-
#define GIMP_TYPE_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ())
GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST;
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index d7c0d24..111f76e 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -144,7 +144,6 @@ EXPORTS
gimp_context_set_transform_resize
gimp_context_swap_colors
gimp_convert_dither_type_get_type
- gimp_convert_palette_type_get_type
gimp_convolve
gimp_convolve_default
gimp_curves_explicit
@@ -361,7 +360,6 @@ EXPORTS
gimp_help
gimp_histogram
gimp_histogram_channel_get_type
- gimp_hue_range_get_type
gimp_hue_saturation
gimp_image_add_channel
gimp_image_add_hguide
diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h
index 3ce83c3..a26defa 100644
--- a/libgimp/gimpenums.h
+++ b/libgimp/gimpenums.h
@@ -48,20 +48,6 @@ typedef enum
} GimpConvertDitherType;
-#define GIMP_TYPE_CONVERT_PALETTE_TYPE (gimp_convert_palette_type_get_type ())
-
-GType gimp_convert_palette_type_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
- GIMP_MAKE_PALETTE,
- GIMP_REUSE_PALETTE,
- GIMP_WEB_PALETTE,
- GIMP_MONO_PALETTE,
- GIMP_CUSTOM_PALETTE
-} GimpConvertPaletteType;
-
-
#define GIMP_TYPE_HISTOGRAM_CHANNEL (gimp_histogram_channel_get_type ())
GType gimp_histogram_channel_get_type (void) G_GNUC_CONST;
@@ -76,22 +62,6 @@ typedef enum
} GimpHistogramChannel;
-#define GIMP_TYPE_HUE_RANGE (gimp_hue_range_get_type ())
-
-GType gimp_hue_range_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
- GIMP_ALL_HUES,
- GIMP_RED_HUES,
- GIMP_YELLOW_HUES,
- GIMP_GREEN_HUES,
- GIMP_CYAN_HUES,
- GIMP_BLUE_HUES,
- GIMP_MAGENTA_HUES
-} GimpHueRange;
-
-
#define GIMP_TYPE_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ())
GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST;
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index 96088a1..94cb4ba 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -13,6 +13,7 @@ EXPORTS
gimp_checks_get_shades
gimp_clone_type_get_type
gimp_component_type_get_type
+ gimp_convert_palette_type_get_type
gimp_convolve_type_get_type
gimp_cpu_accel_get_support
gimp_cpu_accel_set_use
@@ -44,6 +45,7 @@ EXPORTS
gimp_gradient_type_get_type
gimp_grid_style_get_type
gimp_gtkrc
+ gimp_hue_range_get_type
gimp_icon_type_get_type
gimp_image_base_type_get_type
gimp_image_type_get_type
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index 5a1afaf..64e2de6 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -357,6 +357,40 @@ gimp_component_type_get_type (void)
}
GType
+gimp_convert_palette_type_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_MAKE_PALETTE, "GIMP_MAKE_PALETTE", "make-palette" },
+ { GIMP_WEB_PALETTE, "GIMP_WEB_PALETTE", "web-palette" },
+ { GIMP_MONO_PALETTE, "GIMP_MONO_PALETTE", "mono-palette" },
+ { GIMP_CUSTOM_PALETTE, "GIMP_CUSTOM_PALETTE", "custom-palette" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_MAKE_PALETTE, NC_("convert-palette-type", "Generate optimum palette"), NULL },
+ { GIMP_WEB_PALETTE, NC_("convert-palette-type", "Use web-optimized palette"), NULL },
+ { GIMP_MONO_PALETTE, NC_("convert-palette-type", "Use black and white (1-bit) palette"), NULL },
+ { GIMP_CUSTOM_PALETTE, NC_("convert-palette-type", "Use custom palette"), NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpConvertPaletteType", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "convert-palette-type");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_convolve_type_get_type (void)
{
static const GEnumValue values[] =
@@ -667,6 +701,46 @@ gimp_grid_style_get_type (void)
}
GType
+gimp_hue_range_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_ALL_HUES, "GIMP_ALL_HUES", "all-hues" },
+ { GIMP_RED_HUES, "GIMP_RED_HUES", "red-hues" },
+ { GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", "yellow-hues" },
+ { GIMP_GREEN_HUES, "GIMP_GREEN_HUES", "green-hues" },
+ { GIMP_CYAN_HUES, "GIMP_CYAN_HUES", "cyan-hues" },
+ { GIMP_BLUE_HUES, "GIMP_BLUE_HUES", "blue-hues" },
+ { GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", "magenta-hues" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_ALL_HUES, "GIMP_ALL_HUES", NULL },
+ { GIMP_RED_HUES, "GIMP_RED_HUES", NULL },
+ { GIMP_YELLOW_HUES, "GIMP_YELLOW_HUES", NULL },
+ { GIMP_GREEN_HUES, "GIMP_GREEN_HUES", NULL },
+ { GIMP_CYAN_HUES, "GIMP_CYAN_HUES", NULL },
+ { GIMP_BLUE_HUES, "GIMP_BLUE_HUES", NULL },
+ { GIMP_MAGENTA_HUES, "GIMP_MAGENTA_HUES", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpHueRange", values);
+ gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+ gimp_type_set_translation_context (type, "hue-range");
+ gimp_enum_set_value_descriptions (type, descs);
+ }
+
+ return type;
+}
+
+GType
gimp_icon_type_get_type (void)
{
static const GEnumValue values[] =
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index 39111cc..e1060e8 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -196,6 +196,20 @@ typedef enum
} GimpComponentType;
+#define GIMP_TYPE_CONVERT_PALETTE_TYPE (gimp_convert_palette_type_get_type ())
+
+GType gimp_convert_palette_type_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_MAKE_PALETTE, /*< desc="Generate optimum palette" >*/
+ GIMP_REUSE_PALETTE, /*< skip >*/
+ GIMP_WEB_PALETTE, /*< desc="Use web-optimized palette" >*/
+ GIMP_MONO_PALETTE, /*< desc="Use black and white (1-bit) palette" >*/
+ GIMP_CUSTOM_PALETTE /*< desc="Use custom palette" >*/
+} GimpConvertPaletteType;
+
+
#define GIMP_TYPE_CONVOLVE_TYPE (gimp_convolve_type_get_type ())
GType gimp_convolve_type_get_type (void) G_GNUC_CONST;
@@ -325,6 +339,22 @@ typedef enum
} GimpGridStyle;
+#define GIMP_TYPE_HUE_RANGE (gimp_hue_range_get_type ())
+
+GType gimp_hue_range_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_ALL_HUES,
+ GIMP_RED_HUES,
+ GIMP_YELLOW_HUES,
+ GIMP_GREEN_HUES,
+ GIMP_CYAN_HUES,
+ GIMP_BLUE_HUES,
+ GIMP_MAGENTA_HUES
+} GimpHueRange;
+
+
#define GIMP_TYPE_ICON_TYPE (gimp_icon_type_get_type ())
GType gimp_icon_type_get_type (void) G_GNUC_CONST;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 9c98ef0..a8b0cfa 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -107,6 +107,18 @@ package Gimp::CodeGen::enums;
GIMP_COMPONENT_TYPE_FLOAT => '600',
GIMP_COMPONENT_TYPE_DOUBLE => '700' }
},
+ GimpConvertPaletteType =>
+ { contig => 1,
+ header => 'libgimpbase/gimpbaseenums.h',
+ symbols => [ qw(GIMP_MAKE_PALETTE GIMP_REUSE_PALETTE
+ GIMP_WEB_PALETTE GIMP_MONO_PALETTE
+ GIMP_CUSTOM_PALETTE) ],
+ mapping => { GIMP_MAKE_PALETTE => '0',
+ GIMP_REUSE_PALETTE => '1',
+ GIMP_WEB_PALETTE => '2',
+ GIMP_MONO_PALETTE => '3',
+ GIMP_CUSTOM_PALETTE => '4' }
+ },
GimpConvolveType =>
{ contig => 1,
header => 'libgimpbase/gimpbaseenums.h',
@@ -211,6 +223,20 @@ package Gimp::CodeGen::enums;
GIMP_GRID_DOUBLE_DASH => '3',
GIMP_GRID_SOLID => '4' }
},
+ GimpHueRange =>
+ { contig => 1,
+ header => 'libgimpbase/gimpbaseenums.h',
+ symbols => [ qw(GIMP_ALL_HUES GIMP_RED_HUES GIMP_YELLOW_HUES
+ GIMP_GREEN_HUES GIMP_CYAN_HUES GIMP_BLUE_HUES
+ GIMP_MAGENTA_HUES) ],
+ mapping => { GIMP_ALL_HUES => '0',
+ GIMP_RED_HUES => '1',
+ GIMP_YELLOW_HUES => '2',
+ GIMP_GREEN_HUES => '3',
+ GIMP_CYAN_HUES => '4',
+ GIMP_BLUE_HUES => '5',
+ GIMP_MAGENTA_HUES => '6' }
+ },
GimpIconType =>
{ contig => 1,
header => 'libgimpbase/gimpbaseenums.h',
@@ -586,18 +612,6 @@ package Gimp::CodeGen::enums;
GIMP_FSLOWBLEED_DITHER => '2',
GIMP_FIXED_DITHER => '3' }
},
- GimpConvertPaletteType =>
- { contig => 1,
- header => 'core/core-enums.h',
- symbols => [ qw(GIMP_MAKE_PALETTE GIMP_REUSE_PALETTE
- GIMP_WEB_PALETTE GIMP_MONO_PALETTE
- GIMP_CUSTOM_PALETTE) ],
- mapping => { GIMP_MAKE_PALETTE => '0',
- GIMP_REUSE_PALETTE => '1',
- GIMP_WEB_PALETTE => '2',
- GIMP_MONO_PALETTE => '3',
- GIMP_CUSTOM_PALETTE => '4' }
- },
GimpHistogramChannel =>
{ contig => 1,
header => 'core/core-enums.h',
@@ -610,20 +624,6 @@ package Gimp::CodeGen::enums;
GIMP_HISTOGRAM_BLUE => '3',
GIMP_HISTOGRAM_ALPHA => '4' }
},
- GimpHueRange =>
- { contig => 1,
- header => 'core/core-enums.h',
- symbols => [ qw(GIMP_ALL_HUES GIMP_RED_HUES GIMP_YELLOW_HUES
- GIMP_GREEN_HUES GIMP_CYAN_HUES GIMP_BLUE_HUES
- GIMP_MAGENTA_HUES) ],
- mapping => { GIMP_ALL_HUES => '0',
- GIMP_RED_HUES => '1',
- GIMP_YELLOW_HUES => '2',
- GIMP_GREEN_HUES => '3',
- GIMP_CYAN_HUES => '4',
- GIMP_BLUE_HUES => '5',
- GIMP_MAGENTA_HUES => '6' }
- },
GimpLayerModeEffects =>
{ contig => 1,
header => 'core/core-enums.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]