app, libgimpbase: move enums GimpCapStyle and GimpJoinStyle to libgimpbase

This commit is contained in:
Michael Natterer
2015-11-09 02:16:03 +01:00
parent 8fa7bc3622
commit 9bcbfb96b1
7 changed files with 111 additions and 87 deletions

View File

@ -482,68 +482,6 @@ gimp_fill_style_get_type (void)
return type;
}
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)
{

View File

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

View File

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

View File

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

View File

@ -146,6 +146,38 @@ gimp_bucket_fill_mode_get_type (void)
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_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)
{
@ -912,6 +944,38 @@ gimp_interpolation_type_get_type (void)
return type;
}
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)
{

View File

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

View File

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