gstreamer/gst/gstenumtypes.c.template
Tim-Philipp Müller 21d3f9a0e4 meson: use gnome.mkenums() with template files for enum file gen
Saves us a custom script. Template files are nicer than passing
multiline templating stuff through to glib-mkenums. And we can
get rid of our custom python script.
2016-12-22 11:35:04 +00:00

42 lines
842 B
Plaintext

/*** BEGIN file-header ***/
#include "gst/gst_private.h"
#include <gst/gst.h>
#define C_ENUM(v) ((gint) v)
#define C_FLAGS(v) ((guint) v)
/*** END file-header ***/
/*** BEGIN file-production ***/
/* enumerations from "@basename@" */
/*** END file-production ***/
/*** BEGIN value-header ***/
GType
@enum_name@_get_type (void)
{
static gsize id = 0;
static const G@Type@Value values[] = {
/*** END value-header ***/
/*** BEGIN value-production ***/
{ C_@TYPE@(@VALUENAME@), "@VALUENAME@", "@valuenick@" },
/*** END value-production ***/
/*** BEGIN value-tail ***/
{ 0, NULL, NULL }
};
if (g_once_init_enter (&id)) {
GType tmp = g_@type@_register_static ("@EnumName@", values);
g_once_init_leave (&id, tmp);
}
return (GType) id;
}
/*** END value-tail ***/
/*** BEGIN file-tail ***/
/*** END file-tail ***/