Templates for enum registration
[platform/upstream/glib.git] / gio / gioenumtypes.c.template
1 /*** BEGIN file-header ***/
2 #include <gio.h>
3 #include "gioalias.h"
4
5 /*** END file-header ***/
6
7 /*** BEGIN file-production ***/
8 /* enumerations from "@filename@" */
9 /*** END file-production ***/
10
11 /*** BEGIN value-header ***/
12 GType
13 @enum_name@_get_type (void)
14 {
15     static GType etype = 0;
16
17     if (G_UNLIKELY(etype == 0)) {
18         static const G@Type@Value values[] = {
19 /*** END value-header ***/
20
21 /*** BEGIN value-production ***/
22             { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
23 /*** END value-production ***/
24
25 /*** BEGIN value-tail ***/
26             { 0, NULL, NULL }
27         };
28         etype = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
29     }
30     return etype;
31 }
32
33 /*** END value-tail ***/
34
35 /*** BEGIN file-tail ***/
36 #define __GIO_ENUM_TYPES_C__
37 #include "gioaliasdef.c"
38 /*** END file-tail ***/