[gimp] app, libgimp*: move enum GimpBucketFillMode to the core



commit 07e46abb72aa01d9af5ea6a6c5a0f96d8b80ee17
Author: Michael Natterer <mitch gimp org>
Date:   Wed Jan 2 16:07:20 2019 +0100

    app, libgimp*: move enum GimpBucketFillMode to the core
    
    The libgimp API using it is gone.

 app/core/core-enums.c       | 31 +++++++++++++++++++++++++++++++
 app/core/core-enums.h       | 20 ++++++++++++++++++++
 libgimp/gimpenums.h         | 12 ++++++++++++
 libgimpbase/gimpbase.def    |  1 -
 libgimpbase/gimpbaseenums.c | 32 --------------------------------
 libgimpbase/gimpbaseenums.h | 20 --------------------
 pdb/enums.pl                | 18 +++++++++---------
 7 files changed, 72 insertions(+), 62 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index efa7cbcfe4..90646ec1f5 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -98,6 +98,37 @@ gimp_alignment_type_get_type (void)
   return type;
 }
 
+GType
+gimp_bucket_fill_mode_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_BUCKET_FILL_FG, "GIMP_BUCKET_FILL_FG", "fg" },
+    { GIMP_BUCKET_FILL_BG, "GIMP_BUCKET_FILL_BG", "bg" },
+    { GIMP_BUCKET_FILL_PATTERN, "GIMP_BUCKET_FILL_PATTERN", "pattern" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_BUCKET_FILL_FG, NC_("bucket-fill-mode", "FG color fill"), NULL },
+    { GIMP_BUCKET_FILL_BG, NC_("bucket-fill-mode", "BG color fill"), NULL },
+    { GIMP_BUCKET_FILL_PATTERN, NC_("bucket-fill-mode", "Pattern fill"), NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpBucketFillMode", values);
+      gimp_type_set_translation_context (type, "bucket-fill-mode");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
 GType
 gimp_channel_border_style_get_type (void)
 {
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 6c153a576e..a3648b1965 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -74,6 +74,26 @@ typedef enum  /*< pdb-skip >*/
 } GimpAlignmentType;
 
 
+/**
+ * GimpBucketFillMode:
+ * @GIMP_BUCKET_FILL_FG:      FG color fill
+ * @GIMP_BUCKET_FILL_BG:      BG color fill
+ * @GIMP_BUCKET_FILL_PATTERN: Pattern fill
+ *
+ * Bucket fill modes.
+ */
+#define GIMP_TYPE_BUCKET_FILL_MODE (gimp_bucket_fill_mode_get_type ())
+
+GType gimp_bucket_fill_mode_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_BUCKET_FILL_FG,      /*< desc="FG color fill" >*/
+  GIMP_BUCKET_FILL_BG,      /*< desc="BG color fill" >*/
+  GIMP_BUCKET_FILL_PATTERN  /*< desc="Pattern fill"  >*/
+} GimpBucketFillMode;
+
+
 #define GIMP_TYPE_CHANNEL_BORDER_STYLE (gimp_channel_border_style_get_type ())
 
 GType gimp_channel_border_style_get_type (void) G_GNUC_CONST;
diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h
index 6265ee81a2..6d4ee93f72 100644
--- a/libgimp/gimpenums.h
+++ b/libgimp/gimpenums.h
@@ -35,6 +35,18 @@ typedef enum
 } GimpBrushApplicationMode;
 
 
+#define GIMP_TYPE_BUCKET_FILL_MODE (gimp_bucket_fill_mode_get_type ())
+
+GType gimp_bucket_fill_mode_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_BUCKET_FILL_FG,
+  GIMP_BUCKET_FILL_BG,
+  GIMP_BUCKET_FILL_PATTERN
+} GimpBucketFillMode;
+
+
 #define GIMP_TYPE_CONVERT_DITHER_TYPE (gimp_convert_dither_type_get_type ())
 
 GType gimp_convert_dither_type_get_type (void) G_GNUC_CONST;
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index 42aacd3156..2f6975e99f 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -5,7 +5,6 @@ EXPORTS
        gimp_base_init
        gimp_blend_mode_get_type
        gimp_brush_generated_shape_get_type
