[gimp] app: move enums GimpButtonPressType and GimpButtonReleaseType



commit 53a84bc6ea32a459aaeb7b03006606ac06173389
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jun 10 12:25:16 2017 +0200

    app: move enums GimpButtonPressType and GimpButtonReleaseType
    
    from tools-enums.h to display-enums.h, will need them there soon.

 app/display/display-enums.c |   64 +++++++++++++++++++++++++++++++++++++++++++
 app/display/display-enums.h |   25 +++++++++++++++++
 app/tools/tools-enums.c     |   64 -------------------------------------------
 app/tools/tools-enums.h     |   26 +-----------------
 4 files changed, 90 insertions(+), 89 deletions(-)
---
diff --git a/app/display/display-enums.c b/app/display/display-enums.c
index 1deb2ac..577e473 100644
--- a/app/display/display-enums.c
+++ b/app/display/display-enums.c
@@ -9,6 +9,70 @@
 
 /* enumerations from "display-enums.h" */
 GType
+gimp_button_press_type_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_BUTTON_PRESS_NORMAL, "GIMP_BUTTON_PRESS_NORMAL", "normal" },
+    { GIMP_BUTTON_PRESS_DOUBLE, "GIMP_BUTTON_PRESS_DOUBLE", "double" },
+    { GIMP_BUTTON_PRESS_TRIPLE, "GIMP_BUTTON_PRESS_TRIPLE", "triple" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_BUTTON_PRESS_NORMAL, "GIMP_BUTTON_PRESS_NORMAL", NULL },
+    { GIMP_BUTTON_PRESS_DOUBLE, "GIMP_BUTTON_PRESS_DOUBLE", NULL },
+    { GIMP_BUTTON_PRESS_TRIPLE, "GIMP_BUTTON_PRESS_TRIPLE", NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpButtonPressType", values);
+      gimp_type_set_translation_context (type, "button-press-type");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
+GType
+gimp_button_release_type_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_BUTTON_RELEASE_NORMAL, "GIMP_BUTTON_RELEASE_NORMAL", "normal" },
+    { GIMP_BUTTON_RELEASE_CANCEL, "GIMP_BUTTON_RELEASE_CANCEL", "cancel" },
+    { GIMP_BUTTON_RELEASE_CLICK, "GIMP_BUTTON_RELEASE_CLICK", "click" },
+    { GIMP_BUTTON_RELEASE_NO_MOTION, "GIMP_BUTTON_RELEASE_NO_MOTION", "no-motion" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_BUTTON_RELEASE_NORMAL, "GIMP_BUTTON_RELEASE_NORMAL", NULL },
+    { GIMP_BUTTON_RELEASE_CANCEL, "GIMP_BUTTON_RELEASE_CANCEL", NULL },
+    { GIMP_BUTTON_RELEASE_CLICK, "GIMP_BUTTON_RELEASE_CLICK", NULL },
+    { GIMP_BUTTON_RELEASE_NO_MOTION, "GIMP_BUTTON_RELEASE_NO_MOTION", NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpButtonReleaseType", values);
+      gimp_type_set_translation_context (type, "button-release-type");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
+GType
 gimp_cursor_precision_get_type (void)
 {
   static const GEnumValue values[] =
diff --git a/app/display/display-enums.h b/app/display/display-enums.h
index 01ef767..e0d3122 100644
--- a/app/display/display-enums.h
+++ b/app/display/display-enums.h
@@ -19,6 +19,31 @@
 #define __DISPLAY_ENUMS_H__
 
 
+#define GIMP_TYPE_BUTTON_PRESS_TYPE (gimp_button_press_type_get_type ())
+
+GType gimp_button_press_type_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_BUTTON_PRESS_NORMAL,
+  GIMP_BUTTON_PRESS_DOUBLE,
+  GIMP_BUTTON_PRESS_TRIPLE
+} GimpButtonPressType;
+
+
+#define GIMP_TYPE_BUTTON_RELEASE_TYPE (gimp_button_release_type_get_type ())
+
+GType gimp_button_release_type_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_BUTTON_RELEASE_NORMAL,
+  GIMP_BUTTON_RELEASE_CANCEL,
+  GIMP_BUTTON_RELEASE_CLICK,
+  GIMP_BUTTON_RELEASE_NO_MOTION
+} GimpButtonReleaseType;
+
+
 #define GIMP_TYPE_CURSOR_PRECISION (gimp_cursor_precision_get_type ())
 
 GType gimp_cursor_precision_get_type (void) G_GNUC_CONST;
