diff --git a/src/meson.build b/src/meson.build index 1e88bf5d5..3e5557351 100644 --- a/src/meson.build +++ b/src/meson.build @@ -182,10 +182,8 @@ if enable_recorder endif -libshell_enums = gnome.mkenums('shell-enum-types', - sources: libshell_public_headers, - c_template: 'shell-enum-types.c.in', - h_template: 'shell-enum-types.h.in' +libshell_enums = gnome.mkenums_simple('shell-enum-types', + sources: libshell_public_headers ) libshell_gir_sources = [ diff --git a/src/shell-enum-types.c.in b/src/shell-enum-types.c.in deleted file mode 100644 index b350d0016..000000000 --- a/src/shell-enum-types.c.in +++ /dev/null @@ -1,30 +0,0 @@ -/*** BEGIN file-header ***/ -#include "shell-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 enum_type_id = 0; - if (G_UNLIKELY (!enum_type_id)) - { - static const G@Type@Value values[] = { -/*** END value-header ***/ - -/*** BEGIN value-production ***/ - { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, -/*** END value-production ***/ - -/*** BEGIN value-tail ***/ - { 0, NULL, NULL } - }; - enum_type_id = g_@type@_register_static("@EnumName@", values); - } - return enum_type_id; -} -/*** END value-tail ***/ diff --git a/src/shell-enum-types.h.in b/src/shell-enum-types.h.in deleted file mode 100644 index a6aea7d17..000000000 --- a/src/shell-enum-types.h.in +++ /dev/null @@ -1,25 +0,0 @@ -/*** BEGIN file-header ***/ -#ifndef __SHELL_ENUM_TYPES_H__ -#define __SHELL_ENUM_TYPES_H__ - -#include - -G_BEGIN_DECLS - -/*** END file-header ***/ - -/*** BEGIN file-production ***/ -/* enumerations from "@filename@" */ -/*** END file-production ***/ - -/*** BEGIN file-tail ***/ -G_END_DECLS - -#endif /* !__SHELL_ENUM_TYPES_H__ */ -/*** END file-tail ***/ - -/*** BEGIN value-header ***/ -GType @enum_name@_get_type (void) G_GNUC_CONST; -#define SHELL_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) - -/*** END value-header ***/ diff --git a/src/st/meson.build b/src/st/meson.build index 46378a2f1..fa9d6bbf4 100644 --- a/src/st/meson.build +++ b/src/st/meson.build @@ -82,10 +82,12 @@ st_sources = [ 'st-widget.c' ] -st_enums = gnome.mkenums('st-enum-types', +st_enums = gnome.mkenums_simple('st-enum-types', sources: st_headers, - c_template: 'st-enum-types.c.in', - h_template: 'st-enum-types.h.in' + header_prefix: ''' +#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) +#error "Only can be included directly.h" +#endif''' ) st_gir_sources = st_sources + st_private_headers + st_headers + st_enums diff --git a/src/st/st-enum-types.c.in b/src/st/st-enum-types.c.in deleted file mode 100644 index bf0c54470..000000000 --- a/src/st/st-enum-types.c.in +++ /dev/null @@ -1,33 +0,0 @@ -/*** BEGIN file-header ***/ -#ifndef ST_COMPILATION -#define ST_COMPILATION -#endif -#include "st-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 enum_type_id = 0; - if (G_UNLIKELY (!enum_type_id)) - { - static const G@Type@Value values[] = { -/*** END value-header ***/ - -/*** BEGIN value-production ***/ - { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, -/*** END value-production ***/ - -/*** BEGIN value-tail ***/ - { 0, NULL, NULL } - }; - enum_type_id = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); - } - return enum_type_id; -} -/*** END value-tail ***/ diff --git a/src/st/st-enum-types.h.in b/src/st/st-enum-types.h.in deleted file mode 100644 index b3dd0e74e..000000000 --- a/src/st/st-enum-types.h.in +++ /dev/null @@ -1,29 +0,0 @@ -/*** BEGIN file-header ***/ -#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) -#error "Only can be included directly.h" -#endif - -#ifndef __ST_ENUM_TYPES_H__ -#define __ST_ENUM_TYPES_H__ - -#include - -G_BEGIN_DECLS - -/*** END file-header ***/ - -/*** BEGIN file-production ***/ -/* enumerations from "@filename@" */ -/*** END file-production ***/ - -/*** BEGIN file-tail ***/ -G_END_DECLS - -#endif /* !__ST_ENUM_TYPES_H__ */ -/*** END file-tail ***/ - -/*** BEGIN value-header ***/ -GType @enum_name@_get_type (void) G_GNUC_CONST; -#define ST_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) - -/*** END value-header ***/