-       gimp_bucket_fill_mode_get_type
        gimp_cache_directory
        gimp_canonicalize_identifier
        gimp_cap_style_get_type
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index d7af905575..f29e9c6340 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -114,38 +114,6 @@ gimp_brush_generated_shape_get_type (void)
   return type;
 }
 
-GType
-gimp_bucket_fill_mode_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_BUCKET_FILL_FG, "GIMP_BUCKET_FILL_FG", "fg" },
-    { GIMP_BUCKET_FILL_BG, "GIMP_BUCKET_FILL_BG", "bg" },
-    { GIMP_BUCKET_FILL_PATTERN, "GIMP_BUCKET_FILL_PATTERN", "pattern" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_BUCKET_FILL_FG, NC_("bucket-fill-mode", "FG color fill"), NULL },
-    { GIMP_BUCKET_FILL_BG, NC_("bucket-fill-mode", "BG color fill"), NULL },
-    { GIMP_BUCKET_FILL_PATTERN, NC_("bucket-fill-mode", "Pattern fill"), NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpBucketFillMode", values);
-      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
-      gimp_type_set_translation_context (type, "bucket-fill-mode");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
 GType
 gimp_cap_style_get_type (void)
 {
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index 181049b20f..a4e2caf425 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -104,26 +104,6 @@ typedef enum
 } GimpBrushGeneratedShape;
 
 
-/**
- * GimpBucketFillMode:
- * @GIMP_BUCKET_FILL_FG:      FG color fill
- * @GIMP_BUCKET_FILL_BG:      BG color fill
- * @GIMP_BUCKET_FILL_PATTERN: Pattern fill
- *
- * Bucket fill modes.
- */
-#define GIMP_TYPE_BUCKET_FILL_MODE (gimp_bucket_fill_mode_get_type ())
-
-GType gimp_bucket_fill_mode_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
-  GIMP_BUCKET_FILL_FG,      /*< desc="FG color fill" >*/
-  GIMP_BUCKET_FILL_BG,      /*< desc="BG color fill" >*/
-  GIMP_BUCKET_FILL_PATTERN  /*< desc="Pattern fill"  >*/
-} GimpBucketFillMode;
-
-
 /**
  * GimpCapStyle:
  * @GIMP_CAP_BUTT:   Butt
diff --git a/pdb/enums.pl b/pdb/enums.pl
index 06dfd46571..c2ef8e46bb 100644
--- a/pdb/enums.pl
+++ b/pdb/enums.pl
@@ -64,15 +64,6 @@ package Gimp::CodeGen::enums;
                       GIMP_BRUSH_GENERATED_SQUARE => '1',
                       GIMP_BRUSH_GENERATED_DIAMOND => '2' }
        },
-    GimpBucketFillMode =>
-       { contig => 1,
-         header => 'libgimpbase/gimpbaseenums.h',
-         symbols => [ qw(GIMP_BUCKET_FILL_FG GIMP_BUCKET_FILL_BG
-                         GIMP_BUCKET_FILL_PATTERN) ],
-         mapping => { GIMP_BUCKET_FILL_FG => '0',
-                      GIMP_BUCKET_FILL_BG => '1',
-                      GIMP_BUCKET_FILL_PATTERN => '2' }
-       },
     GimpCapStyle =>
        { contig => 1,
          header => 'libgimpbase/gimpbaseenums.h',
@@ -852,6 +843,15 @@ package Gimp::CodeGen::enums;
                       GIMP_LAYER_MODE_SPLIT => '60',
                       GIMP_LAYER_MODE_PASS_THROUGH => '61' }
        },
+    GimpBucketFillMode =>
+       { contig => 1,
+         header => 'core/core-enums.h',
+         symbols => [ qw(GIMP_BUCKET_FILL_FG GIMP_BUCKET_FILL_BG
+                         GIMP_BUCKET_FILL_PATTERN) ],
+         mapping => { GIMP_BUCKET_FILL_FG => '0',
+                      GIMP_BUCKET_FILL_BG => '1',
+                      GIMP_BUCKET_FILL_PATTERN => '2' }
+       },
     GimpConvertDitherType =>
        { contig => 1,
          header => 'core/core-enums.h',


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