diff --git a/app/tools/tools-enums.c b/app/tools/tools-enums.c
index 4d2f188..972532f 100644
--- a/app/tools/tools-enums.c
+++ b/app/tools/tools-enums.c
@@ -10,70 +10,6 @@
 
 /* enumerations from "tools-enums.h" */
 GType
-gimp_button_press_type_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_BUTTON_PRESS_NORMAL, "GIMP_BUTTON_PRESS_NORMAL", "normal" },
-    { GIMP_BUTTON_PRESS_DOUBLE, "GIMP_BUTTON_PRESS_DOUBLE", "double" },
-    { GIMP_BUTTON_PRESS_TRIPLE, "GIMP_BUTTON_PRESS_TRIPLE", "triple" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_BUTTON_PRESS_NORMAL, "GIMP_BUTTON_PRESS_NORMAL", NULL },
-    { GIMP_BUTTON_PRESS_DOUBLE, "GIMP_BUTTON_PRESS_DOUBLE", NULL },
-    { GIMP_BUTTON_PRESS_TRIPLE, "GIMP_BUTTON_PRESS_TRIPLE", NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpButtonPressType", values);
-      gimp_type_set_translation_context (type, "button-press-type");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
-GType
-gimp_button_release_type_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_BUTTON_RELEASE_NORMAL, "GIMP_BUTTON_RELEASE_NORMAL", "normal" },
-    { GIMP_BUTTON_RELEASE_CANCEL, "GIMP_BUTTON_RELEASE_CANCEL", "cancel" },
-    { GIMP_BUTTON_RELEASE_CLICK, "GIMP_BUTTON_RELEASE_CLICK", "click" },
-    { GIMP_BUTTON_RELEASE_NO_MOTION, "GIMP_BUTTON_RELEASE_NO_MOTION", "no-motion" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_BUTTON_RELEASE_NORMAL, "GIMP_BUTTON_RELEASE_NORMAL", NULL },
-    { GIMP_BUTTON_RELEASE_CANCEL, "GIMP_BUTTON_RELEASE_CANCEL", NULL },
-    { GIMP_BUTTON_RELEASE_CLICK, "GIMP_BUTTON_RELEASE_CLICK", NULL },
-    { GIMP_BUTTON_RELEASE_NO_MOTION, "GIMP_BUTTON_RELEASE_NO_MOTION", NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpButtonReleaseType", values);
-      gimp_type_set_translation_context (type, "button-release-type");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
-GType
 gimp_transform_handle_mode_get_type (void)
 {
   static const GEnumValue values[] =
diff --git a/app/tools/tools-enums.h b/app/tools/tools-enums.h
index f7b3ff1..25a0527 100644
--- a/app/tools/tools-enums.h
+++ b/app/tools/tools-enums.h
@@ -18,35 +18,11 @@
 #ifndef __TOOLS_ENUMS_H__
 #define __TOOLS_ENUMS_H__
 
+
 /*
  * these enums are registered with the type system
  */
 
-#define GIMP_TYPE_BUTTON_PRESS_TYPE (gimp_button_press_type_get_type ())
-
-GType gimp_button_press_type_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
-  GIMP_BUTTON_PRESS_NORMAL,
-  GIMP_BUTTON_PRESS_DOUBLE,
-  GIMP_BUTTON_PRESS_TRIPLE
-} GimpButtonPressType;
-
-
-#define GIMP_TYPE_BUTTON_RELEASE_TYPE (gimp_button_release_type_get_type ())
-
-GType gimp_button_release_type_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
-  GIMP_BUTTON_RELEASE_NORMAL,
-  GIMP_BUTTON_RELEASE_CANCEL,
-  GIMP_BUTTON_RELEASE_CLICK,
-  GIMP_BUTTON_RELEASE_NO_MOTION
-} GimpButtonReleaseType;
-
-
 #define GIMP_TYPE_TRANSFORM_HANDLE_MODE (gimp_transform_handle_mode_get_type ())
 
 GType gimp_transform_handle_mode_get_type (void) G_GNUC_CONST;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]