Commit ee42d8f5 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

added still unused flags type GimpDirtyMask.

2004-07-28  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h: added still unused flags type
	GimpDirtyMask.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimpthumb/Makefile.am: changed calls to gimp-mkenums to
	support GTypeFlags and to make the value arrays private to the
	get_type() functions.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c: regenerated.
parent 932b4567
2004-07-28 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.h: added still unused flags type
GimpDirtyMask.
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/paint/Makefile.am
* app/text/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* libgimpthumb/Makefile.am: changed calls to gimp-mkenums to
support GTypeFlags and to make the value arrays private to the
get_type() functions.
* app/base/base-enums.c
* app/core/core-enums.c
* app/display/display-enums.c
* app/paint/paint-enums.c
* app/text/text-enums.c
* app/tools/tools-enums.c
* app/widgets/widgets-enums.c: regenerated.
2004-07-28 Michael Natterer <mitch@gimp.org> 2004-07-28 Michael Natterer <mitch@gimp.org>
* app/paint/gimpclone.c: converted tabs to spaces. * app/paint/gimpclone.c: converted tabs to spaces.
......
...@@ -92,9 +92,9 @@ $(srcdir)/base-enums.c: $(srcdir)/base-enums.h $(GIMP_MKENUMS) ...@@ -92,9 +92,9 @@ $(srcdir)/base-enums.c: $(srcdir)/base-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \ $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"base-enums.h\"\n#include \"gimp-intl.h\"" \ --fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"base-enums.h\"\n#include \"gimp-intl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \ --fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \ --vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \ --vtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n type = g_@type@_register_static (\"@EnumName@\", values);\n\n return type;\n}\n" \
$(srcdir)/base-enums.h > xgen-bec \ $(srcdir)/base-enums.h > xgen-bec \
&& cp xgen-bec $(@F) \ && cp xgen-bec $(@F) \
&& rm -f xgen-bec && rm -f xgen-bec
...@@ -7,169 +7,162 @@ ...@@ -7,169 +7,162 @@
#include "gimp-intl.h" #include "gimp-intl.h"
/* enumerations from "./base-enums.h" */ /* enumerations from "./base-enums.h" */
static const GEnumValue gimp_check_size_enum_values[] =
{
{ GIMP_SMALL_CHECKS, N_("Small"), "small-checks" },
{ GIMP_MEDIUM_CHECKS, N_("Medium"), "medium-checks" },
{ GIMP_LARGE_CHECKS, N_("Large"), "large-checks" },
{ 0, NULL, NULL }
};
GType GType
gimp_check_size_get_type (void) gimp_check_size_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
if (!enum_type) { GIMP_SMALL_CHECKS, N_("Small"), "small-checks" },
enum_type = g_enum_register_static ("GimpCheckSize", gimp_check_size_enum_values); { GIMP_MEDIUM_CHECKS, N_("Medium"), "medium-checks" },
{ GIMP_LARGE_CHECKS, N_("Large"), "large-checks" },
{ 0, NULL, NULL }
};
return enum_type; static GType type = 0;
}
if (! type)
type = g_enum_register_static ("GimpCheckSize", values);
static const GEnumValue gimp_check_type_enum_values[] = return type;
{ }
{ GIMP_LIGHT_CHECKS, N_("Light Checks"), "light-checks" },
{ GIMP_GRAY_CHECKS, N_("Mid-Tone Checks"), "gray-checks" },
{ GIMP_DARK_CHECKS, N_("Dark Checks"), "dark-checks" },
{ GIMP_WHITE_ONLY, N_("White Only"), "white-only" },
{ GIMP_GRAY_ONLY, N_("Gray Only"), "gray-only" },
{ GIMP_BLACK_ONLY, N_("Black Only"), "black-only" },
{ 0, NULL, NULL }
};
GType GType
gimp_check_type_get_type (void) gimp_check_type_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
if (!enum_type) { GIMP_LIGHT_CHECKS, N_("Light Checks"), "light-checks" },
enum_type = g_enum_register_static ("GimpCheckType", gimp_check_type_enum_values); { GIMP_GRAY_CHECKS, N_("Mid-Tone Checks"), "gray-checks" },
{ GIMP_DARK_CHECKS, N_("Dark Checks"), "dark-checks" },
return enum_type; { GIMP_WHITE_ONLY, N_("White Only"), "white-only" },
{ GIMP_GRAY_ONLY, N_("Gray Only"), "gray-only" },
{ GIMP_BLACK_ONLY, N_("Black Only"), "black-only" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
type = g_enum_register_static ("GimpCheckType", values);
return type;
} }
static const GEnumValue gimp_curve_type_enum_values[] =
{
{ GIMP_CURVE_SMOOTH, N_("Smooth"), "smooth" },
{ GIMP_CURVE_FREE, N_("Freehand"), "free" },
{ 0, NULL, NULL }
};
GType GType
gimp_curve_type_get_type (void) gimp_curve_type_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
{ GIMP_CURVE_SMOOTH, N_("Smooth"), "smooth" },
{ GIMP_CURVE_FREE, N_("Freehand"), "free" },
{ 0, NULL, NULL }
};
if (!enum_type) static GType type = 0;
enum_type = g_enum_register_static ("GimpCurveType", gimp_curve_type_enum_values);
return enum_type;
}
if (! type)
type = g_enum_register_static ("GimpCurveType", values);
static const GEnumValue gimp_histogram_channel_enum_values[] = return type;
{ }
{ GIMP_HISTOGRAM_VALUE, N_("Value"), "value" },
{ GIMP_HISTOGRAM_RED, N_("Red"), "red" },
{ GIMP_HISTOGRAM_GREEN, N_("Green"), "green" },
{ GIMP_HISTOGRAM_BLUE, N_("Blue"), "blue" },
{ GIMP_HISTOGRAM_ALPHA, N_("Alpha"), "alpha" },
{ GIMP_HISTOGRAM_RGB, N_("RGB"), "rgb" },
{ 0, NULL, NULL }
};
GType GType
gimp_histogram_channel_get_type (void) gimp_histogram_channel_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
if (!enum_type) { GIMP_HISTOGRAM_VALUE, N_("Value"), "value" },
enum_type = g_enum_register_static ("GimpHistogramChannel", gimp_histogram_channel_enum_values); { GIMP_HISTOGRAM_RED, N_("Red"), "red" },
{ GIMP_HISTOGRAM_GREEN, N_("Green"), "green" },
return enum_type; { GIMP_HISTOGRAM_BLUE, N_("Blue"), "blue" },
{ GIMP_HISTOGRAM_ALPHA, N_("Alpha"), "alpha" },
{ GIMP_HISTOGRAM_RGB, N_("RGB"), "rgb" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
type = g_enum_register_static ("GimpHistogramChannel", values);
return type;
} }
static const GEnumValue gimp_interpolation_type_enum_values[] =
{
{ GIMP_INTERPOLATION_NONE, N_("None (Fastest)"), "none" },
{ GIMP_INTERPOLATION_LINEAR, N_("Linear"), "linear" },
{ GIMP_INTERPOLATION_CUBIC, N_("Cubic (Best)"), "cubic" },
{ 0, NULL, NULL }
};
GType GType
gimp_interpolation_type_get_type (void) gimp_interpolation_type_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
if (!enum_type) { GIMP_INTERPOLATION_NONE, N_("None (Fastest)"), "none" },
enum_type = g_enum_register_static ("GimpInterpolationType", gimp_interpolation_type_enum_values); { GIMP_INTERPOLATION_LINEAR, N_("Linear"), "linear" },
{ GIMP_INTERPOLATION_CUBIC, N_("Cubic (Best)"), "cubic" },
{ 0, NULL, NULL }
};
return enum_type; static GType type = 0;
}
if (! type)
type = g_enum_register_static ("GimpInterpolationType", values);
static const GEnumValue gimp_layer_mode_effects_enum_values[] = return type;
{ }
{ GIMP_NORMAL_MODE, "GIMP_NORMAL_MODE", "normal-mode" },
{ GIMP_DISSOLVE_MODE, "GIMP_DISSOLVE_MODE", "dissolve-mode" },
{ GIMP_BEHIND_MODE, "GIMP_BEHIND_MODE", "behind-mode" },
{ GIMP_MULTIPLY_MODE, "GIMP_MULTIPLY_MODE", "multiply-mode" },
{ GIMP_SCREEN_MODE, "GIMP_SCREEN_MODE", "screen-mode" },
{ GIMP_OVERLAY_MODE, "GIMP_OVERLAY_MODE", "overlay-mode" },
{ GIMP_DIFFERENCE_MODE, "GIMP_DIFFERENCE_MODE", "difference-mode" },
{ GIMP_ADDITION_MODE, "GIMP_ADDITION_MODE", "addition-mode" },
{ GIMP_SUBTRACT_MODE, "GIMP_SUBTRACT_MODE", "subtract-mode" },
{ GIMP_DARKEN_ONLY_MODE, "GIMP_DARKEN_ONLY_MODE", "darken-only-mode" },
{ GIMP_LIGHTEN_ONLY_MODE, "GIMP_LIGHTEN_ONLY_MODE", "lighten-only-mode" },
{ GIMP_HUE_MODE, "GIMP_HUE_MODE", "hue-mode" },
{ GIMP_SATURATION_MODE, "GIMP_SATURATION_MODE", "saturation-mode" },
{ GIMP_COLOR_MODE, "GIMP_COLOR_MODE", "color-mode" },
{ GIMP_VALUE_MODE, "GIMP_VALUE_MODE", "value-mode" },
{ GIMP_DIVIDE_MODE, "GIMP_DIVIDE_MODE", "divide-mode" },
{ GIMP_DODGE_MODE, "GIMP_DODGE_MODE", "dodge-mode" },
{ GIMP_BURN_MODE, "GIMP_BURN_MODE", "burn-mode" },
{ GIMP_HARDLIGHT_MODE, "GIMP_HARDLIGHT_MODE", "hardlight-mode" },
{ GIMP_SOFTLIGHT_MODE, "GIMP_SOFTLIGHT_MODE", "softlight-mode" },
{ GIMP_GRAIN_EXTRACT_MODE, "GIMP_GRAIN_EXTRACT_MODE", "grain-extract-mode" },
{ GIMP_GRAIN_MERGE_MODE, "GIMP_GRAIN_MERGE_MODE", "grain-merge-mode" },
{ GIMP_COLOR_ERASE_MODE, "GIMP_COLOR_ERASE_MODE", "color-erase-mode" },
{ 0, NULL, NULL }
};
GType GType
gimp_layer_mode_effects_get_type (void) gimp_layer_mode_effects_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
if (!enum_type) { GIMP_NORMAL_MODE, "GIMP_NORMAL_MODE", "normal-mode" },
enum_type = g_enum_register_static ("GimpLayerModeEffects", gimp_layer_mode_effects_enum_values); { GIMP_DISSOLVE_MODE, "GIMP_DISSOLVE_MODE", "dissolve-mode" },
{ GIMP_BEHIND_MODE, "GIMP_BEHIND_MODE", "behind-mode" },
return enum_type; { GIMP_MULTIPLY_MODE, "GIMP_MULTIPLY_MODE", "multiply-mode" },
{ GIMP_SCREEN_MODE, "GIMP_SCREEN_MODE", "screen-mode" },
{ GIMP_OVERLAY_MODE, "GIMP_OVERLAY_MODE", "overlay-mode" },
{ GIMP_DIFFERENCE_MODE, "GIMP_DIFFERENCE_MODE", "difference-mode" },
{ GIMP_ADDITION_MODE, "GIMP_ADDITION_MODE", "addition-mode" },
{ GIMP_SUBTRACT_MODE, "GIMP_SUBTRACT_MODE", "subtract-mode" },
{ GIMP_DARKEN_ONLY_MODE, "GIMP_DARKEN_ONLY_MODE", "darken-only-mode" },
{ GIMP_LIGHTEN_ONLY_MODE, "GIMP_LIGHTEN_ONLY_MODE", "lighten-only-mode" },
{ GIMP_HUE_MODE, "GIMP_HUE_MODE", "hue-mode" },
{ GIMP_SATURATION_MODE, "GIMP_SATURATION_MODE", "saturation-mode" },
{ GIMP_COLOR_MODE, "GIMP_COLOR_MODE", "color-mode" },
{ GIMP_VALUE_MODE, "GIMP_VALUE_MODE", "value-mode" },
{ GIMP_DIVIDE_MODE, "GIMP_DIVIDE_MODE", "divide-mode" },
{ GIMP_DODGE_MODE, "GIMP_DODGE_MODE", "dodge-mode" },
{ GIMP_BURN_MODE, "GIMP_BURN_MODE", "burn-mode" },
{ GIMP_HARDLIGHT_MODE, "GIMP_HARDLIGHT_MODE", "hardlight-mode" },
{ GIMP_SOFTLIGHT_MODE, "GIMP_SOFTLIGHT_MODE", "softlight-mode" },
{ GIMP_GRAIN_EXTRACT_MODE, "GIMP_GRAIN_EXTRACT_MODE", "grain-extract-mode" },
{ GIMP_GRAIN_MERGE_MODE, "GIMP_GRAIN_MERGE_MODE", "grain-merge-mode" },
{ GIMP_COLOR_ERASE_MODE, "GIMP_COLOR_ERASE_MODE", "color-erase-mode" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
type = g_enum_register_static ("GimpLayerModeEffects", values);
return type;
} }
static const GEnumValue gimp_transfer_mode_enum_values[] =
{
{ GIMP_SHADOWS, N_("Shadows"), "shadows" },
{ GIMP_MIDTONES, N_("Midtones"), "midtones" },
{ GIMP_HIGHLIGHTS, N_("Highlights"), "highlights" },
{ 0, NULL, NULL }
};
GType GType
gimp_transfer_mode_get_type (void) gimp_transfer_mode_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
{ GIMP_SHADOWS, N_("Shadows"), "shadows" },
{ GIMP_MIDTONES, N_("Midtones"), "midtones" },
{ GIMP_HIGHLIGHTS, N_("Highlights"), "highlights" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (!enum_type) if (! type)
enum_type = g_enum_register_static ("GimpTransferMode", gimp_transfer_mode_enum_values); type = g_enum_register_static ("GimpTransferMode", values);
return enum_type; return type;
} }
......
...@@ -249,9 +249,9 @@ $(srcdir)/core-enums.c: $(srcdir)/core-enums.h $(GIMP_MKENUMS) ...@@ -249,9 +249,9 @@ $(srcdir)/core-enums.c: $(srcdir)/core-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \ $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"core-enums.h\"\n#include \"gimp-intl.h\"" \ --fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"core-enums.h\"\n#include \"gimp-intl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \ --fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \ --vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \ --vtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n type = g_@type@_register_static (\"@EnumName@\", values);\n\n return type;\n}\n" \
$(srcdir)/core-enums.h > xgen-cec \ $(srcdir)/core-enums.h > xgen-cec \
&& cp xgen-cec $(@F) \ && cp xgen-cec $(@F) \
&& rm -f xgen-cec && rm -f xgen-cec
This diff is collapsed.
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifndef __CORE_ENUMS_H__ #ifndef __CORE_ENUMS_H__
#define __CORE_ENUMS_H__ #define __CORE_ENUMS_H__
#if 0 #if 0
This file is parsed by two scripts, enumgen.pl in tools/pdbgen, This file is parsed by two scripts, enumgen.pl in tools/pdbgen,
and gimp-mkenums. All enums that are not marked with and gimp-mkenums. All enums that are not marked with
...@@ -505,6 +506,27 @@ typedef enum /*< pdb-skip >*/ ...@@ -505,6 +506,27 @@ typedef enum /*< pdb-skip >*/
} GimpUndoType; } GimpUndoType;
#define GIMP_TYPE_DIRTY_MASK (gimp_dirty_mask_get_type ())
GType gimp_dirty_mask_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_DIRTY_NONE = 0,
GIMP_DIRTY_IMAGE = 1 << 0,
GIMP_DIRTY_IMAGE_META = 1 << 1,
GIMP_DIRTY_IMAGE_STRUCTURE = 1 << 2,
GIMP_DIRTY_ITEM = 1 << 3,
GIMP_DIRTY_ITEM_META = 1 << 4,
GIMP_DIRTY_DRAWABLE = 1 << 5,
GIMP_DIRTY_VECTORS = 1 << 6,
GIMP_DIRTY_SELECTION = 1 << 7,
GIMP_DIRTY_ALL = 0xff
} GimpDirtyMask;
/* /*
* non-registered enums; register them if needed * non-registered enums; register them if needed
*/ */
...@@ -621,4 +643,5 @@ typedef enum /*< pdb-skip, skip >*/ ...@@ -621,4 +643,5 @@ typedef enum /*< pdb-skip, skip >*/
GIMP_IMAGE_SCALE_TOO_BIG GIMP_IMAGE_SCALE_TOO_BIG
} GimpImageScaleCheckType; } GimpImageScaleCheckType;
#endif /* __CORE_ENUMS_H__ */ #endif /* __CORE_ENUMS_H__ */
...@@ -90,9 +90,9 @@ $(srcdir)/display-enums.c: $(srcdir)/display-enums.h $(GIMP_MKENUMS) ...@@ -90,9 +90,9 @@ $(srcdir)/display-enums.c: $(srcdir)/display-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \ $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"display-enums.h\"\n#include\"gimp-intl.h\"" \ --fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"display-enums.h\"\n#include\"gimp-intl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \ --fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \ --vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \ --vtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n type = g_@type@_register_static (\"@EnumName@\", values);\n\n return type;\n}\n" \
$(srcdir)/display-enums.h > xgen-dec \ $(srcdir)/display-enums.h > xgen-dec \
&& cp xgen-dec $(@F) \ && cp xgen-dec $(@F) \
&& rm -f xgen-dec && rm -f xgen-dec
...@@ -7,45 +7,43 @@ ...@@ -7,45 +7,43 @@
#include"gimp-intl.h" #include"gimp-intl.h"
/* enumerations from "./display-enums.h" */ /* enumerations from "./display-enums.h" */
static const GEnumValue gimp_cursor_mode_enum_values[] =
{
{ GIMP_CURSOR_MODE_TOOL_ICON, N_("Tool icon"), "tool-icon" },
{ GIMP_CURSOR_MODE_TOOL_CROSSHAIR, N_("Tool icon with crosshair"), "tool-crosshair" },
{ GIMP_CURSOR_MODE_CROSSHAIR, N_("Crosshair only"), "crosshair" },
{ 0, NULL, NULL }
};
GType GType
gimp_cursor_mode_get_type (void) gimp_cursor_mode_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
if (!enum_type) { GIMP_CURSOR_MODE_TOOL_ICON, N_("Tool icon"), "tool-icon" },
enum_type = g_enum_register_static ("GimpCursorMode", gimp_cursor_mode_enum_values); { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, N_("Tool icon with crosshair"), "tool-crosshair" },
{ GIMP_CURSOR_MODE_CROSSHAIR, N_("Crosshair only"), "crosshair" },
{ 0, NULL, NULL }
};
return enum_type; static GType type = 0;
}
if (! type)
type = g_enum_register_static ("GimpCursorMode", values);
static const GEnumValue gimp_canvas_padding_mode_enum_values[] = return type;
{ }
{ GIMP_CANVAS_PADDING_MODE_DEFAULT, N_("From theme"), "default" },
{ GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, N_("Light check color"), "light-check" },
{ GIMP_CANVAS_PADDING_MODE_DARK_CHECK, N_("Dark check color"), "dark-check" },
{ GIMP_CANVAS_PADDING_MODE_CUSTOM, N_("Custom color"), "custom" },
{ 0, NULL, NULL }
};
GType GType
gimp_canvas_padding_mode_get_type (void) gimp_canvas_padding_mode_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
{ GIMP_CANVAS_PADDING_MODE_DEFAULT, N_("From theme"), "default" },
{ GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, N_("Light check color"), "light-check" },
{ GIMP_CANVAS_PADDING_MODE_DARK_CHECK, N_("Dark check color"), "dark-check" },
{ GIMP_CANVAS_PADDING_MODE_CUSTOM, N_("Custom color"), "custom" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (!enum_type) if (! type)
enum_type = g_enum_register_static ("GimpCanvasPaddingMode", gimp_canvas_padding_mode_enum_values); type = g_enum_register_static ("GimpCanvasPaddingMode", values);
return enum_type; return type;
} }
......
...@@ -85,9 +85,9 @@ $(srcdir)/paint-enums.c: $(srcdir)/paint-enums.h $(GIMP_MKENUMS) ...@@ -85,9 +85,9 @@ $(srcdir)/paint-enums.c: $(srcdir)/paint-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \ $(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"paint-enums.h\"\n#include \"gimp-intl.h\"" \ --fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"paint-enums.h\"\n#include \"gimp-intl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \ --fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \ --vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \ --vtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (! type)\n type = g_@type@_register_static (\"@EnumName@\", values);\n\n return type;\n}\n" \
$(srcdir)/paint-enums.h > xgen-pec \ $(srcdir)/paint-enums.h > xgen-pec \
&& cp xgen-pec $(@F) \ && cp xgen-pec $(@F) \
&& rm -f xgen-pec && rm -f xgen-pec
...@@ -7,120 +7,114 @@ ...@@ -7,120 +7,114 @@
#include "gimp-intl.h" #include "gimp-intl.h"
/* enumerations from "./paint-enums.h" */ /* enumerations from "./paint-enums.h" */
static const GEnumValue gimp_clone_type_enum_values[] =
{
{ GIMP_IMAGE_CLONE, N_("Image source"), "image-clone" },
{ GIMP_PATTERN_CLONE, N_("Pattern source"), "pattern-clone" },
{ 0, NULL, NULL }
};
GType GType
gimp_clone_type_get_type (void) gimp_clone_type_get_type (void)
{ {
static GType enum_type = 0; static const GEnumValue values[] =
{
{ GIMP_IMAGE_CLONE, N_("Image source"), "image-clone" },
{ GIMP_PATTERN_CLONE, N_("Pattern source"), "pattern-clone" },
{ 0, NULL, NULL }
};
if (!enum_type) static GType type = 0;
enum_type = g_enum_register_static ("GimpCloneType", gimp_clone_type_enum_values);
return enum_type;
}
if (! type)
type = g_enum_register_static ("GimpCloneType", values);
static const GEnumValue gimp_clone_align_mode_enum_values[] = return type;
{ }
{ GIMP_CLONE_ALIGN_NO, N_("Non-aligned"), "no" },
{ GIMP_CLONE_ALIGN_YES, N_("Aligned"), "yes" },
{ GIMP_CLONE_ALIGN_REGISTERED, N_("Registered"), "registered" },
{ 0, NULL, NULL }
};
GType GType
gimp_clone_align_mode_get_type (void) gimp_clone_align_mode_get_type (void)
{ {
static GType enum_type = 0;