aboutsummaryrefslogtreecommitdiff
path: root/core/src/turns-enums.c.in
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-05-12 13:10:48 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-05-12 13:10:48 +0200
commit45ef4948db670224c7cc727507f84924bd826002 (patch)
tree45ab5e37a3cb062f4276e8b1456cb5397e58eddc /core/src/turns-enums.c.in
parentcf6951bbfe99bf494f22c1b1d02fb6a8f45e73a9 (diff)
downloadturns-45ef4948db670224c7cc727507f84924bd826002.tar.xz
turns-45ef4948db670224c7cc727507f84924bd826002.zip
core: begin c-style API
Diffstat (limited to 'core/src/turns-enums.c.in')
-rw-r--r--core/src/turns-enums.c.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/core/src/turns-enums.c.in b/core/src/turns-enums.c.in
new file mode 100644
index 0000000..adef39b
--- /dev/null
+++ b/core/src/turns-enums.c.in
@@ -0,0 +1,37 @@
+/*** BEGIN file-header ***/
+#include "turns/turns-enums.h"
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@basename@" */
+#include "turns/@basename@"
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+@enum_name@_get_type (void)
+{
+ static gsize static_g_@type@_type_id;
+
+ if (g_once_init_enter (&static_g_@type@_type_id))
+ {
+ static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+
+ GType g_@type@_type_id =
+ g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
+
+ g_once_init_leave (&static_g_@type@_type_id, g_@type@_type_id);
+ }
+ return static_g_@type@_type_id;
+}
+
+/*** END value-tail ***/