mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
gtk: Use gnome.mkenums_simple
This lets us avoid template files, and works just as well.
This commit is contained in:
parent
455eefa854
commit
11829fe7d0
@ -1,42 +0,0 @@
|
||||
/*** BEGIN file-header ***/
|
||||
#include "config.h"
|
||||
#include "gtk.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* enumerations from "@basename@" */
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
GType
|
||||
@enum_name@_get_type (void)
|
||||
{
|
||||
static gsize g_define_type_id__volatile = 0;
|
||||
|
||||
if (g_once_init_enter (&g_define_type_id__volatile))
|
||||
{
|
||||
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);
|
||||
g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
|
||||
}
|
||||
|
||||
return g_define_type_id__volatile;
|
||||
}
|
||||
|
||||
/*** END value-tail ***/
|
||||
|
||||
/*** BEGIN file-tail ***/
|
||||
|
||||
/*** END file-tail ***/
|
@ -1,29 +0,0 @@
|
||||
/*** BEGIN file-header ***/
|
||||
#ifndef __GTK_TYPE_BUILTINS_H__
|
||||
#define __GTK_TYPE_BUILTINS_H__
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
|
||||
/* enumerations from "@basename@" */
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
GDK_AVAILABLE_IN_ALL GType @enum_name@_get_type (void) G_GNUC_CONST;
|
||||
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
|
||||
/*** END value-header ***/
|
||||
|
||||
/*** BEGIN file-tail ***/
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_TYPE_BUILTINS_H__ */
|
||||
/*** END file-tail ***/
|
@ -1031,10 +1031,11 @@ gtkmarshalers = gnome.genmarshal('gtkmarshalers',
|
||||
|
||||
gtkmarshal_h = gtkmarshalers[1]
|
||||
|
||||
gtktypebuiltins = gnome.mkenums('gtktypebuiltins',
|
||||
gtktypebuiltins = gnome.mkenums_simple('gtktypebuiltins',
|
||||
sources: gtk_public_headers + gtk_deprecated_headers,
|
||||
c_template: 'gtktypebuiltins.c.template',
|
||||
h_template: 'gtktypebuiltins.h.template',
|
||||
decorator: 'GDK_AVAILABLE_IN_ALL',
|
||||
body_prefix: '#include "config.h"',
|
||||
header_prefix: '#include <gdk/gdk.h>',
|
||||
install_dir: gtk_includedir / 'gtk-4.0/gtk',
|
||||
install_header: true,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user