[gimp] app, libgimpbase: move enums GimpCapStyle and GimpJoinStyle to libgimpbase



commit 9bcbfb96b15072cc45e80091aa7f62e33dff3299
Author: Michael Natterer <mitch gimp org>
Date:   Mon Nov 9 02:16:03 2015 +0100

    app, libgimpbase: move enums GimpCapStyle and GimpJoinStyle to libgimpbase

 app/core/core-enums.c       |   62 -----------------------------------------
 app/core/core-enums.h       |   24 ----------------
 libgimp/gimpenums.c.tail    |    4 +++
 libgimpbase/gimpbase.def    |    4 ++-
 libgimpbase/gimpbaseenums.c |   64 +++++++++++++++++++++++++++++++++++++++++++
 libgimpbase/gimpbaseenums.h |   24 ++++++++++++++++
 tools/pdbgen/enums.pl       |   16 +++++++++++
 7 files changed, 111 insertions(+), 87 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index ab7df51..9278167 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -483,68 +483,6 @@ gimp_fill_style_get_type (void)
 }
 
 GType
-gimp_join_style_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_JOIN_MITER, "GIMP_JOIN_MITER", "miter" },
-    { GIMP_JOIN_ROUND, "GIMP_JOIN_ROUND", "round" },
-    { GIMP_JOIN_BEVEL, "GIMP_JOIN_BEVEL", "bevel" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_JOIN_MITER, NC_("join-style", "Miter"), NULL },
-    { GIMP_JOIN_ROUND, NC_("join-style", "Round"), NULL },
-    { GIMP_JOIN_BEVEL, NC_("join-style", "Bevel"), NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpJoinStyle", values);
-      gimp_type_set_translation_context (type, "join-style");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
-GType
-gimp_cap_style_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_CAP_BUTT, "GIMP_CAP_BUTT", "butt" },
-    { GIMP_CAP_ROUND, "GIMP_CAP_ROUND", "round" },
-    { GIMP_CAP_SQUARE, "GIMP_CAP_SQUARE", "square" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_CAP_BUTT, NC_("cap-style", "Butt"), NULL },
-    { GIMP_CAP_ROUND, NC_("cap-style", "Round"), NULL },
-    { GIMP_CAP_SQUARE, NC_("cap-style", "Square"), NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpCapStyle", values);
-      gimp_type_set_translation_context (type, "cap-style");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
-GType
 gimp_dash_preset_get_type (void)
 {
   static const GEnumValue values[] =
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 839a206..9ee7867 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -235,30 +235,6 @@ typedef enum  /*< pdb-skip >*/
 } GimpFillStyle;
 
 
-#define GIMP_TYPE_JOIN_STYLE (gimp_join_style_get_type ())
-
-GType gimp_join_style_get_type (void) G_GNUC_CONST;
-
-typedef enum  /*< pdb-skip >*/
-{
-  GIMP_JOIN_MITER,  /*< desc="Miter" >*/
-  GIMP_JOIN_ROUND,  /*< desc="Round" >*/
-  GIMP_JOIN_BEVEL   /*< desc="Bevel" >*/
-} GimpJoinStyle;
-
-
-#define GIMP_TYPE_CAP_STYLE (gimp_cap_style_get_type ())
-
-GType gimp_cap_style_get_type (void) G_GNUC_CONST;
-
-typedef enum  /*< pdb-skip >*/
-{
-  GIMP_CAP_BUTT,   /*< desc="Butt"   >*/
-  GIMP_CAP_ROUND,  /*< desc="Round"  >*/
-  GIMP_CAP_SQUARE  /*< desc="Square" >*/
-} GimpCapStyle;
-
-
 #define GIMP_TYPE_DASH_PRESET (gimp_dash_preset_get_type ())
 
 GType gimp_dash_preset_get_type (void) G_GNUC_CONST;
diff --git a/libgimp/gimpenums.c.tail b/libgimp/gimpenums.c.tail
index 70062eb..3e1f465 100644
--- a/libgimp/gimpenums.c.tail
+++ b/libgimp/gimpenums.c.tail
@@ -8,6 +8,7 @@ static const GimpGetTypeFunc get_type_funcs[] =
   gimp_brush_application_mode_get_type,
   gimp_brush_generated_shape_get_type,
   gimp_bucket_fill_mode_get_type,
+  gimp_cap_style_get_type,
   gimp_channel_ops_get_type,
   gimp_channel_type_get_type,
   gimp_clone_type_get_type,
@@ -32,6 +33,7 @@ static const GimpGetTypeFunc get_type_funcs[] =
   gimp_image_type_get_type,
   gimp_ink_blob_type_get_type,
   gimp_interpolation_type_get_type,
+  gimp_join_style_get_type,
   gimp_layer_mode_effects_get_type,
   gimp_mask_apply_mode_get_type,
   gimp_merge_type_get_type,
@@ -69,6 +71,7 @@ static const gchar * const type_names[] =
   "GimpBrushApplicationMode",
   "GimpBrushGeneratedShape",
   "GimpBucketFillMode",
+  "GimpCapStyle",
   "GimpChannelOps",
   "GimpChannelType",
   "GimpCloneType",
@@ -93,6 +96,7 @@ static const gchar * const type_names[] =
   "GimpImageType",
   "GimpInkBlobType",
   "GimpInterpolationType",
+  "GimpJoinStyle",
   "GimpLayerModeEffects",
   "GimpMaskApplyMode",
   "GimpMergeType",
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index 8b2a530..033dda4 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -6,6 +6,7 @@ EXPORTS
        gimp_brush_generated_shape_get_type
        gimp_bucket_fill_mode_get_type
        gimp_canonicalize_identifier
+       gimp_cap_style_get_type
        gimp_channel_ops_get_type
        gimp_channel_type_get_type
        gimp_check_size_get_type
@@ -57,6 +58,7 @@ EXPORTS
        gimp_ink_blob_type_get_type
        gimp_installation_directory
        gimp_interpolation_type_get_type
+       gimp_join_style_get_type
        gimp_locale_directory
        gimp_locale_directory_file
        gimp_major_version
@@ -134,8 +136,8 @@ EXPORTS
        gimp_signal_private
        gimp_size_type_get_type
        gimp_stack_trace_mode_get_type
-       gimp_stroke_method_get_type
        gimp_strip_uline
+       gimp_stroke_method_get_type
        gimp_sysconf_directory
        gimp_sysconf_directory_file
        gimp_text_direction_get_type
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index a7ddada..7850fee 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -147,6 +147,38 @@ gimp_bucket_fill_mode_get_type (void)
 }
 
 GType
