diff --git a/app/gegl/gimpcageconfig.c b/app/gegl/gimpcageconfig.c index 2acbeb2bb7..e6335cf796 100644 --- a/app/gegl/gimpcageconfig.c +++ b/app/gegl/gimpcageconfig.c @@ -29,7 +29,7 @@ #include "core/core-types.h" #include "libgimpmath/gimpmathtypes.h" -#include "libgimpbase/gimpbaseenums.h" +#include "tools/tools-enums.h" #include "libgimpmath/gimpvector.h" #include diff --git a/app/gegl/gimpcageconfig.h b/app/gegl/gimpcageconfig.h index b93f31b216..6fbc24f39e 100644 --- a/app/gegl/gimpcageconfig.h +++ b/app/gegl/gimpcageconfig.h @@ -23,6 +23,7 @@ #include "core/gimpimagemapconfig.h" #include #include "gimp-gegl-types.h" +#include "tools/tools-enums.h" #define GIMP_TYPE_CAGE_CONFIG (gimp_cage_config_get_type ()) #define GIMP_CAGE_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CAGE_CONFIG, GimpCageConfig)) diff --git a/app/tools/tools-enums.c b/app/tools/tools-enums.c index 281de158b0..32781107dc 100644 --- a/app/tools/tools-enums.c +++ b/app/tools/tools-enums.c @@ -389,6 +389,35 @@ gimp_tool_action_get_type (void) return type; } +GType +gimp_cage_mode_get_type (void) +{ + static const GEnumValue values[] = + { + { GIMP_CAGE_MODE_CAGE_CHANGE, "GIMP_CAGE_MODE_CAGE_CHANGE", "cage-change" }, + { GIMP_CAGE_MODE_DEFORM, "GIMP_CAGE_MODE_DEFORM", "deform" }, + { 0, NULL, NULL } + }; + + static const GimpEnumDesc descs[] = + { + { GIMP_CAGE_MODE_CAGE_CHANGE, NC_("cage-mode", "Create or adjust the cage"), NULL }, + { GIMP_CAGE_MODE_DEFORM, NC_("cage-mode", "Deform the cage to deform the image"), NULL }, + { 0, NULL, NULL } + }; + + static GType type = 0; + + if (G_UNLIKELY (! type)) + { + type = g_enum_register_static ("GimpCageMode", values); + gimp_type_set_translation_context (type, "cage-mode"); + gimp_enum_set_value_descriptions (type, descs); + } + + return type; +} + /* Generated data ends here */ diff --git a/app/tools/tools-enums.h b/app/tools/tools-enums.h index 64712ea378..64a34b6867 100644 --- a/app/tools/tools-enums.h +++ b/app/tools/tools-enums.h @@ -220,5 +220,15 @@ typedef enum /*< skip >*/ TRANSFORM_HANDLE_CENTER } TransformAction; +#define GIMP_TYPE_CAGE_MODE (gimp_cage_mode_get_type ()) + +GType gimp_cage_mode_get_type (void) G_GNUC_CONST; + +typedef enum +{ + GIMP_CAGE_MODE_CAGE_CHANGE, /*< desc="Create or adjust the cage" >*/ + GIMP_CAGE_MODE_DEFORM /*< desc="Deform the cage to deform the image" >*/ +} GimpCageMode; + #endif /* __TOOLS_ENUMS_H__ */ diff --git a/libgimp/gimpenums.c.tail b/libgimp/gimpenums.c.tail index 8071fcdff0..333b47cce7 100644 --- a/libgimp/gimpenums.c.tail +++ b/libgimp/gimpenums.c.tail @@ -8,7 +8,6 @@ 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_cage_mode_get_type, gimp_channel_ops_get_type, gimp_channel_type_get_type, gimp_clone_type_get_type, @@ -65,7 +64,6 @@ static const gchar * const type_names[] = "GimpBrushApplicationMode", "GimpBrushGeneratedShape", "GimpBucketFillMode", - "GimpCageMode", "GimpChannelOps", "GimpChannelType", "GimpCloneType", diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c index 7d60b86dfa..6a0b0c5f7e 100644 --- a/libgimpbase/gimpbaseenums.c +++ b/libgimpbase/gimpbaseenums.c @@ -114,36 +114,6 @@ gimp_bucket_fill_mode_get_type (void) return type; } -GType -gimp_cage_mode_get_type (void) -{ - static const GEnumValue values[] = - { - { GIMP_CAGE_MODE_CAGE_CHANGE, "GIMP_CAGE_MODE_CAGE_CHANGE", "cage-change" }, - { GIMP_CAGE_MODE_DEFORM, "GIMP_CAGE_MODE_DEFORM", "deform" }, - { 0, NULL, NULL } - }; - - static const GimpEnumDesc descs[] = - { - { GIMP_CAGE_MODE_CAGE_CHANGE, NC_("cage-mode", "Create or adjust the cage"), NULL }, - { GIMP_CAGE_MODE_DEFORM, NC_("cage-mode", "Deform the cage to deform the image"), NULL }, - { 0, NULL, NULL } - }; - - static GType type = 0; - - if (G_UNLIKELY (! type)) - { - type = g_enum_register_static ("GimpCageMode", values); - gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp"); - gimp_type_set_translation_context (type, "cage-mode"); - gimp_enum_set_value_descriptions (type, descs); - } - - return type; -} - GType gimp_channel_ops_get_type (void) { diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h index fee66d9d02..10bb510df3 100644 --- a/libgimpbase/gimpbaseenums.h +++ b/libgimpbase/gimpbaseenums.h @@ -74,16 +74,6 @@ typedef enum GIMP_PATTERN_BUCKET_FILL /*< desc="Pattern fill" >*/ } GimpBucketFillMode; -#define GIMP_TYPE_CAGE_MODE (gimp_cage_mode_get_type ()) - -GType gimp_cage_mode_get_type (void) G_GNUC_CONST; - -typedef enum -{ - GIMP_CAGE_MODE_CAGE_CHANGE, /*< desc="Create or adjust the cage" >*/ - GIMP_CAGE_MODE_DEFORM /*< desc="Deform the cage to deform the image" >*/ -} GimpCageMode; - #define GIMP_TYPE_CHANNEL_OPS (gimp_channel_ops_get_type ()) diff --git a/libgimpmath/gimpvector.c b/libgimpmath/gimpvector.c index a41fb4fa21..95b1aea26f 100644 --- a/libgimpmath/gimpvector.c +++ b/libgimpmath/gimpvector.c @@ -468,6 +468,8 @@ gimp_vector2_rotate_val (GimpVector2 vector, * Compute a normalized perpendicular vector to @vector * * Returns: a #GimpVector2 perpendicular to @vector, with a length of 1.0. + * + * Since: 2.8 **/ GimpVector2 gimp_vector2_normal (GimpVector2 *vector) @@ -490,6 +492,8 @@ gimp_vector2_normal (GimpVector2 *vector) * is passed by value rather than by reference. * * Returns: a #GimpVector2 perpendicular to @vector, with a length of 1.0. + * + * Since: 2.8 **/ GimpVector2 gimp_vector2_normal_val (GimpVector2 vector) diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl index fadfcb12ec..68568d2080 100644 --- a/tools/pdbgen/enums.pl +++ b/tools/pdbgen/enums.pl @@ -53,13 +53,6 @@ package Gimp::CodeGen::enums; GIMP_BG_BUCKET_FILL => '1', GIMP_PATTERN_BUCKET_FILL => '2' } }, - GimpCageMode => - { contig => 1, - header => 'libgimpbase/gimpbaseenums.h', - symbols => [ qw(GIMP_CAGE_MODE_CAGE_CHANGE GIMP_CAGE_MODE_DEFORM) ], - mapping => { GIMP_CAGE_MODE_CAGE_CHANGE => '0', - GIMP_CAGE_MODE_DEFORM => '1' } - }, GimpChannelOps => { contig => 1, header => 'libgimpbase/gimpbaseenums.h',