diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-05-20 15:33:43 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-05-22 13:28:54 +0100 |
commit | cc0e04b1d17c42fd2dad32358de9f6a3af04eac8 (patch) | |
tree | c8f80257033b4e300b0386715ddc984dd362bcab /atk/atk-enum-types.h.template | |
parent | 60d7145c68a90e6d6aae4b50e20a50ce49d3052a (diff) | |
download | at-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.template | 30 |
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 ***/ |