+gimp_cap_style_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_CAP_BUTT, "GIMP_CAP_BUTT", "butt" },
+    { GIMP_CAP_ROUND, "GIMP_CAP_ROUND", "round" },
+    { GIMP_CAP_SQUARE, "GIMP_CAP_SQUARE", "square" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_CAP_BUTT, NC_("cap-style", "Butt"), NULL },
+    { GIMP_CAP_ROUND, NC_("cap-style", "Round"), NULL },
+    { GIMP_CAP_SQUARE, NC_("cap-style", "Square"), NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpCapStyle", values);
+      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "cap-style");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
+GType
 gimp_channel_ops_get_type (void)
 {
   static const GEnumValue values[] =
@@ -913,6 +945,38 @@ gimp_interpolation_type_get_type (void)
 }
 
 GType
+gimp_join_style_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_JOIN_MITER, "GIMP_JOIN_MITER", "miter" },
+    { GIMP_JOIN_ROUND, "GIMP_JOIN_ROUND", "round" },
+    { GIMP_JOIN_BEVEL, "GIMP_JOIN_BEVEL", "bevel" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_JOIN_MITER, NC_("join-style", "Miter"), NULL },
+    { GIMP_JOIN_ROUND, NC_("join-style", "Round"), NULL },
+    { GIMP_JOIN_BEVEL, NC_("join-style", "Bevel"), NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpJoinStyle", values);
+      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "join-style");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
+GType
 gimp_mask_apply_mode_get_type (void)
 {
   static const GEnumValue values[] =
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index d4e1bdb..dc7cff1 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -110,6 +110,18 @@ typedef enum
 } GimpBucketFillMode;
 
 
+#define GIMP_TYPE_CAP_STYLE (gimp_cap_style_get_type ())
+
+GType gimp_cap_style_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_CAP_BUTT,   /*< desc="Butt"   >*/
+  GIMP_CAP_ROUND,  /*< desc="Round"  >*/
+  GIMP_CAP_SQUARE  /*< desc="Square" >*/
+} GimpCapStyle;
+
+
 #define GIMP_TYPE_CHANNEL_OPS (gimp_channel_ops_get_type ())
 
 GType gimp_channel_ops_get_type (void) G_GNUC_CONST;
@@ -441,6 +453,18 @@ typedef enum
 } GimpInterpolationType;
 
 
+#define GIMP_TYPE_JOIN_STYLE (gimp_join_style_get_type ())
+
+GType gimp_join_style_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_JOIN_MITER,  /*< desc="Miter" >*/
+  GIMP_JOIN_ROUND,  /*< desc="Round" >*/
+  GIMP_JOIN_BEVEL   /*< desc="Bevel" >*/
+} GimpJoinStyle;
+
+
 #define GIMP_TYPE_MASK_APPLY_MODE (gimp_mask_apply_mode_get_type ())
 
 GType gimp_mask_apply_mode_get_type (void) G_GNUC_CONST;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 57f7b8a..35c29bd 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -63,6 +63,14 @@ package Gimp::CodeGen::enums;
                       GIMP_BUCKET_FILL_BG => '1',
                       GIMP_BUCKET_FILL_PATTERN => '2' }
        },
+    GimpCapStyle =>
+       { contig => 1,
+         header => 'libgimpbase/gimpbaseenums.h',
+         symbols => [ qw(GIMP_CAP_BUTT GIMP_CAP_ROUND GIMP_CAP_SQUARE) ],
+         mapping => { GIMP_CAP_BUTT => '0',
+                      GIMP_CAP_ROUND => '1',
+                      GIMP_CAP_SQUARE => '2' }
+       },
     GimpChannelOps =>
        { contig => 1,
          header => 'libgimpbase/gimpbaseenums.h',
@@ -291,6 +299,14 @@ package Gimp::CodeGen::enums;
                       GIMP_INTERPOLATION_NOHALO => '3',
                       GIMP_INTERPOLATION_LOHALO => '4' }
        },
+    GimpJoinStyle =>
+       { contig => 1,
+         header => 'libgimpbase/gimpbaseenums.h',
+         symbols => [ qw(GIMP_JOIN_MITER GIMP_JOIN_ROUND GIMP_JOIN_BEVEL) ],
+         mapping => { GIMP_JOIN_MITER => '0',
+                      GIMP_JOIN_ROUND => '1',
+                      GIMP_JOIN_BEVEL => '2' }
+       },
     GimpMaskApplyMode =>
        { contig => 1,
          header => 'libgimpbase/gimpbaseenums.h',


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