summaryrefslogtreecommitdiff
path: root/src/mp-enums.c.template
diff options
context:
space:
mode:
Diffstat (limited to 'src/mp-enums.c.template')
-rw-r--r--src/mp-enums.c.template36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mp-enums.c.template b/src/mp-enums.c.template
new file mode 100644
index 0000000..d10ea75
--- /dev/null
+++ b/src/mp-enums.c.template
@@ -0,0 +1,36 @@
+/*** BEGIN file-header ***/
+#include "mp-serializer.h"
+#include "mp-enums.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+math_@enum_name@_get_type (void)
+{
+ static GType etype = 0;
+ if (G_UNLIKELY(etype == 0)) {
+ static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+ etype = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
+ }
+ return etype;
+}
+
+/*** END value-tail ***/
+
+/*** BEGIN file-tail ***/
+
+/*** END file-tail ***/