glib2.0/gobject/glib-enumtypes.c.template

48 lines
1023 B
Plaintext
Raw Normal View History

2022-06-29 16:02:05 +08:00
/*** BEGIN file-header ***/
#include "config.h"
#include "glib-enumtypes.h"
#include <glib-object.h>
2023-02-15 16:51:32 +08:00
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
2022-06-29 16:02:05 +08:00
/*** END file-header ***/
2023-02-15 16:51:32 +08:00
/*** BEGIN file-tail ***/
G_GNUC_END_IGNORE_DEPRECATIONS
/*** END file-tail ***/
2022-06-29 16:02:05 +08:00
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
2023-02-15 16:51:32 +08:00
2022-06-29 16:02:05 +08:00
/*** END file-production ***/
/*** BEGIN value-header ***/
GType
@enum_name@_get_type (void)
{
2023-02-15 16:51:32 +08:00
static gsize static_g_define_type_id = 0;
2022-06-29 16:02:05 +08:00
2023-02-15 16:51:32 +08:00
if (g_once_init_enter (&static_g_define_type_id))
2022-06-29 16:02:05 +08:00
{
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_define_type_id =
g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
2023-02-15 16:51:32 +08:00
g_once_init_leave (&static_g_define_type_id, g_define_type_id);
2022-06-29 16:02:05 +08:00
}
2023-02-15 16:51:32 +08:00
return static_g_define_type_id;
2022-06-29 16:02:05 +08:00
}
/*** END value-tail ***/