From 98f48f2c1e3bc8223daebe70d6104e658f5b8b6b Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sun, 23 Jan 2005 00:00:20 +0000 Subject: [PATCH] app/paint/paint-enums.h moved enums to libgimpbase (from app/paint and 2005-01-23 Sven Neumann * app/paint/paint-enums.h * libgimpbase/gimpbaseenums.h: moved enums to libgimpbase (from app/paint and libgimp). The remaining enums in app/paint/paint-enums.h need special treatment. * app/paint/paint-enums.c: * libgimp/gimpenums.h * libgimpbase/gimpbaseenums.c * tools/pdbgen/enums.pl: regenerated. * libgimpbase/gimpbase.def * libgimp/gimp.def: updated. --- ChangeLog | 15 +++++++ app/paint/paint-enums.c | 84 ----------------------------------- app/paint/paint-enums.h | 33 -------------- libgimp/gimp.def | 3 -- libgimp/gimpenums.h | 33 -------------- libgimpbase/gimpbase.def | 3 ++ libgimpbase/gimpbaseenums.c | 87 +++++++++++++++++++++++++++++++++++++ libgimpbase/gimpbaseenums.h | 33 ++++++++++++++ tools/pdbgen/enums.pl | 44 +++++++++---------- 9 files changed, 160 insertions(+), 175 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b93bd9b97..3250247c49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-01-23 Sven Neumann + + * app/paint/paint-enums.h + * libgimpbase/gimpbaseenums.h: moved enums to libgimpbase (from + app/paint and libgimp). The remaining enums in + app/paint/paint-enums.h need special treatment. + + * app/paint/paint-enums.c: + * libgimp/gimpenums.h + * libgimpbase/gimpbaseenums.c + * tools/pdbgen/enums.pl: regenerated. + + * libgimpbase/gimpbase.def + * libgimp/gimp.def: updated. + 2005-01-23 Sven Neumann * app/plug-in/Makefile.am diff --git a/app/paint/paint-enums.c b/app/paint/paint-enums.c index 689e76eaed..c19ef3a8f7 100644 --- a/app/paint/paint-enums.c +++ b/app/paint/paint-enums.c @@ -8,34 +8,6 @@ #include "gimp-intl.h" /* enumerations from "./paint-enums.h" */ -GType -gimp_clone_type_get_type (void) -{ - static const GEnumValue values[] = - { - { GIMP_IMAGE_CLONE, "GIMP_IMAGE_CLONE", "image-clone" }, - { GIMP_PATTERN_CLONE, "GIMP_PATTERN_CLONE", "pattern-clone" }, - { 0, NULL, NULL } - }; - - static const GimpEnumDesc descs[] = - { - { GIMP_IMAGE_CLONE, N_("Image source"), NULL }, - { GIMP_PATTERN_CLONE, N_("Pattern source"), NULL }, - { 0, NULL, NULL } - }; - - static GType type = 0; - - if (! type) - { - type = g_enum_register_static ("GimpCloneType", values); - gimp_enum_set_value_descriptions (type, descs); - } - - return type; -} - GType gimp_clone_align_mode_get_type (void) { @@ -66,34 +38,6 @@ gimp_clone_align_mode_get_type (void) return type; } -GType -gimp_dodge_burn_type_get_type (void) -{ - static const GEnumValue values[] = - { - { GIMP_DODGE, "GIMP_DODGE", "dodge" }, - { GIMP_BURN, "GIMP_BURN", "burn" }, - { 0, NULL, NULL } - }; - - static const GimpEnumDesc descs[] = - { - { GIMP_DODGE, N_("Dodge"), NULL }, - { GIMP_BURN, N_("Burn"), NULL }, - { 0, NULL, NULL } - }; - - static GType type = 0; - - if (! type) - { - type = g_enum_register_static ("GimpDodgeBurnType", values); - gimp_enum_set_value_descriptions (type, descs); - } - - return type; -} - GType gimp_convolve_type_get_type (void) { @@ -152,34 +96,6 @@ gimp_ink_blob_type_get_type (void) return type; } -GType -gimp_paint_application_mode_get_type (void) -{ - static const GEnumValue values[] = - { - { GIMP_PAINT_CONSTANT, "GIMP_PAINT_CONSTANT", "constant" }, - { GIMP_PAINT_INCREMENTAL, "GIMP_PAINT_INCREMENTAL", "incremental" }, - { 0, NULL, NULL } - }; - - static const GimpEnumDesc descs[] = - { - { GIMP_PAINT_CONSTANT, N_("Constant"), NULL }, - { GIMP_PAINT_INCREMENTAL, N_("Incremental"), NULL }, - { 0, NULL, NULL } - }; - - static GType type = 0; - - if (! type) - { - type = g_enum_register_static ("GimpPaintApplicationMode", values); - gimp_enum_set_value_descriptions (type, descs); - } - - return type; -} - /* Generated data ends here */ diff --git a/app/paint/paint-enums.h b/app/paint/paint-enums.h index 8057841900..a6c0ff34a2 100644 --- a/app/paint/paint-enums.h +++ b/app/paint/paint-enums.h @@ -35,17 +35,6 @@ * these enums that are registered with the type system */ -#define GIMP_TYPE_CLONE_TYPE (gimp_clone_type_get_type ()) - -GType gimp_clone_type_get_type (void) G_GNUC_CONST; - -typedef enum -{ - GIMP_IMAGE_CLONE, /*< desc="Image source" >*/ - GIMP_PATTERN_CLONE /*< desc="Pattern source" >*/ -} GimpCloneType; - - #define GIMP_TYPE_CLONE_ALIGN_MODE (gimp_clone_align_mode_get_type ()) GType gimp_clone_align_mode_get_type (void) G_GNUC_CONST; @@ -58,17 +47,6 @@ typedef enum /*< pdb-skip >*/ } GimpCloneAlignMode; -#define GIMP_TYPE_DODGE_BURN_TYPE (gimp_dodge_burn_type_get_type ()) - -GType gimp_dodge_burn_type_get_type (void) G_GNUC_CONST; - -typedef enum -{ - GIMP_DODGE, /*< desc="Dodge" >*/ - GIMP_BURN /*< desc="Burn" >*/ -} GimpDodgeBurnType; - - #define GIMP_TYPE_CONVOLVE_TYPE (gimp_convolve_type_get_type ()) GType gimp_convolve_type_get_type (void) G_GNUC_CONST; @@ -93,17 +71,6 @@ typedef enum /*< pdb-skip >*/ } GimpInkBlobType; -#define GIMP_TYPE_PAINT_APPLICATION_MODE (gimp_paint_application_mode_get_type ()) - -GType gimp_paint_application_mode_get_type (void) G_GNUC_CONST; - -typedef enum -{ - GIMP_PAINT_CONSTANT, /*< desc="Constant" >*/ - GIMP_PAINT_INCREMENTAL /*< desc="Incremental" >*/ -} GimpPaintApplicationMode; - - /* * non-registered enums; register them if needed */ diff --git a/libgimp/gimp.def b/libgimp/gimp.def index f61eb3007a..270ae3703e 100644 --- a/libgimp/gimp.def +++ b/libgimp/gimp.def @@ -56,7 +56,6 @@ EXPORTS gimp_check_type gimp_clone gimp_clone_default - gimp_clone_type_get_type gimp_color_balance gimp_colorize gimp_context_get_background @@ -98,7 +97,6 @@ EXPORTS gimp_display_new gimp_displays_flush gimp_displays_reconnect - gimp_dodge_burn_type_get_type gimp_dodgeburn gimp_dodgeburn_default gimp_drawable_attach_new_parasite @@ -384,7 +382,6 @@ EXPORTS gimp_monitor_number gimp_offset_type_get_type gimp_orientation_type_get_type - gimp_paint_application_mode_get_type gimp_paintbrush gimp_paintbrush_default gimp_palette_add_entry diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h index 7a04bec78b..a207433843 100644 --- a/libgimp/gimpenums.h +++ b/libgimp/gimpenums.h @@ -36,17 +36,6 @@ typedef enum } GimpBrushApplicationMode; -#define GIMP_TYPE_CLONE_TYPE (gimp_clone_type_get_type ()) - -GType gimp_clone_type_get_type (void) G_GNUC_CONST; - -typedef enum -{ - GIMP_IMAGE_CLONE, - GIMP_PATTERN_CLONE -} GimpCloneType; - - #define GIMP_TYPE_CONVERT_DITHER_TYPE (gimp_convert_dither_type_get_type ()) GType gimp_convert_dither_type_get_type (void) G_GNUC_CONST; @@ -97,17 +86,6 @@ typedef enum } GimpConvolveType; -#define GIMP_TYPE_DODGE_BURN_TYPE (gimp_dodge_burn_type_get_type ()) - -GType gimp_dodge_burn_type_get_type (void) G_GNUC_CONST; - -typedef enum -{ - GIMP_DODGE, - GIMP_BURN -} GimpDodgeBurnType; - - #define GIMP_TYPE_FILL_TYPE (gimp_fill_type_get_type ()) GType gimp_fill_type_get_type (void) G_GNUC_CONST; @@ -257,17 +235,6 @@ typedef enum } GimpOrientationType; -#define GIMP_TYPE_PAINT_APPLICATION_MODE (gimp_paint_application_mode_get_type ()) - -GType gimp_paint_application_mode_get_type (void) G_GNUC_CONST; - -typedef enum -{ - GIMP_PAINT_CONSTANT, - GIMP_PAINT_INCREMENTAL -} GimpPaintApplicationMode; - - #define GIMP_TYPE_ROTATION_TYPE (gimp_rotation_type_get_type ()) GType gimp_rotation_type_get_type (void) G_GNUC_CONST; diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def index b74790b9a6..76cf6f5bd7 100644 --- a/libgimpbase/gimpbase.def +++ b/libgimpbase/gimpbase.def @@ -10,10 +10,12 @@ EXPORTS gimp_check_size_get_type gimp_check_type_get_type gimp_checks_get_shades + gimp_clone_type_get_type gimp_data_directory gimp_datafiles_check_extension gimp_datafiles_read_directories gimp_directory + gimp_dodge_burn_type_get_type gimp_enum_get_desc gimp_enum_get_value gimp_enum_get_value_descriptions @@ -40,6 +42,7 @@ EXPORTS gimp_memsize_serialize gimp_memsize_to_string gimp_message_handler_type_get_type + gimp_paint_application_mode_get_type gimp_param_memsize_get_type gimp_param_path_get_type gimp_param_spec_memsize diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c index 4f019b81c5..bdc850264d 100644 --- a/libgimpbase/gimpbaseenums.c +++ b/libgimpbase/gimpbaseenums.c @@ -246,6 +246,64 @@ gimp_check_type_get_type (void) return type; } +GType +gimp_clone_type_get_type (void) +{ + static const GEnumValue values[] = + { + { GIMP_IMAGE_CLONE, "GIMP_IMAGE_CLONE", "image-clone" }, + { GIMP_PATTERN_CLONE, "GIMP_PATTERN_CLONE", "pattern-clone" }, + { 0, NULL, NULL } + }; + + static const GimpEnumDesc descs[] = + { + { GIMP_IMAGE_CLONE, N_("Image source"), NULL }, + { GIMP_PATTERN_CLONE, N_("Pattern source"), NULL }, + { 0, NULL, NULL } + }; + + static GType type = 0; + + if (! type) + { + type = g_enum_register_static ("GimpCloneType", values); + gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); + gimp_enum_set_value_descriptions (type, descs); + } + + return type; +} + +GType +gimp_dodge_burn_type_get_type (void) +{ + static const GEnumValue values[] = + { + { GIMP_DODGE, "GIMP_DODGE", "dodge" }, + { GIMP_BURN, "GIMP_BURN", "burn" }, + { 0, NULL, NULL } + }; + + static const GimpEnumDesc descs[] = + { + { GIMP_DODGE, N_("Dodge"), NULL }, + { GIMP_BURN, N_("Burn"), NULL }, + { 0, NULL, NULL } + }; + + static GType type = 0; + + if (! type) + { + type = g_enum_register_static ("GimpDodgeBurnType", values); + gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); + gimp_enum_set_value_descriptions (type, descs); + } + + return type; +} + GType gimp_gradient_type_get_type (void) { @@ -425,6 +483,35 @@ gimp_interpolation_type_get_type (void) return type; } +GType +gimp_paint_application_mode_get_type (void) +{ + static const GEnumValue values[] = + { + { GIMP_PAINT_CONSTANT, "GIMP_PAINT_CONSTANT", "constant" }, + { GIMP_PAINT_INCREMENTAL, "GIMP_PAINT_INCREMENTAL", "incremental" }, + { 0, NULL, NULL } + }; + + static const GimpEnumDesc descs[] = + { + { GIMP_PAINT_CONSTANT, N_("Constant"), NULL }, + { GIMP_PAINT_INCREMENTAL, N_("Incremental"), NULL }, + { 0, NULL, NULL } + }; + + static GType type = 0; + + if (! type) + { + type = g_enum_register_static ("GimpPaintApplicationMode", values); + gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); + gimp_enum_set_value_descriptions (type, descs); + } + + return type; +} + GType gimp_repeat_mode_get_type (void) { diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h index b793a79881..ee3e0d7a9d 100644 --- a/libgimpbase/gimpbaseenums.h +++ b/libgimpbase/gimpbaseenums.h @@ -121,6 +121,28 @@ typedef enum /*< pdb-skip >*/ } GimpCheckType; +#define GIMP_TYPE_CLONE_TYPE (gimp_clone_type_get_type ()) + +GType gimp_clone_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_IMAGE_CLONE, /*< desc="Image source" >*/ + GIMP_PATTERN_CLONE /*< desc="Pattern source" >*/ +} GimpCloneType; + + +#define GIMP_TYPE_DODGE_BURN_TYPE (gimp_dodge_burn_type_get_type ()) + +GType gimp_dodge_burn_type_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_DODGE, /*< desc="Dodge" >*/ + GIMP_BURN /*< desc="Burn" >*/ +} GimpDodgeBurnType; + + #define GIMP_TYPE_GRADIENT_TYPE (gimp_gradient_type_get_type ()) GType gimp_gradient_type_get_type (void) G_GNUC_CONST; @@ -193,6 +215,17 @@ typedef enum } GimpInterpolationType; +#define GIMP_TYPE_PAINT_APPLICATION_MODE (gimp_paint_application_mode_get_type ()) + +GType gimp_paint_application_mode_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_PAINT_CONSTANT, /*< desc="Constant" >*/ + GIMP_PAINT_INCREMENTAL /*< desc="Incremental" >*/ +} GimpPaintApplicationMode; + + #define GIMP_TYPE_REPEAT_MODE (gimp_repeat_mode_get_type ()) GType gimp_repeat_mode_get_type (void) G_GNUC_CONST; diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl index a8789d8863..089dc748cf 100644 --- a/tools/pdbgen/enums.pl +++ b/tools/pdbgen/enums.pl @@ -75,6 +75,20 @@ package Gimp::CodeGen::enums; GIMP_INDEXED_CHANNEL => '4', GIMP_ALPHA_CHANNEL => '5' } }, + GimpCloneType => + { contig => 1, + header => 'libgimpbase/gimpbaseenums.h', + symbols => [ qw(GIMP_IMAGE_CLONE GIMP_PATTERN_CLONE) ], + mapping => { GIMP_IMAGE_CLONE => '0', + GIMP_PATTERN_CLONE => '1' } + }, + GimpDodgeBurnType => + { contig => 1, + header => 'libgimpbase/gimpbaseenums.h', + symbols => [ qw(GIMP_DODGE GIMP_BURN) ], + mapping => { GIMP_DODGE => '0', + GIMP_BURN => '1' } + }, GimpGradientType => { contig => 1, header => 'libgimpbase/gimpbaseenums.h', @@ -141,6 +155,13 @@ package Gimp::CodeGen::enums; GIMP_INTERPOLATION_CUBIC => '2', GIMP_INTERPOLATION_LANCZOS => '3' } }, + GimpPaintApplicationMode => + { contig => 1, + header => 'libgimpbase/gimpbaseenums.h', + symbols => [ qw(GIMP_PAINT_CONSTANT GIMP_PAINT_INCREMENTAL) ], + mapping => { GIMP_PAINT_CONSTANT => '0', + GIMP_PAINT_INCREMENTAL => '1' } + }, GimpRepeatMode => { contig => 1, header => 'libgimpbase/gimpbaseenums.h', @@ -443,20 +464,6 @@ package Gimp::CodeGen::enums; mapping => { GIMP_PIXELS => '0', GIMP_POINTS => '1' } }, - GimpCloneType => - { contig => 1, - header => 'paint/paint-enums.h', - symbols => [ qw(GIMP_IMAGE_CLONE GIMP_PATTERN_CLONE) ], - mapping => { GIMP_IMAGE_CLONE => '0', - GIMP_PATTERN_CLONE => '1' } - }, - GimpDodgeBurnType => - { contig => 1, - header => 'paint/paint-enums.h', - symbols => [ qw(GIMP_DODGE GIMP_BURN) ], - mapping => { GIMP_DODGE => '0', - GIMP_BURN => '1' } - }, GimpConvolveType => { contig => 1, header => 'paint/paint-enums.h', @@ -464,13 +471,6 @@ package Gimp::CodeGen::enums; mapping => { GIMP_BLUR_CONVOLVE => '0', GIMP_SHARPEN_CONVOLVE => '1' } }, - GimpPaintApplicationMode => - { contig => 1, - header => 'paint/paint-enums.h', - symbols => [ qw(GIMP_PAINT_CONSTANT GIMP_PAINT_INCREMENTAL) ], - mapping => { GIMP_PAINT_CONSTANT => '0', - GIMP_PAINT_INCREMENTAL => '1' } - }, GimpBrushApplicationMode => { contig => 1, header => 'paint/paint-enums.h', @@ -480,7 +480,7 @@ package Gimp::CodeGen::enums; }, GimpRunMode => { contig => 1, - header => 'plug-in/plug-in-types.h', + header => 'plug-in/plug-in-enums.h', symbols => [ qw(GIMP_RUN_INTERACTIVE GIMP_RUN_NONINTERACTIVE GIMP_RUN_WITH_LAST_VALS) ], mapping => { GIMP_RUN_INTERACTIVE => '0',