girepository: Add Header for Version Macros

This adds a header to the girepository library, which is then included
either directly or indirectly by the other headers so that all the public
symbols (and the 2 symbols in gitypelib-internal.h used by the tools) are
decorated by a macro, that can later be used to export the symbols and also
to be used to display compile-time warnings for usage of deprecated APIs,
which is like what is now being done in GLib (and GTK+, Clutter, and so
on).

This marks the first step that we begin to stop depending on the .symbols/
.def files to export the symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=732669
This commit is contained in:
Chun-wei Fan
2014-07-04 18:18:32 +08:00
parent adc6f08ff7
commit 265ea792c1
22 changed files with 505 additions and 0 deletions

View File

@@ -40,9 +40,17 @@ G_BEGIN_DECLS
#define GI_IS_FUNCTION_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_FUNCTION)
GI_AVAILABLE_IN_ALL
const gchar * g_function_info_get_symbol (GIFunctionInfo *info);
GI_AVAILABLE_IN_ALL
GIFunctionInfoFlags g_function_info_get_flags (GIFunctionInfo *info);
GI_AVAILABLE_IN_ALL
GIPropertyInfo * g_function_info_get_property (GIFunctionInfo *info);
GI_AVAILABLE_IN_ALL
GIVFuncInfo * g_function_info_get_vfunc (GIFunctionInfo *info);
/**
@@ -51,6 +59,8 @@ GIVFuncInfo * g_function_info_get_vfunc (GIFunctionInfo *info);
* TODO
*/
#define G_INVOKE_ERROR (g_invoke_error_quark ())
GI_AVAILABLE_IN_ALL
GQuark g_invoke_error_quark (void);
/**
@@ -72,6 +82,8 @@ typedef enum
G_INVOKE_ERROR_ARGUMENT_MISMATCH
} GInvokeError;
GI_AVAILABLE_IN_ALL
gboolean g_function_info_invoke (GIFunctionInfo *info,
const GIArgument *in_args,
int n_in_args,