Commit 368f2e59 authored by Michael Natterer's avatar Michael Natterer

app, libgimpbase: move enum GimpBucketFillArea to the core

The whole bucket fill specific enum stuff is on its way out, so let's
keep this one out of libgimp for now until we decide how to present
line art filling in the PDB.
parent 78ed038f
...@@ -9,6 +9,37 @@ ...@@ -9,6 +9,37 @@
#include "gimp-intl.h" #include "gimp-intl.h"
/* enumerations from "tools-enums.h" */ /* enumerations from "tools-enums.h" */
GType
gimp_bucket_fill_area_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_BUCKET_FILL_SELECTION, "GIMP_BUCKET_FILL_SELECTION", "selection" },
{ GIMP_BUCKET_FILL_SIMILAR_COLORS, "GIMP_BUCKET_FILL_SIMILAR_COLORS", "similar-colors" },
{ GIMP_BUCKET_FILL_LINE_ART, "GIMP_BUCKET_FILL_LINE_ART", "line-art" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_BUCKET_FILL_SELECTION, NC_("bucket-fill-area", "Fill whole selection"), NULL },
{ GIMP_BUCKET_FILL_SIMILAR_COLORS, NC_("bucket-fill-area", "Fill similar colors"), NULL },
{ GIMP_BUCKET_FILL_LINE_ART, NC_("bucket-fill-area", "Fill by line art detection"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpBucketFillArea", values);
gimp_type_set_translation_context (type, "bucket-fill-area");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType GType
gimp_rect_select_mode_get_type (void) gimp_rect_select_mode_get_type (void)
{ {
......
...@@ -23,6 +23,26 @@ ...@@ -23,6 +23,26 @@
* these enums are registered with the type system * these enums are registered with the type system
*/ */
/**
* GimpBucketFillArea:
* @GIMP_BUCKET_FILL_SELECTION: Fill whole selection
* @GIMP_BUCKET_FILL_SIMILAR_COLORS: Fill similar colors
* @GIMP_BUCKET_FILL_LINE_ART: Fill by line art detection
*
* Bucket fill area.
*/
#define GIMP_TYPE_BUCKET_FILL_AREA (gimp_bucket_fill_area_get_type ())
GType gimp_bucket_fill_area_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_BUCKET_FILL_SELECTION, /*< desc="Fill whole selection" >*/
GIMP_BUCKET_FILL_SIMILAR_COLORS, /*< desc="Fill similar colors" >*/
GIMP_BUCKET_FILL_LINE_ART /*< desc="Fill by line art detection" >*/
} GimpBucketFillArea;
#define GIMP_TYPE_RECT_SELECT_MODE (gimp_rect_select_mode_get_type ()) #define GIMP_TYPE_RECT_SELECT_MODE (gimp_rect_select_mode_get_type ())
GType gimp_rect_select_mode_get_type (void) G_GNUC_CONST; GType gimp_rect_select_mode_get_type (void) G_GNUC_CONST;
......
...@@ -8,7 +8,6 @@ static const GimpGetTypeFunc get_type_funcs[] = ...@@ -8,7 +8,6 @@ static const GimpGetTypeFunc get_type_funcs[] =
gimp_blend_mode_get_type, gimp_blend_mode_get_type,
gimp_brush_application_mode_get_type, gimp_brush_application_mode_get_type,
gimp_brush_generated_shape_get_type, gimp_brush_generated_shape_get_type,
gimp_bucket_fill_area_get_type,
gimp_bucket_fill_mode_get_type, gimp_bucket_fill_mode_get_type,
gimp_cap_style_get_type, gimp_cap_style_get_type,
gimp_channel_ops_get_type, gimp_channel_ops_get_type,
...@@ -76,7 +75,6 @@ static const gchar * const type_names[] = ...@@ -76,7 +75,6 @@ static const gchar * const type_names[] =
"GimpBlendMode", "GimpBlendMode",
"GimpBrushApplicationMode", "GimpBrushApplicationMode",
"GimpBrushGeneratedShape", "GimpBrushGeneratedShape",
"GimpBucketFillArea",
"GimpBucketFillMode", "GimpBucketFillMode",
"GimpCapStyle", "GimpCapStyle",
"GimpChannelOps", "GimpChannelOps",
......
...@@ -5,7 +5,6 @@ EXPORTS ...@@ -5,7 +5,6 @@ EXPORTS
gimp_base_init gimp_base_init
gimp_blend_mode_get_type gimp_blend_mode_get_type
gimp_brush_generated_shape_get_type gimp_brush_generated_shape_get_type
gimp_bucket_fill_area_get_type
gimp_bucket_fill_mode_get_type gimp_bucket_fill_mode_get_type
gimp_cache_directory gimp_cache_directory
gimp_canonicalize_identifier gimp_canonicalize_identifier
......
...@@ -114,38 +114,6 @@ gimp_brush_generated_shape_get_type (void) ...@@ -114,38 +114,6 @@ gimp_brush_generated_shape_get_type (void)
return type; return type;
} }
GType
gimp_bucket_fill_area_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_BUCKET_FILL_SELECTION, "GIMP_BUCKET_FILL_SELECTION", "selection" },
{ GIMP_BUCKET_FILL_SIMILAR_COLORS, "GIMP_BUCKET_FILL_SIMILAR_COLORS", "similar-colors" },
{ GIMP_BUCKET_FILL_LINE_ART, "GIMP_BUCKET_FILL_LINE_ART", "line-art" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_BUCKET_FILL_SELECTION, NC_("bucket-fill-area", "Fill whole selection"), NULL },
{ GIMP_BUCKET_FILL_SIMILAR_COLORS, NC_("bucket-fill-area", "Fill similar colors"), NULL },
{ GIMP_BUCKET_FILL_LINE_ART, NC_("bucket-fill-area", "Fill by line art detection"), NULL },
{ 0, NULL, NULL }
};
static GType type = 0;
if (G_UNLIKELY (! type))
{
type = g_enum_register_static ("GimpBucketFillArea", values);
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
gimp_type_set_translation_context (type, "bucket-fill-area");
gimp_enum_set_value_descriptions (type, descs);
}
return type;
}
GType GType
gimp_bucket_fill_mode_get_type (void) gimp_bucket_fill_mode_get_type (void)
{ {
......
...@@ -104,26 +104,6 @@ typedef enum ...@@ -104,26 +104,6 @@ typedef enum
} GimpBrushGeneratedShape; } GimpBrushGeneratedShape;
/**
* GimpBucketFillArea:
* @GIMP_BUCKET_FILL_SELECTION: Fill whole selection
* @GIMP_BUCKET_FILL_SIMILAR_COLORS: Fill similar colors
* @GIMP_BUCKET_FILL_LINE_ART: Fill by line art detection
*
* Bucket fill area.
*/
#define GIMP_TYPE_BUCKET_FILL_AREA (gimp_bucket_fill_area_get_type ())
GType gimp_bucket_fill_area_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_BUCKET_FILL_SELECTION, /*< desc="Fill whole selection" >*/
GIMP_BUCKET_FILL_SIMILAR_COLORS, /*< desc="Fill similar colors" >*/
GIMP_BUCKET_FILL_LINE_ART /*< desc="Fill by line art detection" >*/
} GimpBucketFillArea;
/** /**
* GimpBucketFillMode: * GimpBucketFillMode:
* @GIMP_BUCKET_FILL_FG: FG color fill * @GIMP_BUCKET_FILL_FG: FG color fill
......
...@@ -64,16 +64,6 @@ package Gimp::CodeGen::enums; ...@@ -64,16 +64,6 @@ package Gimp::CodeGen::enums;
GIMP_BRUSH_GENERATED_SQUARE => '1', GIMP_BRUSH_GENERATED_SQUARE => '1',
GIMP_BRUSH_GENERATED_DIAMOND => '2' } GIMP_BRUSH_GENERATED_DIAMOND => '2' }
}, },
GimpBucketFillArea =>
{ contig => 1,
header => 'libgimpbase/gimpbaseenums.h',
symbols => [ qw(GIMP_BUCKET_FILL_SELECTION
GIMP_BUCKET_FILL_SIMILAR_COLORS
GIMP_BUCKET_FILL_LINE_ART) ],
mapping => { GIMP_BUCKET_FILL_SELECTION => '0',
GIMP_BUCKET_FILL_SIMILAR_COLORS => '1',
GIMP_BUCKET_FILL_LINE_ART => '2' }
},
GimpBucketFillMode => GimpBucketFillMode =>
{ contig => 1, { contig => 1,
header => 'libgimpbase/gimpbaseenums.h', header => 'libgimpbase/gimpbaseenums.h',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment