forked from AuroraMiddleware/gtk
Revert "gtk: Use gnome.mkenums_simple"
This reverts commit 11829fe7d0
.
The mkenums_simple function can't properly handle headers
in subdirectories currently, so go back to the template
version.
This commit is contained in:
parent
e17e94d2da
commit
adfc29968a
42
gtk/gtktypebuiltins.c.template
Normal file
42
gtk/gtktypebuiltins.c.template
Normal file
@ -0,0 +1,42 @@
|
||||
/*** 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 ***/
|
29
gtk/gtktypebuiltins.h.template
Normal file
29
gtk/gtktypebuiltins.h.template
Normal file
@ -0,0 +1,29 @@
|
||||
/*** 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,11 +1031,10 @@ gtkmarshalers = gnome.genmarshal('gtkmarshalers',
|
||||
|
||||
gtkmarshal_h = gtkmarshalers[1]
|
||||
|
||||
gtktypebuiltins = gnome.mkenums_simple('gtktypebuiltins',
|
||||
gtktypebuiltins = gnome.mkenums('gtktypebuiltins',
|
||||
sources: gtk_public_headers + gtk_deprecated_headers,
|
||||
decorator: 'GDK_AVAILABLE_IN_ALL',
|
||||
body_prefix: '#include "config.h"',
|
||||
header_prefix: '#include <gdk/gdk.h>',
|
||||
c_template: 'gtktypebuiltins.c.template',
|
||||
h_template: 'gtktypebuiltins.h.template',
|
||||
install_dir: gtk_includedir / 'gtk-4.0/gtk',
|
||||
install_header: true,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user