summaryrefslogtreecommitdiff
path: root/atk/atk-enum-types.h.template
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-20 15:33:43 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-22 13:28:54 +0100
commitcc0e04b1d17c42fd2dad32358de9f6a3af04eac8 (patch)
treec8f80257033b4e300b0386715ddc984dd362bcab /atk/atk-enum-types.h.template
parent60d7145c68a90e6d6aae4b50e20a50ce49d3052a (diff)
downloadat-spi2-core-cc0e04b1d17c42fd2dad32358de9f6a3af04eac8.tar.gz
build: Use template files for the ATK enumerations
Placing the enumeration GType inline in the Makefile makes them unreadable, and does not allow to easily update the body of the get_type() functions. Case in point: ATK still generates thread-unsafe versions of the enumeration and flags GTypes. Let's update the build to something more idiomatic, and use template files, like every other G* library does.
Diffstat (limited to 'atk/atk-enum-types.h.template')
-rw-r--r--atk/atk-enum-types.h.template30
1 files changed, 30 insertions, 0 deletions
diff --git a/atk/atk-enum-types.h.template b/atk/atk-enum-types.h.template
new file mode 100644
index 00000000..7b4cec4b
--- /dev/null
+++ b/atk/atk-enum-types.h.template
@@ -0,0 +1,30 @@
+/*** BEGIN file-header ***/
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#ifndef __ATK_ENUM_TYPES_H__
+#define __ATK_ENUM_TYPES_H__
+
+#include <atk/atkversion.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+ATK_AVAILABLE_IN_ALL
+GType @enum_name@_get_type (void);
+#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* __ATK_ENUM_TYPES_H__ */
+/*** END file-tail ***/