diff options
Diffstat (limited to '')
-rw-r--r-- | src/nautilus-enum-types.c.template | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/nautilus-enum-types.c.template b/src/nautilus-enum-types.c.template new file mode 100644 index 0000000..9d8ac83 --- /dev/null +++ b/src/nautilus-enum-types.c.template @@ -0,0 +1,37 @@ +/*** BEGIN file-header ***/ +#include "nautilus-enum-types.h" + +/*** END file-header ***/ + +/*** BEGIN file-production ***/ +/* Enumerations from "@filename@" */ +#include "@filename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type (void) +{ + static GType type_once = 0; + + if (g_once_init_enter (&type_once)) + { + 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 type = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); + + g_once_init_leave (&type_once, type); + } + + return type_once; +} + +/*** END value-tail ***/ |