[gimp] app: move some enums from base-enums.h to core-enums.h



commit 9b70f4e7fcd30f821b4bb670fe1b50565a0d544a
Author: Michael Natterer <mitch gimp org>
Date:   Wed Apr 4 01:43:41 2012 +0200

    app: move some enums from base-enums.h to core-enums.h

 app/base/base-enums.c |  105 -------------------------------------------------
 app/base/base-enums.h |   42 -------------------
 app/core/core-enums.c |  105 +++++++++++++++++++++++++++++++++++++++++++++++++
 app/core/core-enums.h |   42 +++++++++++++++++++
 tools/pdbgen/enums.pl |   52 ++++++++++++------------
 5 files changed, 173 insertions(+), 173 deletions(-)
---
diff --git a/app/base/base-enums.c b/app/base/base-enums.c
index 418e203..1dde754 100644
--- a/app/base/base-enums.c
+++ b/app/base/base-enums.c
@@ -9,72 +9,6 @@
 
 /* enumerations from "./base-enums.h" */
 GType
-gimp_curve_type_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_CURVE_SMOOTH, "GIMP_CURVE_SMOOTH", "smooth" },
-    { GIMP_CURVE_FREE, "GIMP_CURVE_FREE", "free" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_CURVE_SMOOTH, NC_("curve-type", "Smooth"), NULL },
-    { GIMP_CURVE_FREE, NC_("curve-type", "Freehand"), NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpCurveType", values);
-      gimp_type_set_translation_context (type, "curve-type");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
-GType
-gimp_histogram_channel_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_HISTOGRAM_VALUE, "GIMP_HISTOGRAM_VALUE", "value" },
-    { GIMP_HISTOGRAM_RED, "GIMP_HISTOGRAM_RED", "red" },
-    { GIMP_HISTOGRAM_GREEN, "GIMP_HISTOGRAM_GREEN", "green" },
-    { GIMP_HISTOGRAM_BLUE, "GIMP_HISTOGRAM_BLUE", "blue" },
-    { GIMP_HISTOGRAM_ALPHA, "GIMP_HISTOGRAM_ALPHA", "alpha" },
-    { GIMP_HISTOGRAM_RGB, "GIMP_HISTOGRAM_RGB", "rgb" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_HISTOGRAM_VALUE, NC_("histogram-channel", "Value"), NULL },
-    { GIMP_HISTOGRAM_RED, NC_("histogram-channel", "Red"), NULL },
-    { GIMP_HISTOGRAM_GREEN, NC_("histogram-channel", "Green"), NULL },
-    { GIMP_HISTOGRAM_BLUE, NC_("histogram-channel", "Blue"), NULL },
-    { GIMP_HISTOGRAM_ALPHA, NC_("histogram-channel", "Alpha"), NULL },
-    { GIMP_HISTOGRAM_RGB, NC_("histogram-channel", "RGB"), NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpHistogramChannel", values);
-      gimp_type_set_translation_context (type, "histogram-channel");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
-GType
 gimp_layer_mode_effects_get_type (void)
 {
   static const GEnumValue values[] =
@@ -151,45 +85,6 @@ gimp_layer_mode_effects_get_type (void)
   return type;
 }
 
-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;
-}
-
 
 /* Generated data ends here */
 
diff --git a/app/base/base-enums.h b/app/base/base-enums.h
index cfd5ce8..6e41a24 100644
--- a/app/base/base-enums.h
+++ b/app/base/base-enums.h
@@ -34,32 +34,6 @@
  * these enums that are registered with the type system
  */
 
