[gimp] app: Register GimpToolAction for gimp_enum_get_value_name()
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Register GimpToolAction for gimp_enum_get_value_name()
- Date: Tue, 26 Oct 2010 12:15:45 +0000 (UTC)
commit c33b287dabe825bc7fddcba213448552c22db6bd
Author: Martin Nordholts <martinn src gnome org>
Date: Tue Oct 26 13:47:18 2010 +0200
app: Register GimpToolAction for gimp_enum_get_value_name()
Register GimpToolAction so we can use gimp_enum_get_value_name() on
it.
app/tools/tools-enums.c | 31 +++++++++++++++++++++++++++++++
app/tools/tools-enums.h | 20 ++++++++++++--------
2 files changed, 43 insertions(+), 8 deletions(-)
---
diff --git a/app/tools/tools-enums.c b/app/tools/tools-enums.c
index c4cf79a..281de15 100644
--- a/app/tools/tools-enums.c
+++ b/app/tools/tools-enums.c
@@ -358,6 +358,37 @@ gimp_vector_mode_get_type (void)
return type;
}
+GType
+gimp_tool_action_get_type (void)
+{
+ static const GEnumValue values[] =
+ {
+ { GIMP_TOOL_ACTION_PAUSE, "GIMP_TOOL_ACTION_PAUSE", "pause" },
+ { GIMP_TOOL_ACTION_RESUME, "GIMP_TOOL_ACTION_RESUME", "resume" },
+ { GIMP_TOOL_ACTION_HALT, "GIMP_TOOL_ACTION_HALT", "halt" },
+ { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] =
+ {
+ { GIMP_TOOL_ACTION_PAUSE, "GIMP_TOOL_ACTION_PAUSE", NULL },
+ { GIMP_TOOL_ACTION_RESUME, "GIMP_TOOL_ACTION_RESUME", NULL },
+ { GIMP_TOOL_ACTION_HALT, "GIMP_TOOL_ACTION_HALT", NULL },
+ { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpToolAction", values);
+ gimp_type_set_translation_context (type, "tool-action");
+ 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 874c0de..64712ea 100644
--- a/app/tools/tools-enums.h
+++ b/app/tools/tools-enums.h
@@ -158,6 +158,18 @@ typedef enum
} GimpVectorMode;
+#define GIMP_TYPE_TOOL_ACTION (gimp_tool_action_get_type ())
+
+GType gimp_tool_action_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+ GIMP_TOOL_ACTION_PAUSE,
+ GIMP_TOOL_ACTION_RESUME,
+ GIMP_TOOL_ACTION_HALT
+} GimpToolAction;
+
+
/*
* non-registered enums; register them if needed
*/
@@ -171,14 +183,6 @@ typedef enum /*< skip >*/
SELECTION_ANCHOR
} SelectFunction;
-/* Tool control actions */
-typedef enum /*< skip >*/
-{
- GIMP_TOOL_ACTION_PAUSE,
- GIMP_TOOL_ACTION_RESUME,
- GIMP_TOOL_ACTION_HALT
-} GimpToolAction;
-
/* Modes of GimpEditSelectionTool */
typedef enum /*< skip >*/
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]