Commit 94380459 authored by Chun-wei Fan's avatar Chun-wei Fan

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
parent 4bfe7f1d
......@@ -22,6 +22,7 @@ girepo_HEADERS = \
girepository/gitypelib.h \
girepository/gitypes.h \
girepository/giunioninfo.h \
girepository/giversionmacros.h \
girepository/givfuncinfo.h
lib_LTLIBRARIES += libgirepository-1.0.la
......
......@@ -40,17 +40,41 @@ G_BEGIN_DECLS
#define GI_IS_ARG_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_ARG)
GI_AVAILABLE_IN_ALL
GIDirection g_arg_info_get_direction (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_arg_info_is_return_value (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_arg_info_is_optional (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_arg_info_is_caller_allocates (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_arg_info_may_be_null (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_arg_info_is_skip (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
GITransfer g_arg_info_get_ownership_transfer (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
GIScopeType g_arg_info_get_scope (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
gint g_arg_info_get_closure (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
gint g_arg_info_get_destroy (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * g_arg_info_get_type (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
void g_arg_info_load_type (GIArgInfo *info,
GITypeInfo *type);
G_END_DECLS
......
......@@ -66,23 +66,49 @@ typedef struct {
#define GI_TYPE_BASE_INFO (g_base_info_gtype_get_type ())
GI_AVAILABLE_IN_ALL
GType g_base_info_gtype_get_type (void) G_GNUC_CONST;
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_base_info_ref (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
void g_base_info_unref (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
GIInfoType g_base_info_get_type (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
const gchar * g_base_info_get_name (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
const gchar * g_base_info_get_namespace (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_base_info_is_deprecated (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
const gchar * g_base_info_get_attribute (GIBaseInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
gboolean g_base_info_iterate_attributes (GIBaseInfo *info,
GIAttributeIter *iterator,
char **name,
char **value);
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_base_info_get_container (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
GITypelib * g_base_info_get_typelib (GIBaseInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_base_info_equal (GIBaseInfo *info1,
GIBaseInfo *info2);
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_info_new (GIInfoType type,
GIBaseInfo *container,
GITypelib *typelib,
......
......@@ -43,26 +43,52 @@ G_BEGIN_DECLS
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_SIGNAL) || \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_VFUNC))
GI_AVAILABLE_IN_1_34
gboolean g_callable_info_is_method (GICallableInfo *info);
GI_AVAILABLE_IN_1_34
gboolean g_callable_info_can_throw_gerror (GICallableInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * g_callable_info_get_return_type (GICallableInfo *info);
GI_AVAILABLE_IN_ALL
void g_callable_info_load_return_type (GICallableInfo *info,
GITypeInfo *type);
GI_AVAILABLE_IN_ALL
const gchar * g_callable_info_get_return_attribute (GICallableInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
gboolean g_callable_info_iterate_return_attributes (GICallableInfo *info,
GIAttributeIter *iterator,
char **name,
char **value);
GI_AVAILABLE_IN_ALL
GITransfer g_callable_info_get_caller_owns (GICallableInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_callable_info_may_return_null (GICallableInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_callable_info_skip_return (GICallableInfo *info);
GI_AVAILABLE_IN_ALL
gint g_callable_info_get_n_args (GICallableInfo *info);
GI_AVAILABLE_IN_ALL
GIArgInfo * g_callable_info_get_arg (GICallableInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
void g_callable_info_load_arg (GICallableInfo *info,
gint n,
GIArgInfo *arg);
GI_AVAILABLE_IN_1_34
gboolean g_callable_info_invoke (GICallableInfo *info,
gpointer function,
const GIArgument *in_args,
......@@ -73,6 +99,8 @@ gboolean g_callable_info_invoke (GICallableInfo *info,
gboolean is_method,
gboolean throws,
GError **error);
GI_AVAILABLE_IN_1_42
GITransfer g_callable_info_get_instance_ownership_transfer (GICallableInfo *info);
G_END_DECLS
......
......@@ -40,9 +40,15 @@ G_BEGIN_DECLS
#define GI_IS_CONSTANT_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_CONSTANT)
GI_AVAILABLE_IN_ALL
GITypeInfo * g_constant_info_get_type (GIConstantInfo *info);
GI_AVAILABLE_IN_ALL
void g_constant_info_free_value(GIConstantInfo *info,
GIArgument *value);
GI_AVAILABLE_IN_ALL
gint g_constant_info_get_value(GIConstantInfo *info,
GIArgument *value);
G_END_DECLS
......
......@@ -50,15 +50,29 @@ G_BEGIN_DECLS
#define GI_IS_VALUE_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_VALUE)
GI_AVAILABLE_IN_ALL
gint g_enum_info_get_n_values (GIEnumInfo *info);
GI_AVAILABLE_IN_ALL
GIValueInfo * g_enum_info_get_value (GIEnumInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
gint g_enum_info_get_n_methods (GIEnumInfo *info);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_enum_info_get_method (GIEnumInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GITypeTag g_enum_info_get_storage_type (GIEnumInfo *info);
GI_AVAILABLE_IN_ALL
const gchar * g_enum_info_get_error_domain (GIEnumInfo *info);
GI_AVAILABLE_IN_ALL
gint64 g_value_info_get_value (GIValueInfo *info);
G_END_DECLS
......
......@@ -41,13 +41,25 @@ G_BEGIN_DECLS
#define GI_IS_FIELD_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_FIELD)
GI_AVAILABLE_IN_ALL
GIFieldInfoFlags g_field_info_get_flags (GIFieldInfo *info);
GI_AVAILABLE_IN_ALL
gint g_field_info_get_size (GIFieldInfo *info);
GI_AVAILABLE_IN_ALL
gint g_field_info_get_offset (GIFieldInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * g_field_info_get_type (GIFieldInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_field_info_get_field (GIFieldInfo *field_info,
gpointer mem,
GIArgument *value);
GI_AVAILABLE_IN_ALL
gboolean g_field_info_set_field (GIFieldInfo *field_info,
gpointer mem,
const GIArgument *value);
......
......@@ -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,
......
......@@ -40,31 +40,63 @@ G_BEGIN_DECLS
#define GI_IS_INTERFACE_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_INTERFACE)
GI_AVAILABLE_IN_ALL
gint g_interface_info_get_n_prerequisites (GIInterfaceInfo *info);
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_interface_info_get_prerequisite (GIInterfaceInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
gint g_interface_info_get_n_properties (GIInterfaceInfo *info);
GI_AVAILABLE_IN_ALL
GIPropertyInfo * g_interface_info_get_property (GIInterfaceInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
gint g_interface_info_get_n_methods (GIInterfaceInfo *info);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_interface_info_get_method (GIInterfaceInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_interface_info_find_method (GIInterfaceInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
gint g_interface_info_get_n_signals (GIInterfaceInfo *info);
GI_AVAILABLE_IN_ALL
GISignalInfo * g_interface_info_get_signal (GIInterfaceInfo *info,
gint n);
GI_AVAILABLE_IN_1_34
GISignalInfo * g_interface_info_find_signal (GIInterfaceInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
gint g_interface_info_get_n_vfuncs (GIInterfaceInfo *info);
GI_AVAILABLE_IN_ALL
GIVFuncInfo * g_interface_info_get_vfunc (GIInterfaceInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIVFuncInfo * g_interface_info_find_vfunc (GIInterfaceInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
gint g_interface_info_get_n_constants (GIInterfaceInfo *info);
GI_AVAILABLE_IN_ALL
GIConstantInfo * g_interface_info_get_constant (GIInterfaceInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIStructInfo * g_interface_info_get_iface_struct (GIInterfaceInfo *info);
G_END_DECLS
......
......@@ -77,60 +77,126 @@ typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);
#define GI_IS_OBJECT_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_OBJECT)
GI_AVAILABLE_IN_ALL
const gchar * g_object_info_get_type_name (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
const gchar * g_object_info_get_type_init (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_object_info_get_abstract (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_object_info_get_fundamental (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIObjectInfo * g_object_info_get_parent (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
gint g_object_info_get_n_interfaces (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIInterfaceInfo * g_object_info_get_interface (GIObjectInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
gint g_object_info_get_n_fields (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIFieldInfo * g_object_info_get_field (GIObjectInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
gint g_object_info_get_n_properties (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIPropertyInfo * g_object_info_get_property (GIObjectInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
gint g_object_info_get_n_methods (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_object_info_get_method (GIObjectInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_object_info_find_method (GIObjectInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_object_info_find_method_using_interfaces (GIObjectInfo *info,
const gchar *name,
GIObjectInfo **implementor);
GI_AVAILABLE_IN_ALL
gint g_object_info_get_n_signals (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GISignalInfo * g_object_info_get_signal (GIObjectInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GISignalInfo * g_object_info_find_signal (GIObjectInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
gint g_object_info_get_n_vfuncs (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIVFuncInfo * g_object_info_get_vfunc (GIObjectInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIVFuncInfo * g_object_info_find_vfunc (GIObjectInfo *info,
const gchar *name);
GI_AVAILABLE_IN_1_32
GIVFuncInfo * g_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
const gchar *name,
GIObjectInfo **implementor);
GI_AVAILABLE_IN_ALL
gint g_object_info_get_n_constants (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIConstantInfo * g_object_info_get_constant (GIObjectInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIStructInfo * g_object_info_get_class_struct (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
const char * g_object_info_get_ref_function (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIObjectInfoRefFunction g_object_info_get_ref_function_pointer (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
const char * g_object_info_get_unref_function (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIObjectInfoUnrefFunction g_object_info_get_unref_function_pointer (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
const char * g_object_info_get_set_value_function (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIObjectInfoSetValueFunction g_object_info_get_set_value_function_pointer (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
const char * g_object_info_get_get_value_function (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL
GIObjectInfoGetValueFunction g_object_info_get_get_value_function_pointer (GIObjectInfo *info);
......
......@@ -40,8 +40,14 @@ G_BEGIN_DECLS
#define GI_IS_PROPERTY_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_PROPERTY)
GI_AVAILABLE_IN_ALL
GParamFlags g_property_info_get_flags (GIPropertyInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * g_property_info_get_type (GIPropertyInfo *info);
GI_AVAILABLE_IN_ALL
GITransfer g_property_info_get_ownership_transfer (GIPropertyInfo *info);
G_END_DECLS
......
......@@ -48,8 +48,13 @@ G_BEGIN_DECLS
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_UNION) || \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_BOXED))
GI_AVAILABLE_IN_ALL
const gchar * g_registered_type_info_get_type_name (GIRegisteredTypeInfo *info);
GI_AVAILABLE_IN_ALL
const gchar * g_registered_type_info_get_type_init (GIRegisteredTypeInfo *info);
GI_AVAILABLE_IN_ALL
GType g_registered_type_info_get_g_type (GIRegisteredTypeInfo *info);
G_END_DECLS
......
......@@ -45,6 +45,7 @@
#include <gitypelib.h>
#include <gitypes.h>
#include <giunioninfo.h>
#include <giversionmacros.h>
#include <givfuncinfo.h>
G_BEGIN_DECLS
......@@ -92,57 +93,99 @@ typedef enum
/* Repository */
GI_AVAILABLE_IN_ALL
GType g_irepository_get_type (void) G_GNUC_CONST;
GI_AVAILABLE_IN_ALL
GIRepository *g_irepository_get_default (void);
GI_AVAILABLE_IN_ALL
void g_irepository_prepend_search_path (const char *directory);
GI_AVAILABLE_IN_1_36
void g_irepository_prepend_library_path (const char *directory);
GI_AVAILABLE_IN_ALL
GSList * g_irepository_get_search_path (void);
GI_AVAILABLE_IN_ALL
const char * g_irepository_load_typelib (GIRepository *repository,
GITypelib *typelib,
GIRepositoryLoadFlags flags,
GError **error);
GI_AVAILABLE_IN_ALL
gboolean g_irepository_is_registered (GIRepository *repository,
const gchar *namespace_,
const gchar *version);
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_irepository_find_by_name (GIRepository *repository,
const gchar *namespace_,
const gchar *name);
GI_AVAILABLE_IN_ALL
GList * g_irepository_enumerate_versions (GIRepository *repository,
const gchar *namespace_);
GI_AVAILABLE_IN_ALL
GITypelib * g_irepository_require (GIRepository *repository,
const gchar *namespace_,
const gchar *version,
GIRepositoryLoadFlags flags,
GError **error);
GI_AVAILABLE_IN_ALL
GITypelib * g_irepository_require_private (GIRepository *repository,
const gchar *typelib_dir,
const gchar *namespace_,
const gchar *version,
GIRepositoryLoadFlags flags,
GError **error);
GI_AVAILABLE_IN_ALL
gchar ** g_irepository_get_dependencies (GIRepository *repository,
const gchar *namespace_);
GI_AVAILABLE_IN_ALL
gchar ** g_irepository_get_loaded_namespaces (GIRepository *repository);
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_irepository_find_by_gtype (GIRepository *repository,
GType gtype);
GI_AVAILABLE_IN_ALL
gint g_irepository_get_n_infos (GIRepository *repository,
const gchar *namespace_);
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_irepository_get_info (GIRepository *repository,
const gchar *namespace_,
gint index);
GI_AVAILABLE_IN_ALL
GIEnumInfo * g_irepository_find_by_error_domain (GIRepository *repository,
GQuark domain);
GI_AVAILABLE_IN_ALL
const gchar * g_irepository_get_typelib_path (GIRepository *repository,
const gchar *namespace_);
GI_AVAILABLE_IN_ALL
const gchar * g_irepository_get_shared_library (GIRepository *repository,
const gchar *namespace_);
GI_AVAILABLE_IN_ALL
const gchar * g_irepository_get_c_prefix (GIRepository *repository,
const gchar *namespace_);
GI_AVAILABLE_IN_ALL
const gchar * g_irepository_get_version (GIRepository *repository,
const gchar *namespace_);
GI_AVAILABLE_IN_ALL
GOptionGroup * g_irepository_get_option_group (void);
GI_AVAILABLE_IN_ALL
gboolean g_irepository_dump (const char *arg, GError **error);
/**
......@@ -175,11 +218,13 @@ typedef enum
*/
#define G_IREPOSITORY_ERROR (g_irepository_error_quark ())
GI_AVAILABLE_IN_ALL
GQuark g_irepository_error_quark (void);
/* Global utility functions */
GI_AVAILABLE_IN_ALL
void gi_cclosure_marshal_generic (GClosure *closure,
GValue *return_gvalue,
guint n_param_values,
......
......@@ -64,30 +64,38 @@ struct _GIFunctionInvoker {
*/
typedef GIArgument GIFFIReturnValue;
GI_AVAILABLE_IN_ALL
ffi_type * gi_type_tag_get_ffi_type (GITypeTag type_tag, gboolean is_pointer);
GI_AVAILABLE_IN_ALL
ffi_type * g_type_info_get_ffi_type (GITypeInfo *info);
GI_AVAILABLE_IN_1_32
void gi_type_info_extract_ffi_return_value (GITypeInfo *return_info,
GIFFIReturnValue *ffi_value,
GIArgument *arg);
GI_AVAILABLE_IN_ALL
gboolean g_function_info_prep_invoker (GIFunctionInfo *info,
GIFunctionInvoker *invoker,
GError **error);
GI_AVAILABLE_IN_1_32
gboolean g_function_invoker_new_for_address (gpointer addr,
GICallableInfo *info,
GIFunctionInvoker *invoker,
GError **error);
GI_AVAILABLE_IN_ALL
void g_function_invoker_destroy (GIFunctionInvoker *invoker);
GI_AVAILABLE_IN_ALL
ffi_closure * g_callable_info_prepare_closure (GICallableInfo *callable_info,
ffi_cif *cif,
GIFFIClosureCallback callback,
gpointer user_data);
GI_AVAILABLE_IN_ALL
void g_callable_info_free_closure (GICallableInfo *callable_info,
ffi_closure *closure);
......
......@@ -41,8 +41,14 @@ G_BEGIN_DECLS
#define GI_IS_SIGNAL_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_SIGNAL)
GI_AVAILABLE_IN_ALL
GSignalFlags g_signal_info_get_flags (GISignalInfo *info);
GI_AVAILABLE_IN_ALL
GIVFuncInfo * g_signal_info_get_class_closure (GISignalInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_signal_info_true_stops_emit (GISignalInfo *info);
G_END_DECLS
......
......@@ -40,17 +40,35 @@ G_BEGIN_DECLS
#define GI_IS_STRUCT_INFO(info) \
(g_base_info_get_type((GIBaseInfo*)info) == GI_INFO_TYPE_STRUCT)
GI_AVAILABLE_IN_ALL
gint g_struct_info_get_n_fields (GIStructInfo *info);
GI_AVAILABLE_IN_ALL
GIFieldInfo * g_struct_info_get_field (GIStructInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
gint g_struct_info_get_n_methods (GIStructInfo *info);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_struct_info_get_method (GIStructInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIFunctionInfo * g_struct_info_find_method (GIStructInfo *info,
const gchar *name);
GI_AVAILABLE_IN_ALL
gsize g_struct_info_get_size (GIStructInfo *info);
GI_AVAILABLE_IN_ALL
gsize g_struct_info_get_alignment (GIStructInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_struct_info_is_gtype_struct (GIStructInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_struct_info_is_foreign (GIStructInfo *info);
G_END_DECLS
......
......@@ -48,17 +48,36 @@ G_BEGIN_DECLS
*/
#define G_TYPE_TAG_IS_BASIC(tag) (tag < GI_TYPE_TAG_ARRAY || tag == GI_TYPE_TAG_UNICHAR)
GI_AVAILABLE_IN_ALL
const gchar* g_type_tag_to_string (GITypeTag type);
GI_AVAILABLE_IN_ALL
const gchar* g_info_type_to_string (GIInfoType type);
GI_AVAILABLE_IN_ALL
gboolean g_type_info_is_pointer (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
GITypeTag g_type_info_get_tag (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * g_type_info_get_param_type (GITypeInfo *info,
gint n);
GI_AVAILABLE_IN_ALL
GIBaseInfo * g_type_info_get_interface (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
gint g_type_info_get_array_length (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
gint g_type_info_get_array_fixed_size(GITypeInfo *info);
GI_AVAILABLE_IN_ALL
gboolean g_type_info_is_zero_terminated (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
GIArrayType g_type_info_get_array_type (GITypeInfo *info);
G_END_DECLS
......
......@@ -1217,6 +1217,8 @@ DirEntry *g_typelib_get_dir_entry_by_error_domain (GITypelib *typelib,
gboolean g_typelib_matches_gtype_name_prefix (GITypelib *typelib,
const gchar *gtype_name);