-#define GIMP_TYPE_CURVE_TYPE (gimp_curve_type_get_type ())
-
-GType gimp_curve_type_get_type (void) G_GNUC_CONST;
-
-typedef enum  /*< pdb-skip >*/
-{
-  GIMP_CURVE_SMOOTH,   /*< desc="Smooth"   >*/
-  GIMP_CURVE_FREE      /*< desc="Freehand" >*/
-} GimpCurveType;
-
-
-#define GIMP_TYPE_HISTOGRAM_CHANNEL (gimp_histogram_channel_get_type ())
-
-GType gimp_histogram_channel_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
-  GIMP_HISTOGRAM_VALUE = 0,  /*< desc="Value" >*/
-  GIMP_HISTOGRAM_RED   = 1,  /*< desc="Red"   >*/
-  GIMP_HISTOGRAM_GREEN = 2,  /*< desc="Green" >*/
-  GIMP_HISTOGRAM_BLUE  = 3,  /*< desc="Blue"  >*/
-  GIMP_HISTOGRAM_ALPHA = 4,  /*< desc="Alpha" >*/
-  GIMP_HISTOGRAM_RGB   = 5   /*< desc="RGB", pdb-skip >*/
-} GimpHistogramChannel;
-
-
 #define GIMP_TYPE_LAYER_MODE_EFFECTS (gimp_layer_mode_effects_get_type ())
 
 GType gimp_layer_mode_effects_get_type (void) G_GNUC_CONST;
@@ -95,22 +69,6 @@ typedef enum
 } GimpLayerModeEffects;
 
 
-#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;
-
-
 /*
  * non-registered enums; register them if needed
  */
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index cf6e9ce..70fd277 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -104,6 +104,35 @@ gimp_convert_palette_type_get_type (void)
 }
 
 GType
+gimp_curve_type_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_CURVE_SMOOTH, "GIMP_CURVE_SMOOTH", "smooth" },
+    { GIMP_CURVE_FREE, "GIMP_CURVE_FREE", "free" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_CURVE_SMOOTH, NC_("curve-type", "Smooth"), NULL },
+    { GIMP_CURVE_FREE, NC_("curve-type", "Freehand"), NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpCurveType", values);
+      gimp_type_set_translation_context (type, "curve-type");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
+GType
 gimp_gravity_type_get_type (void)
 {
   static const GEnumValue values[] =
@@ -149,6 +178,82 @@ gimp_gravity_type_get_type (void)
 }
 
 GType
+gimp_histogram_channel_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_HISTOGRAM_VALUE, "GIMP_HISTOGRAM_VALUE", "value" },
+    { GIMP_HISTOGRAM_RED, "GIMP_HISTOGRAM_RED", "red" },
+    { GIMP_HISTOGRAM_GREEN, "GIMP_HISTOGRAM_GREEN", "green" },
+    { GIMP_HISTOGRAM_BLUE, "GIMP_HISTOGRAM_BLUE", "blue" },
+    { GIMP_HISTOGRAM_ALPHA, "GIMP_HISTOGRAM_ALPHA", "alpha" },
+    { GIMP_HISTOGRAM_RGB, "GIMP_HISTOGRAM_RGB", "rgb" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_HISTOGRAM_VALUE, NC_("histogram-channel", "Value"), NULL },
+    { GIMP_HISTOGRAM_RED, NC_("histogram-channel", "Red"), NULL },
+    { GIMP_HISTOGRAM_GREEN, NC_("histogram-channel", "Green"), NULL },
+    { GIMP_HISTOGRAM_BLUE, NC_("histogram-channel", "Blue"), NULL },
+    { GIMP_HISTOGRAM_ALPHA, NC_("histogram-channel", "Alpha"), NULL },
+    { GIMP_HISTOGRAM_RGB, NC_("histogram-channel", "RGB"), NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpHistogramChannel", values);
+      gimp_type_set_translation_context (type, "histogram-channel");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
+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_alignment_type_get_type (void)
 {
   static const GEnumValue values[] =
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index e2edea3..73b323e 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -75,6 +75,17 @@ typedef enum
 } GimpConvertPaletteType;
 
 
+#define GIMP_TYPE_CURVE_TYPE (gimp_curve_type_get_type ())
+
+GType gimp_curve_type_get_type (void) G_GNUC_CONST;
+
+typedef enum  /*< pdb-skip >*/
+{
+  GIMP_CURVE_SMOOTH,   /*< desc="Smooth"   >*/
+  GIMP_CURVE_FREE      /*< desc="Freehand" >*/
+} GimpCurveType;
+
+
 #define GIMP_TYPE_GRAVITY_TYPE (gimp_gravity_type_get_type ())
 
 GType gimp_gravity_type_get_type (void) G_GNUC_CONST;
@@ -94,6 +105,37 @@ typedef enum  /*< pdb-skip >*/
 } GimpGravityType;
 
 
+#define GIMP_TYPE_HISTOGRAM_CHANNEL (gimp_histogram_channel_get_type ())
+
+GType gimp_histogram_channel_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_HISTOGRAM_VALUE = 0,  /*< desc="Value" >*/
+  GIMP_HISTOGRAM_RED   = 1,  /*< desc="Red"   >*/
+  GIMP_HISTOGRAM_GREEN = 2,  /*< desc="Green" >*/
+  GIMP_HISTOGRAM_BLUE  = 3,  /*< desc="Blue"  >*/
+  GIMP_HISTOGRAM_ALPHA = 4,  /*< desc="Alpha" >*/
+  GIMP_HISTOGRAM_RGB   = 5   /*< desc="RGB", pdb-skip >*/
+} 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_ALIGNMENT_TYPE (gimp_alignment_type_get_type ())
 
 GType gimp_alignment_type_get_type (void) G_GNUC_CONST;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 68c1fad..8e53eba 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -411,18 +411,6 @@ package Gimp::CodeGen::enums;
 	  symbols => [ qw(GIMP_VECTORS_STROKE_TYPE_BEZIER) ],
 	  mapping => { GIMP_VECTORS_STROKE_TYPE_BEZIER => '0' }
 	},
-    GimpHistogramChannel =>
-	{ contig => 1,
-	  header => 'base/base-enums.h',
-	  symbols => [ qw(GIMP_HISTOGRAM_VALUE GIMP_HISTOGRAM_RED
-			  GIMP_HISTOGRAM_GREEN GIMP_HISTOGRAM_BLUE
-			  GIMP_HISTOGRAM_ALPHA) ],
-	  mapping => { GIMP_HISTOGRAM_VALUE => '0',
-		       GIMP_HISTOGRAM_RED => '1',
-		       GIMP_HISTOGRAM_GREEN => '2',
-		       GIMP_HISTOGRAM_BLUE => '3',
-		       GIMP_HISTOGRAM_ALPHA => '4' }
-	},
     GimpLayerModeEffects =>
 	{ contig => 1,
 	  header => 'base/base-enums.h',
@@ -461,20 +449,6 @@ package Gimp::CodeGen::enums;
 		       GIMP_GRAIN_MERGE_MODE => '21',
 		       GIMP_COLOR_ERASE_MODE => '22' }
 	},
-    GimpHueRange =>
-	{ contig => 1,
-	  header => 'base/base-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' }
-	},
     GimpConvolutionType =>
 	{ contig => 1,
 	  header => 'base/base-enums.h',
@@ -506,6 +480,32 @@ package Gimp::CodeGen::enums;
 		       GIMP_MONO_PALETTE => '3',
 		       GIMP_CUSTOM_PALETTE => '4' }
 	},
+    GimpHistogramChannel =>
+	{ contig => 1,
+	  header => 'core/core-enums.h',
+	  symbols => [ qw(GIMP_HISTOGRAM_VALUE GIMP_HISTOGRAM_RED
+			  GIMP_HISTOGRAM_GREEN GIMP_HISTOGRAM_BLUE
+			  GIMP_HISTOGRAM_ALPHA) ],
+	  mapping => { GIMP_HISTOGRAM_VALUE => '0',
+		       GIMP_HISTOGRAM_RED => '1',
+		       GIMP_HISTOGRAM_GREEN => '2',
+		       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' }
+	},
     GimpFillType =>
 	{ contig => 1,
 	  header => 'core/core-enums.h',



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