[gimp] app: Add GimpChannelBorderStyle enum



commit 46a969035358deb8502f2d1c29e4bcb862bf9197
Author: Ell <ell_se yahoo com>
Date:   Mon Apr 4 14:53:56 2016 +0000

    app: Add GimpChannelBorderStyle enum
    
    Will be used as a parameter to control the behavior of
    gimp_channel_border(), and the corresponding "Select -> Border..."
    action, instead of the feather flag.
    
    Can be one of:
    
      - GIMP_CHANNEL_BORDER_STYLE_HARD: Current behavior, unfeathered.
      - GIMP_CHANNEL_BORDER_STYLE_SMOOTH: Smooth border, better handling
        partial selection, implemented as explained in the next commit.
      - GIMP_CHANNEL_BORDER_STYLE_FEATHERED: Current behavior, feathered.

 app/core/core-enums.c |   31 +++++++++++++++++++++++++++++++
 app/core/core-enums.h |   12 ++++++++++++
 2 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index 7436fb0..84b41bb 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -1195,6 +1195,37 @@ gimp_image_map_region_get_type (void)
   return type;
 }
 
+GType
+gimp_channel_border_style_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_CHANNEL_BORDER_STYLE_HARD, "GIMP_CHANNEL_BORDER_STYLE_HARD", "hard" },
+    { GIMP_CHANNEL_BORDER_STYLE_SMOOTH, "GIMP_CHANNEL_BORDER_STYLE_SMOOTH", "smooth" },
+    { GIMP_CHANNEL_BORDER_STYLE_FEATHERED, "GIMP_CHANNEL_BORDER_STYLE_FEATHERED", "feathered" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_CHANNEL_BORDER_STYLE_HARD, NC_("channel-border-style", "Hard"), NULL },
+    { GIMP_CHANNEL_BORDER_STYLE_SMOOTH, NC_("channel-border-style", "Smooth"), NULL },
+    { GIMP_CHANNEL_BORDER_STYLE_FEATHERED, NC_("channel-border-style", "Feathered"), NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpChannelBorderStyle", values);
+      gimp_type_set_translation_context (type, "channel-border-style");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
 
 /* Generated data ends here */
 
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index 2fbc822..c1af8a6 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -553,6 +553,18 @@ typedef enum  /*< pdb-skip >*/
 } GimpImageMapRegion;
 
 
+#define GIMP_TYPE_CHANNEL_BORDER_STYLE (gimp_channel_border_style_get_type ())
+
+GType gimp_channel_border_style_get_type (void) G_GNUC_CONST;
+
+typedef enum  /*< pdb-skip >*/
+{
+  GIMP_CHANNEL_BORDER_STYLE_HARD,     /*< desc="Hard"      >*/
+  GIMP_CHANNEL_BORDER_STYLE_SMOOTH,   /*< desc="Smooth"    >*/
+  GIMP_CHANNEL_BORDER_STYLE_FEATHERED /*< desc="Feathered" >*/
+} GimpChannelBorderStyle;
+
+
 /*
  * non-registered enums; register them if needed
  */


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