Commit a2792beb authored by Guido Gunther's avatar Guido Gunther
Browse files

Add enum generation via glib-mkenums

parent fdfe6faa
/*** BEGIN file-header ***/
#include "config.h"
#include "hdy-enums.h"
/*** END file-header ***/
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
/*** END file-production ***/
/*** BEGIN value-header ***/
GType
@enum_name@_get_type (void)
{
static GType etype = 0;
if (G_UNLIKELY(etype == 0)) {
static const G@Type@Value values[] = {
/*** END value-header ***/
/*** BEGIN value-production ***/
{ @VALUENAME@, "@VALUENAME@", "@valuenick@" },
/*** END value-production ***/
/*** BEGIN value-tail ***/
{ 0, NULL, NULL }
};
etype = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
}
return etype;
}
/*** END value-tail ***/
/*** BEGIN file-tail ***/
/*** END file-tail ***/
/*** BEGIN file-header ***/
#ifndef HDY_ENUMS_H
#define HDY_ENUMS_H
#if !defined(HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif
#include <glib-object.h>
G_BEGIN_DECLS
/*** END file-header ***/
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
/*** END file-production ***/
/*** BEGIN value-header ***/
GType @enum_name@_get_type (void);
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
/*** END value-header ***/
/*** BEGIN file-tail ***/
G_END_DECLS
#endif /* __DZL_ENUMS_H__ */
/*** END file-tail ***/
......@@ -33,6 +33,17 @@ libhandy_public_headers = []
libhandy_public_sources = []
libhandy_private_sources = []
hdy_enums = gnome.mkenums('hdy-enums',
h_template: 'hdy-enums.h.in',
c_template: 'hdy-enums.c.in',
sources: hdy_enum_headers,
install_header: true,
install_dir: libhandy_header_dir,
)
libhandy_public_sources += [hdy_enums[0]]
libhandy_generated_headers += [hdy_enums[1]]
src_headers = [
'hdy-dialer-button.h',
'hdy-dialer-cycle-button.h',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment