[gtk-doc] test: add a second enum to test merging of hierarchies



commit 728cefa6006988ae2b779dbe8cafa9042a6895f2
Author: Stefan Sauer <ensonic users sf net>
Date:   Sat Feb 15 14:21:05 2014 +0100

    test: add a second enum to test merging of hierarchies

 tests/gobject/docs-tmpl/tester-sections.txt |    3 +++
 tests/gobject/docs/tester-sections.txt      |    3 +++
 tests/gobject/src/gtypes.c                  |   13 +++++++++++++
 tests/gobject/src/gtypes.h                  |   14 ++++++++++++++
 4 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/tests/gobject/docs-tmpl/tester-sections.txt b/tests/gobject/docs-tmpl/tester-sections.txt
index 250217f..881bf96 100644
--- a/tests/gobject/docs-tmpl/tester-sections.txt
+++ b/tests/gobject/docs-tmpl/tester-sections.txt
@@ -63,12 +63,15 @@ gtkdoc_iface2_get_type
 <SECTION>
 <FILE>types</FILE>
 GtkdocEnum
+GtkdocEnum2
 GtkdocPlainOldData
 GtkdocBoxedPlainOldData
 <SUBSECTION Standard>
 GTKDOC_TYPE_ENUM
+GTKDOC_TYPE_ENUM2
 GTKDOC_TYPE_BOXED
 gtkdoc_enum_get_type
+gtkdoc_enum2_get_type
 gtkdoc_boxed_get_type
 GTKDOC_TYPE_BOXED_PLAIN_OLD_DATA
 gtkdoc_boxed_plain_old_data_get_type
diff --git a/tests/gobject/docs/tester-sections.txt b/tests/gobject/docs/tester-sections.txt
index 250217f..881bf96 100644
--- a/tests/gobject/docs/tester-sections.txt
+++ b/tests/gobject/docs/tester-sections.txt
@@ -63,12 +63,15 @@ gtkdoc_iface2_get_type
 <SECTION>
 <FILE>types</FILE>
 GtkdocEnum
+GtkdocEnum2
 GtkdocPlainOldData
 GtkdocBoxedPlainOldData
 <SUBSECTION Standard>
 GTKDOC_TYPE_ENUM
+GTKDOC_TYPE_ENUM2
 GTKDOC_TYPE_BOXED
 gtkdoc_enum_get_type
+gtkdoc_enum2_get_type
 gtkdoc_boxed_get_type
 GTKDOC_TYPE_BOXED_PLAIN_OLD_DATA
 gtkdoc_boxed_plain_old_data_get_type
diff --git a/tests/gobject/src/gtypes.c b/tests/gobject/src/gtypes.c
index 2e75e5f..4a24a8a 100644
--- a/tests/gobject/src/gtypes.c
+++ b/tests/gobject/src/gtypes.c
@@ -28,6 +28,19 @@ GType gtkdoc_enum_get_type (void) {
   return type;
 }
 
+GType gtkdoc_enum2_get_type (void) {
+  static GType type = 0;
+  if(type==0) {
+    static const GEnumValue values[] = {
+      { GTKDOC_ENUM2_V1,          "GTKDOC_ENUM2_V1",          "first" },
+      { GTKDOC_ENUM2_V2,          "GTKDOC_ENUM2_V2",          "second" },
+      { 0, NULL, NULL},
+    };
+    type = g_enum_register_static ("GtkdocEnum2", values);
+  }
+  return type;
+}
+
 /* boxed: class internals */
 
 static gpointer gtkdoc_boxed_copy (gpointer boxed) {
diff --git a/tests/gobject/src/gtypes.h b/tests/gobject/src/gtypes.h
index 8550f7d..f826c38 100644
--- a/tests/gobject/src/gtypes.h
+++ b/tests/gobject/src/gtypes.h
@@ -7,6 +7,7 @@
 /* type macros */
 
 #define GTKDOC_TYPE_ENUM              (gtkdoc_enum_get_type ())
+#define GTKDOC_TYPE_ENUM2             (gtkdoc_enum2_get_type ())
 #define GTKDOC_TYPE_BOXED             (gtkdoc_boxed_get_type ())
 
 /**
@@ -24,7 +25,20 @@ typedef enum {
   GTKDOC_ENUM_V3
 } GtkdocEnum;
 
+/**
+ * GtkdocEnum2:
+ * @GTKDOC_ENUM2_V1: first
+ * @GTKDOC_ENUM2_V2: second
+ *
+ * Enum values for the #GtkdocEnum2 type.
+ */
+typedef enum {
+  GTKDOC_ENUM2_V1=0,
+  GTKDOC_ENUM2_V2,
+} GtkdocEnum2;
+
 GType  gtkdoc_enum_get_type(void) G_GNUC_CONST;
+GType  gtkdoc_enum2_get_type(void) G_GNUC_CONST;
 GType  gtkdoc_boxed_get_type(void) G_GNUC_CONST;
 
 


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