app, libgimp*: move enum GimpBucketFillMode to the core

The libgimp API using it is gone.
This commit is contained in:
Michael Natterer 2019-01-02 16:07:20 +01:00
parent 368f2e596a
commit 07e46abb72
7 changed files with 72 additions and 62 deletions

View File

@ -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)
{

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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)
{

View File

@ -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

View File

@ -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',