Represents an argument.
Represents a callable, either #GIFunctionInfo, #GICallbackInfo or
#GIVFuncInfo.
Represents a callback, eg arguments and return value.
Represents a constant.
Represents an enum or a flag.
Represents a field of a #GIStructInfo or a #GIUnionInfo.
Represents a function, eg arguments and return value.
Represents an interface.
Represents an object.
Represents a property of a #GIObjectInfo or a #GIInterfaceInfo.
Represent a registered type.
Represents a signal.
Represents a struct.
Represents type information, direction, transfer etc.
Represents a union.
Represents a virtual function.
Represents a enum value of a #GIEnumInfo.
Stores an argument of varying type
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
The type of array in a #GITypeInfo.
a C array, char[] for instance
a @GArray array
a #GPtrArray array
a #GByteArray array
An opaque structure used to iterate over attributes
in a #GIBaseInfo struct.
GIBaseInfo is the common base struct of all other *Info structs
accessible through the #GIRepository API.
All other structs can be casted to a #GIBaseInfo, for instance:
<example>
<title>Casting a #GIFunctionInfo to #GIBaseInfo</title>
<programlisting>
GIFunctionInfo *function_info = ...;
GIBaseInfo *info = (GIBaseInfo*)function_info;
</programlisting>
</example>
Most #GIRepository APIs returning a #GIBaseInfo is actually creating a new struct, in other
words, g_base_info_unref() has to be called when done accessing the data.
GIBaseInfos are normally accessed by calling either
g_irepository_find_by_name(), g_irepository_find_by_gtype() or g_irepository_get_info().
<example>
<title>Getting the Button of the Gtk typelib</title>
<programlisting>
GIBaseInfo *button_info = g_irepository_find_by_name(NULL, "Gtk", "Button");
... use button_info ...
g_base_info_unref(button_info);
</programlisting>
</example>
<refsect1 id="gi-gibaseinfo.struct-hierarchy" role="struct_hierarchy">
<title role="struct_hierarchy.title">Struct hierarchy</title>
<synopsis>
GIBaseInfo
+----<link linkend="gi-GIArgInfo">GIArgInfo</link>
+----<link linkend="gi-GICallableInfo">GICallableInfo</link>
+----<link linkend="gi-GIConstantInfo">GIConstantInfo</link>
+----<link linkend="gi-GIFieldInfo">GIFieldInfo</link>
+----<link linkend="gi-GIPropertyInfo">GIPropertyInfo</link>
+----<link linkend="gi-GIRegisteredTypeInfo">GIRegisteredTypeInfo</link>
+----<link linkend="gi-GITypeInfo">GITypeInfo</link>
</synopsis>
</refsect1>
Compare two #GIBaseInfo.
Using pointer comparison is not practical since many functions return
different instances of #GIBaseInfo that refers to the same part of the
TypeLib; use this function instead to do #GIBaseInfo comparisons.
%TRUE if and only if @info1 equals @info2.
a #GIBaseInfo
a #GIBaseInfo
Retrieve an arbitrary attribute associated with this node.
The value of the attribute, or %NULL if no such attribute exists
a #GIBaseInfo
a freeform string naming an attribute
Obtain the container of the @info. The container is the parent
GIBaseInfo. For instance, the parent of a #GIFunctionInfo is an
#GIObjectInfo or #GIInterfaceInfo.
the container
a #GIBaseInfo
Obtain the name of the @info. What the name represents depends on
the #GIInfoType of the @info. For instance for #GIFunctionInfo it is
the name of the function.
the name of @info or %NULL if it lacks a name.
a #GIBaseInfo
Obtain the namespace of @info.
the namespace
a #GIBaseInfo
Obtain the info type of the GIBaseInfo.
the info type of @info
a #GIBaseInfo
Obtain the typelib this @info belongs to
the typelib.
a #GIBaseInfo
Obtain whether the @info is represents a metadata which is
deprecated or not.
%TRUE if deprecated
a #GIBaseInfo
Iterate over all attributes associated with this node. The iterator
structure is typically stack allocated, and must have its first
member initialized to %NULL. Attributes are arbitrary namespaced key–value
pairs which can be attached to almost any item. They are intended for use
by software higher in the toolchain than bindings, and are distinct from
normal GIR annotations.
Both the @name and @value should be treated as constants
and must not be freed.
<example>
<title>Iterating over attributes</title>
<programlisting>
void
print_attributes (GIBaseInfo *info)
{
GIAttributeIter iter = { 0, };
char *name;
char *value;
while (g_base_info_iterate_attributes (info, &iter, &name, &value))
{
g_print ("attribute name: %s value: %s", name, value);
}
}
</programlisting>
</example>
%TRUE if there are more attributes
a #GIBaseInfo
a #GIAttributeIter structure, must be initialized; see below
Returned name, must not be freed
Returned name, must not be freed
Increases the reference count of @info.
the same @info.
a #GIBaseInfo
Decreases the reference count of @info. When its reference count
drops to 0, the info is freed.
a #GIBaseInfo
Checks the version of the girepository library that is being compiled
against.
the major version to check for
the minor version to check for
the micro version to check for
The direction of a #GIArgInfo.
in argument.
out argument.
in and out argument.
Flags for a #GIFieldInfo.
field is readable.
field is writable.
Flags for a #GIFunctionInfo struct.
is a method.
is a constructor.
is a getter of a #GIPropertyInfo.
is a setter of a #GIPropertyInfo.
represents a virtual function.
the function may throw an error.
Checks if @info is a GIArgInfo.
an info structure
Checks if @info is a #GICallableInfo or derived from it.
an info structure
Checks if @info is a #GIConstantInfo.
an info structure
Checks if @info is a #GIEnumInfo.
an info structure
Checks if @info is a #GIFieldInfo.
an info structure
Checks if @info is a #GIFunctionInfo.
an info structure
Checks if @info is a #GIInterfaceInfo.
an info structure
Checks if @info is a #GIObjectInfo.
an info structure
Checks if @info is a #GIPropertyInfo.
an info structure
Checks if @info is a #GIRegisteredTypeInfo or derived from it.
an info structure
Checks if @info is a #GISignalInfo.
an info structure
Checks if @info is a #GIStructInfo.
an info structure
Checks if @info is a #GITypeInfo.
an info structure
Checks if @info is a #GIUnionInfo.
an info structure
Checks if @info is a #GIValueInfo.
an info structure
Checks if @info is a #GIVfuncInfo.
an info structure
The type of a GIBaseInfo struct.
invalid type
function, see #GIFunctionInfo
callback, see #GIFunctionInfo
struct, see #GIStructInfo
boxed, see #GIStructInfo or #GIUnionInfo
enum, see #GIEnumInfo
flags, see #GIEnumInfo
object, see #GIObjectInfo
interface, see #GIInterfaceInfo
contant, see #GIConstantInfo
deleted, used to be GI_INFO_TYPE_ERROR_DOMAIN.
union, see #GIUnionInfo
enum value, see #GIValueInfo
signal, see #GISignalInfo
virtual function, see #GIVFuncInfo
GObject property, see #GIPropertyInfo
struct or union field, see #GIFieldInfo
argument of a function or callback, see #GIArgInfo
type information, see #GITypeInfo
unresolved type, a type which is not present in
the typelib, or any of its dependencies.
The major version number of the girepository library.
The micro version number of the girepository library.
The minor version number of the girepository library.
Extract an object instance out of @value
the object instance
a #GValue
Increases the reference count of an object instance.
the object instance
object instance pointer
Update @value and attach the object instance pointer @object to it.
a #GValue
object instance pointer
Decreases the reference count of an object instance.
object instance pointer
#GIRepository is used to manage repositories of namespaces. Namespaces
are represented on disk by type libraries (.typelib files).
### Discovery of type libraries
#GIRepository will typically look for a `girepository-1.0` directory
under the library directory used when compiling gobject-introspection.
It is possible to control the search paths programmatically, using
g_irepository_prepend_search_path(). It is also possible to modify
the search paths by using the `GI_TYPELIB_PATH` environment variable.
The environment variable takes precedence over the default search path
and the g_irepository_prepend_search_path() calls.
Returns the singleton process-global default #GIRepository. It is
not currently supported to have multiple repositories in a
particular process, but this function is provided in the unlikely
eventuality that it would become possible, and as a convenience for
higher level language bindings to conform to the GObject method
call conventions.
All methods on #GIRepository also accept %NULL as an instance
parameter to mean this default repository, which is usually more
convenient for C.
The global singleton #GIRepository
Obtain the option group for girepository, it's used
by the dumper and for programs that wants to provide
introspection information
the option group
Returns the current search path #GIRepository will use when loading
typelib files. The list is internal to #GIRepository and should not
be freed, nor should its string elements.
#GSList of strings
Prepends @directory to the typelib search path.
See also: g_irepository_get_search_path().
directory name to prepend to the typelib
search path
Obtain an unordered list of versions (either currently loaded or
available) for @namespace_ in this @repository.
the array of versions.
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
GI namespace, e.g. "Gtk"
Searches for the enum type corresponding to the given #GError
domain. Before calling this function for a particular namespace,
you must call g_irepository_require() once to load the namespace, or
otherwise ensure the namespace has already been loaded.
#GIEnumInfo representing metadata about @domain's
enum type, or %NULL
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
a #GError domain
Searches all loaded namespaces for a particular #GType. Note that
in order to locate the metadata, the namespace corresponding to
the type must first have been loaded. There is currently no
mechanism for determining the namespace which corresponds to an
arbitrary GType - thus, this function will operate most reliably
when you know the GType to originate from be from a loaded namespace.
#GIBaseInfo representing metadata about @type, or %NULL
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
GType to search for
Searches for a particular entry in a namespace. Before calling
this function for a particular namespace, you must call
g_irepository_require() once to load the namespace, or otherwise
ensure the namespace has already been loaded.
#GIBaseInfo representing metadata about @name, or %NULL
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace which will be searched
Entry name to find
This function returns the "C prefix", or the C level namespace
associated with the given introspection namespace. Each C symbol
starts with this prefix, as well each #GType in the library.
Note: The namespace must have already been loaded using a function
such as g_irepository_require() before calling this function.
C namespace prefix, or %NULL if none associated
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace to inspect
Return an array of all (transitive) versioned dependencies for
@namespace_. Returned strings are of the form
<code>namespace-version</code>.
Note: @namespace_ must have already been loaded using a function
such as g_irepository_require() before calling this function.
To get only the immediate dependencies for @namespace_, use
g_irepository_get_immediate_dependencies().
Zero-terminated string array of all versioned
dependencies
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace of interest
Return an array of the immediate versioned dependencies for @namespace_.
Returned strings are of the form <code>namespace-version</code>.
Note: @namespace_ must have already been loaded using a function
such as g_irepository_require() before calling this function.
To get the transitive closure of dependencies for @namespace_, use
g_irepository_get_dependencies().
Zero-terminated string array of immediate versioned
dependencies
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace of interest
This function returns a particular metadata entry in the
given namespace @namespace_. The namespace must have
already been loaded before calling this function.
See g_irepository_get_n_infos() to find the maximum number of
entries.
#GIBaseInfo containing metadata
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace to inspect
0-based offset into namespace metadata for entry
Return the list of currently loaded namespaces.
List of namespaces
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
This function returns the number of metadata entries in
given namespace @namespace_. The namespace must have
already been loaded before calling this function.
number of metadata entries
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace to inspect
Look up the implemented interfaces for @gtype. This function
cannot fail per se; but for a totally "unknown" #GType, it may
return 0 implemented interfaces.
The semantics of this function are designed for a dynamic binding,
where in certain cases (such as a function which returns an
interface which may have "hidden" implementation classes), not all
data may be statically known, and will have to be determined from
the #GType of the object. An example is g_file_new_for_path()
returning a concrete class of #GLocalFile, which is a #GType we
see at runtime, but not statically.
a #GIRepository, or %NULL for the default repository
a #GType whose fundamental type is G_TYPE_OBJECT
Number of interfaces
Interfaces for @gtype
This function returns a comma-separated list of paths to the
shared C libraries associated with the given namespace @namespace_.
There may be no shared library path associated, in which case this
function will return %NULL.
Note: The namespace must have already been loaded using a function
such as g_irepository_require() before calling this function.
Comma-separated list of paths to shared libraries,
or %NULL if none are associated
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace to inspect
If namespace @namespace_ is loaded, return the full path to the
.typelib file it was loaded from. If the typelib for
namespace @namespace_ was included in a shared library, return
the special string "<builtin>".
Filesystem path (or $lt;builtin$gt;) if successful, %NULL if namespace is not loaded
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
GI namespace to use, e.g. "Gtk"
This function returns the loaded version associated with the given
namespace @namespace_.
Note: The namespace must have already been loaded using a function
such as g_irepository_require() before calling this function.
Loaded version
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace to inspect
Check whether a particular namespace (and optionally, a specific
version thereof) is currently loaded. This function is likely to
only be useful in unusual circumstances; in order to act upon
metadata in the namespace, you should call g_irepository_require()
instead which will ensure the namespace is loaded, and return as
quickly as this function will if it has already been loaded.
%TRUE if namespace-version is loaded, %FALSE otherwise
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Namespace of interest
Required version, may be %NULL for latest
TODO
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
TODO
TODO
Force the namespace @namespace_ to be loaded if it isn't already.
If @namespace_ is not loaded, this function will search for a
".typelib" file using the repository search path. In addition, a
version @version of namespace may be specified. If @version is
not specified, the latest will be used.
a pointer to the #GITypelib if successful, %NULL otherwise
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
GI namespace to use, e.g. "Gtk"
Version of namespace, may be %NULL for latest
Set of %GIRepositoryLoadFlags, may be 0
Force the namespace @namespace_ to be loaded if it isn't already.
If @namespace_ is not loaded, this function will search for a
".typelib" file within the private directory only. In addition, a
version @version of namespace should be specified. If @version is
not specified, the latest will be used.
a pointer to the #GITypelib if successful, %NULL otherwise
A #GIRepository or %NULL for the singleton
process-global default #GIRepository
Private directory where to find the requested typelib
GI namespace to use, e.g. "Gtk"
Version of namespace, may be %NULL for latest
Set of %GIRepositoryLoadFlags, may be 0
An error code used with #G_IREPOSITORY_ERROR in a #GError returned
from a #GIRepository routine.
the typelib could not be found.
the namespace does not match the
requested namespace.
the version of the
typelib does not match the requested version.
the library used by the typelib
could not be found.
Flags that control how a typelib is loaded.
Lazily load the typelib.
Scope type of a #GIArgInfo representing callback, determines how the
callback is invoked and is used to decided when the invoke structs
can be freed.
The argument is not of callback type.
The callback and associated user_data is only
used during the call to this function.
The callback and associated user_data is
only used until the callback is invoked, and the callback.
is invoked always exactly once.
The callback and and associated
user_data is used until the caller is notfied via the destroy_notify.
Checks if @tag is a basic type.
a type tag
TODO
The transfer is the exchange of data between two parts, from the callee to
the caller. The callee is either a function/method/signal or an
object/interface where a property is defined. The caller is the side
accessing a property or calling a function.
#GITransfer specifies who's responsible for freeing the resources after the
ownership transfer is complete. In case of a containing type such as a list,
an array or a hash table the container itself is specified differently from
the items within the container itself. Each container is freed differently,
check the documentation for the types themselves for information on how to
free them.
transfer nothing from the callee (function or the type
instance the property belongs to) to the caller. The callee retains the
ownership of the transfer and the caller doesn't need to do anything to free
up the resources of this transfer.
transfer the container (list, array, hash table) from
the callee to the caller. The callee retains the ownership of the individual
items in the container and the caller has to free up the container resources
(g_list_free()/g_hash_table_destroy() etc) of this transfer.
transfer everything, eg the container and its
contents from the callee to the caller. This is the case when the callee
creates a copy of all the data it returns. The caller is responsible for
cleaning up the container and item resources of this transfer.
The type tag of a #GITypeInfo.
void
boolean
8-bit signed integer
8-bit unsigned integer
16-bit signed integer
16-bit unsigned integer
32-bit signed integer
32-bit unsigned integer
64-bit signed integer
64-bit unsigned integer
float
double floating point
a #GType
a UTF-8 encoded string
a filename, encoded in the same encoding
as the native filesystem is using.
an array
an extended interface object
a #GList
a #GSList
a #GHashTable
a #GError
Unicode character
TODO
Represents a unresolved type in a typelib.
Flags of a #GIVFuncInfo struct.
chains up to the parent type
overrides
does not override
Includes a #GError
Obtain the index of the user data argument. This is only valid
for arguments which are callbacks.
index of the user data argument or -1 if there is none
a #GIArgInfo
Obtains the index of the #GDestroyNotify argument. This is only valid
for arguments which are callbacks.
index of the #GDestroyNotify argument or -1 if there is none
a #GIArgInfo
Obtain the direction of the argument. Check #GIDirection for possible
direction values.
the direction
a #GIArgInfo
Obtain the ownership transfer for this argument.
#GITransfer contains a list of possible values.
the transfer
a #GIArgInfo
Obtain the scope type for this argument. The scope type explains
how a callback is going to be invoked, most importantly when
the resources required to invoke it can be freed.
#GIScopeType contains a list of possible values.
the scope type
a #GIArgInfo
Obtain the type information for @info.
the #GITypeInfo holding the type
information for @info, free it with g_base_info_unref()
when done.
a #GIArgInfo
Obtain if the argument is a pointer to a struct or object that will
receive an output of a function. The default assumption for
%GI_DIRECTION_OUT arguments which have allocation is that the
callee allocates; if this is %TRUE, then the caller must allocate.
%TRUE if caller is required to have allocated the argument
a #GIArgInfo
Obtain if the argument is optional. For 'out' arguments this means
that you can pass %NULL in order to ignore the result.
%TRUE if it is an optional argument
a #GIArgInfo
Obtain if the argument is a return value. It can either be a
parameter or a return value.
%TRUE if it is a return value
a #GIArgInfo
Obtain if an argument is only useful in C.
%TRUE if argument is only useful in C.
a #GIArgInfo
Obtain information about a the type of given argument @info; this
function is a variant of g_arg_info_get_type() designed for stack
allocation.
The initialized @type must not be referenced after @info is deallocated.
a #GIArgInfo
Initialized with information about type of @info
Obtain if the type of the argument includes the possibility of %NULL.
For 'in' values this means that %NULL is a valid value. For 'out'
values, this means that %NULL may be returned.
See also g_arg_info_is_optional().
%TRUE if the value may be %NULL
a #GIArgInfo
TODO
%TRUE if this #GICallableInfo can throw a #GError
a #GICallableInfo
Obtain information about a particular argument of this callable.
the #GIArgInfo. Free it with
g_base_info_unref() when done.
a #GICallableInfo
the argument index to fetch
See whether the caller owns the return value of this callable.
#GITransfer contains a list of possible transfer values.
the transfer mode for the return value of the callable
a #GICallableInfo
Obtains the ownership transfer for the instance argument.
#GITransfer contains a list of possible transfer values.
the transfer mode of the instance argument
a #GICallableInfo
Obtain the number of arguments (both IN and OUT) for this callable.
The number of arguments this callable expects.
a #GICallableInfo
Retrieve an arbitrary attribute associated with the return value.
The value of the attribute, or %NULL if no such attribute exists
a #GICallableInfo
a freeform string naming an attribute
Obtain the return type of a callable item as a #GITypeInfo.
the #GITypeInfo. Free the struct by calling
g_base_info_unref() when done.
a #GICallableInfo
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
Determines if the callable info is a method. For #GIVFuncInfo<!-- -->s,
#GICallbackInfo<!-- -->s, and #GISignalInfo<!-- -->s,
this is always true. Otherwise, this looks at the %GI_FUNCTION_IS_METHOD
flag on the #GIFunctionInfo.
Concretely, this function returns whether g_callable_info_get_n_args()
matches the number of arguments in the raw C method. For methods, there
is one more C argument than is exposed by introspection: the "self"
or "this" object.
%TRUE if @info is a method, %FALSE otherwise
a #GICallableInfo
Iterate over all attributes associated with the return value. The
iterator structure is typically stack allocated, and must have its
first member initialized to %NULL.
Both the @name and @value should be treated as constants
and must not be freed.
See g_base_info_iterate_attributes() for an example of how to use a
similar API.
%TRUE if there are more attributes
a #GICallableInfo
a #GIAttributeIter structure, must be initialized; see below
Returned name, must not be freed
Returned name, must not be freed
Obtain information about a particular argument of this callable; this
function is a variant of g_callable_info_get_arg() designed for stack
allocation.
The initialized @arg must not be referenced after @info is deallocated.
a #GICallableInfo
the argument index to fetch
Initialize with argument number @n
Obtain information about a return value of callable; this
function is a variant of g_callable_info_get_return_type() designed for stack
allocation.
The initialized @type must not be referenced after @info is deallocated.
a #GICallableInfo
Initialized with return type of @info
See if a callable could return %NULL.
%TRUE if callable could return %NULL
a #GICallableInfo
See if a callable's return value is only useful in C.
%TRUE if return value is only useful in C.
a #GICallableInfo
Free the value returned from g_constant_info_get_value().
a #GIConstantInfo
the argument
Obtain the type of the constant as a #GITypeInfo.
the #GITypeInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIConstantInfo
Obtain the value associated with the #GIConstantInfo and store it in the
@value parameter. @argument needs to be allocated before passing it in.
The size of the constant value stored in @argument will be returned.
Free the value with g_constant_info_free_value().
size of the constant
a #GIConstantInfo
an argument
Obtain the string form of the quark for the error domain associated with
this enum, if any.
the string form of the error domain associated
with this enum, or %NULL.
a #GIEnumInfo
Obtain an enum type method at index @n.
the #GIFunctionInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIEnumInfo
index of method to get
Obtain the number of methods that this enum type has.
number of methods
a #GIEnumInfo
Obtain the number of values this enumeration contains.
the number of enumeration values
a #GIEnumInfo
Obtain the tag of the type used for the enum in the C ABI. This will
will be a signed or unsigned integral type.
Note that in the current implementation the width of the type is
computed correctly, but the signed or unsigned nature of the type
may not match the sign of the type used by the C compiler.
the storage type for the enumeration
a #GIEnumInfo
Obtain a value for this enumeration.
the enumeration value or %NULL if type tag is wrong,
free the struct with g_base_info_unref() when done.
a #GIEnumInfo
index of value to fetch
Reads a field identified by a #GIFieldInfo from a C structure or
union. This only handles fields of simple C types. It will fail
for a field of a composite type like a nested structure or union
even if that is actually readable.
%TRUE if reading the field succeeded, otherwise %FALSE
a #GIFieldInfo
pointer to a block of memory representing a C structure or union
a #GIArgument into which to store the value retrieved
Obtain the flags for this #GIFieldInfo. See #GIFieldInfoFlags for possible
flag values.
the flags
a #GIFieldInfo
Obtain the offset in bytes of the field member, this is relative
to the beginning of the struct or union.
the field offset
a #GIFieldInfo
Obtain the size in bits of the field member, this is how
much space you need to allocate to store the field.
the field size
a #GIFieldInfo
Obtain the type of a field as a #GITypeInfo.
the #GITypeInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIFieldInfo
Writes a field identified by a #GIFieldInfo to a C structure or
union. This only handles fields of simple C types. It will fail
for a field of a composite type like a nested structure or union
even if that is actually writable. Note also that that it will refuse
to write fields where memory management would by required. A field
with a type such as 'char *' must be set with a setter function.
%TRUE if writing the field succeeded, otherwise %FALSE
a #GIFieldInfo
pointer to a block of memory representing a C structure or union
a #GIArgument holding the value to store
Obtain the #GIFunctionInfoFlags for the @info.
the flags
a #GIFunctionInfo
Obtain the property associated with this #GIFunctionInfo.
Only #GIFunctionInfo with the flag %GI_FUNCTION_IS_GETTER or
%GI_FUNCTION_IS_SETTER have a property set. For other cases,
%NULL will be returned.
the property or %NULL if not set. Free it with
g_base_info_unref() when done.
a #GIFunctionInfo
Obtain the symbol of the function. The symbol is the name of the
exported function, suitable to be used as an argument to
g_module_symbol().
the symbol
a #GIFunctionInfo
Obtain the virtual function associated with this #GIFunctionInfo.
Only #GIFunctionInfo with the flag %GI_FUNCTION_WRAPS_VFUNC has
a virtual function set. For other cases, %NULL will be returned.
the virtual function or %NULL if not set.
Free it by calling g_base_info_unref() when done.
a #GIFunctionInfo
Invokes the function described in @info with the given
arguments. Note that inout parameters must appear in both
argument lists. This function uses dlsym() to obtain a pointer
to the function, so the library or shared object containing the
described function must either be linked to the caller, or must
have been g_module_symbol()<!-- -->ed before calling this function.
%TRUE if the function has been invoked, %FALSE if an
error occurred.
a #GIFunctionInfo describing the function to invoke
an array of #GIArgument<!-- -->s, one for each in
parameter of @info. If there are no in parameter, @in_args
can be %NULL
the length of the @in_args array
an array of #GIArgument<!-- -->s, one for each out
parameter of @info. If there are no out parameters, @out_args
may be %NULL
the length of the @out_args array
return location for the return value of the
function. If the function returns void, @return_value may be
%NULL
Returns the major version number of the girepository library.
(e.g. in version 1.58.2 this is 1.)
the major version number of the girepository library
Returns the micro version number of the girepository library.
(e.g. in version 1.58.2 this is 2.)
the micro version number of the girepository library
Returns the minor version number of the girepository library.
(e.g. in version 1.58.2 this is 58.)
the minor version number of the girepository library
TODO
TODO
TODO
TODO
TODO
TODO
Obtain a string representation of @type
the string
the info type
Obtain a method of the interface type given a @name. %NULL will be
returned if there's no method available with that name.
the #GIFunctionInfo or %NULL if none found.
Free the struct by calling g_base_info_unref() when done.
a #GIInterfaceInfo
name of method to obtain
TODO
Info for the signal with name @name in @info, or
%NULL on failure.
a #GIInterfaceInfo
Name of signal
Locate a virtual function slot with name @name. See the documentation
for g_object_info_find_vfunc() for more information on virtuals.
the #GIVFuncInfo, or %NULL. Free it with
g_base_info_unref() when done.
a #GIInterfaceInfo
The name of a virtual function to find.
Obtain an interface type constant at index @n.
the #GIConstantInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIInterfaceInfo
index of constant to get
Returns the layout C structure associated with this #GInterface.
the #GIStructInfo or %NULL. Free it with
g_base_info_unref() when done.
a #GIInterfaceInfo
Obtain an interface type method at index @n.
the #GIFunctionInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIInterfaceInfo
index of method to get
Obtain the number of constants that this interface type has.
number of constants
a #GIInterfaceInfo
Obtain the number of methods that this interface type has.
number of methods
a #GIInterfaceInfo
Obtain the number of prerequisites for this interface type.
A prerequisites is another interface that needs to be implemented for
interface, similar to an base class for GObjects.
number of prerequisites
a #GIInterfaceInfo
Obtain the number of properties that this interface type has.
number of properties
a #GIInterfaceInfo
Obtain the number of signals that this interface type has.
number of signals
a #GIInterfaceInfo
Obtain the number of virtual functions that this interface type has.
number of virtual functions
a #GIInterfaceInfo
Obtain an interface type prerequisites index @n.
the prerequisites as a #GIBaseInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIInterfaceInfo
index of prerequisites to get
Obtain an interface type property at index @n.
the #GIPropertyInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIInterfaceInfo
index of property to get
Obtain an interface type signal at index @n.
the #GISignalInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIInterfaceInfo
index of signal to get
Obtain an interface type virtual function at index @n.
the #GIVFuncInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIInterfaceInfo
index of virtual function to get
TODO
TODO
An error occuring while invoking a function via
g_function_info_invoke().
invokation failed, unknown error.
symbol couldn't be found in any of the
libraries associated with the typelib of the function.
the arguments provided didn't match
the expected arguments for the functions type signature.
Obtain a method of the object type given a @name. %NULL will be
returned if there's no method available with that name.
the #GIFunctionInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
name of method to obtain
Obtain a method of the object given a @name, searching both the
object @info and any interfaces it implements. %NULL will be
returned if there's no method available with that name.
Note that this function does *not* search parent classes; you will have
to chain up if that's desired.
the #GIFunctionInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
name of method to obtain
The implementor of the interface
TODO
Info for the signal with name @name in @info, or %NULL on failure.
a #GIObjectInfo
Name of signal
Locate a virtual function slot with name @name. Note that the namespace
for virtuals is distinct from that of methods; there may or may not be
a concrete method associated for a virtual. If there is one, it may
be retrieved using g_vfunc_info_get_invoker(), otherwise %NULL will be
returned.
See the documentation for g_vfunc_info_get_invoker() for more
information on invoking virtuals.
the #GIVFuncInfo, or %NULL. Free it with
g_base_info_unref() when done.
a #GIObjectInfo
The name of a virtual function to find.
Locate a virtual function slot with name @name, searching both the object
@info and any interfaces it implements. Note that the namespace for
virtuals is distinct from that of methods; there may or may not be a
concrete method associated for a virtual. If there is one, it may be
retrieved using g_vfunc_info_get_invoker(), otherwise %NULL will be
returned.
Note that this function does *not* search parent classes; you will have
to chain up if that's desired.
the #GIVFuncInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
name of vfunc to obtain
The implementor of the interface
Obtain if the object type is an abstract type, eg if it cannot be
instantiated
%TRUE if the object type is abstract
a #GIObjectInfo
Every #GObject has two structures; an instance structure and a class
structure. This function returns the metadata for the class structure.
the #GIStructInfo or %NULL. Free with
g_base_info_unref() when done.
a #GIObjectInfo
Obtain an object type constant at index @n.
the #GIConstantInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
index of constant to get
Obtain an object type field at index @n.
the #GIFieldInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
index of field to get
Obtain if the object type is of a fundamental type which is not
G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.
%TRUE if the object type is a fundamental type
a #GIObjectInfo
Obtain the symbol name of the function that should be called to convert
an object instance pointer of this object type to a GValue.
I's mainly used fundamental types. The type signature for the symbol
is %GIObjectInfoGetValueFunction, to fetch the function pointer
see g_object_info_get_get_value_function().
the symbol or %NULL
a #GIObjectInfo
Obtain a pointer to a function which can be used to
extract an instance of this object type out of a GValue.
This takes derivation into account and will reversely traverse
the base classes of this type, starting at the top type.
the function pointer or %NULL
a #GIObjectInfo
Obtain an object type interface at index @n.
the #GIInterfaceInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
index of interface to get
Obtain an object type method at index @n.
the #GIFunctionInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
index of method to get
Obtain the number of constants that this object type has.
number of constants
a #GIObjectInfo
Obtain the number of fields that this object type has.
number of fields
a #GIObjectInfo
Obtain the number of interfaces that this object type has.
number of interfaces
a #GIObjectInfo
Obtain the number of methods that this object type has.
number of methods
a #GIObjectInfo
Obtain the number of properties that this object type has.
number of properties
a #GIObjectInfo
Obtain the number of signals that this object type has.
number of signals
a #GIObjectInfo
Obtain the number of virtual functions that this object type has.
number of virtual functions
a #GIObjectInfo
Obtain the parent of the object type.
the #GIObjectInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
Obtain an object type property at index @n.
the #GIPropertyInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
index of property to get
Obtain the symbol name of the function that should be called to ref this
object type. It's mainly used fundamental types. The type signature for
the symbol is %GIObjectInfoRefFunction, to fetch the function pointer
see g_object_info_get_ref_function().
the symbol or %NULL
a #GIObjectInfo
Obtain a pointer to a function which can be used to
increase the reference count an instance of this object type.
This takes derivation into account and will reversely traverse
the base classes of this type, starting at the top type.
the function pointer or %NULL
a #GIObjectInfo
Obtain the symbol name of the function that should be called to convert
set a GValue giving an object instance pointer of this object type.
I's mainly used fundamental types. The type signature for the symbol
is %GIObjectInfoSetValueFunction, to fetch the function pointer
see g_object_info_get_set_value_function().
the symbol or %NULL
a #GIObjectInfo
Obtain a pointer to a function which can be used to
set a GValue given an instance of this object type.
This takes derivation into account and will reversely traverse
the base classes of this type, starting at the top type.
the function pointer or %NULL
a #GIObjectInfo
Obtain an object type signal at index @n.
the #GISignalInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
index of signal to get
Obtain the function which when called will return the GType
function for which this object type is registered.
the type init function
a #GIObjectInfo
Obtain the name of the objects class/type.
name of the objects type
a #GIObjectInfo
Obtain the symbol name of the function that should be called to unref this
object type. It's mainly used fundamental types. The type signature for
the symbol is %GIObjectInfoUnrefFunction, to fetch the function pointer
see g_object_info_get_unref_function().
the symbol or %NULL
a #GIObjectInfo
Obtain a pointer to a function which can be used to
decrease the reference count an instance of this object type.
This takes derivation into account and will reversely traverse
the base classes of this type, starting at the top type.
the function pointer or %NULL
a #GIObjectInfo
Obtain an object type virtual function at index @n.
the #GIVFuncInfo. Free the struct by calling
g_base_info_unref() when done.
a #GIObjectInfo
index of virtual function to get
Obtain the flags for this property info. See #GParamFlags for
more information about possible flag values.
the flags
a #GIPropertyInfo
Obtain the ownership transfer for this property. See #GITransfer for more
information about transfer values.
the transfer
a #GIPropertyInfo
Obtain the type information for the property @info.
the #GITypeInfo, free it with
g_base_info_unref() when done.
a #GIPropertyInfo
Obtain the #GType for this registered type or G_TYPE_NONE which a special meaning.
It means that either there is no type information associated with this @info or
that the shared library which provides the type_init function for this
@info cannot be called.
the #GType.
a #GIRegisteredTypeInfo
Obtain the type init function for @info. The type init function is the
function which will register the GType within the GObject type system.
Usually this is not called by langauge bindings or applications, use
g_registered_type_info_get_g_type() directly instead.
the symbol name of the type init function, suitable for
passing into g_module_symbol().
a #GIRegisteredTypeInfo
Obtain the type name of the struct within the GObject type system.
This type can be passed to g_type_name() to get a #GType.
the type name
a #GIRegisteredTypeInfo
Obtain the class closure for this signal if one is set. The class
closure is a virtual function on the type that the signal belongs to.
If the signal lacks a closure %NULL will be returned.
the class closure or %NULL
a #GISignalInfo
Obtain the flags for this signal info. See #GSignalFlags for
more information about possible flag values.
the flags
a #GISignalInfo
Obtain if the returning true in the signal handler will
stop the emission of the signal.
%TRUE if returning true stops the signal emission
a #GISignalInfo
Obtain the type information for field named @name.
the #GIFieldInfo or %NULL if not found,
free it with g_base_info_unref() when done.
a #GIStructInfo
a field name
Obtain the type information for method named @name.
the #GIFunctionInfo, free it with g_base_info_unref()
when done.
a #GIStructInfo
a method name
Obtain the required alignment of the structure.
required alignment in bytes
a #GIStructInfo
Obtain the type information for field with specified index.
the #GIFieldInfo, free it with g_base_info_unref()
when done.
a #GIStructInfo
a field index
Obtain the type information for method with specified index.
the #GIFunctionInfo, free it with g_base_info_unref()
when done.
a #GIStructInfo
a method index
Obtain the number of fields this structure has.
number of fields
a #GIStructInfo
Obtain the number of methods this structure has.
number of methods
a #GIStructInfo
Obtain the total size of the structure.
size of the structure in bytes
a #GIStructInfo
TODO
TODO
TODO
Return true if this structure represents the "class structure" for some
#GObject or #GInterface. This function is mainly useful to hide this kind of structure
from generated public APIs.
%TRUE if this is a class struct, %FALSE otherwise
a #GIStructInfo
Obtain the fixed array size of the type. The type tag must be a
#GI_TYPE_TAG_ARRAY or -1 will returned.
the size or -1 if it's not an array
a #GITypeInfo
Obtain the array length of the type. The type tag must be a
#GI_TYPE_TAG_ARRAY or -1 will returned.
the array length, or -1 if the type is not an array
a #GITypeInfo
Obtain the array type for this type. See #GIArrayType for a list of
possible values. If the type tag of this type is not array, -1 will be
returned.
the array type or -1
a #GITypeInfo
For types which have #GI_TYPE_TAG_INTERFACE such as GObjects and boxed values,
this function returns full information about the referenced type. You can then
inspect the type of the returned #GIBaseInfo to further query whether it is
a concrete GObject, a GInterface, a structure, etc. using g_base_info_get_type().
the #GIBaseInfo, or %NULL. Free it with
g_base_info_unref() when done.
a #GITypeInfo
Obtain the parameter type @n.
the param type info
a #GITypeInfo
index of the parameter
Obtain the type tag for the type. See #GITypeTag for a list
of type tags.
the type tag
a #GITypeInfo
Obtain if the type is passed as a reference.
Note that the types of %GI_DIRECTION_OUT and %GI_DIRECTION_INOUT parameters
will only be pointers if the underlying type being transferred is a pointer
(i.e. only if the type of the C function’s formal parameter is a pointer to a
pointer).
%TRUE if it is a pointer
a #GITypeInfo
Obtain if the last element of the array is %NULL. The type tag must be a
#GI_TYPE_TAG_ARRAY or %FALSE will returned.
%TRUE if zero terminated
a #GITypeInfo
Obtain a string representation of @type
the string
the type_tag
Obtain the type information for method named @name.
the #GIFunctionInfo, free it with g_base_info_unref()
when done.
a #GIUnionInfo
a method name
Obtain the required alignment of the union.
required alignment in bytes
a #GIUnionInfo
Obtain discriminator value assigned for n-th union field, i.e. n-th
union field is the active one if discriminator contains this
constant.
the #GIConstantInfo, free it with g_base_info_unref()
when done.
a #GIUnionInfo
a union field index
Returns offset of the discriminator field in the structure.
offset in bytes of the discriminator
a #GIUnionInfo
Obtain the type information of the union discriminator.
the #GITypeInfo, free it with g_base_info_unref()
when done.
a #GIUnionInfo
Obtain the type information for field with specified index.
the #GIFieldInfo, free it with g_base_info_unref()
when done.
a #GIUnionInfo
a field index
Obtain the type information for method with specified index.
the #GIFunctionInfo, free it with g_base_info_unref()
when done.
a #GIUnionInfo
a method index
Obtain the number of fields this union has.
number of fields
a #GIUnionInfo
Obtain the number of methods this union has.
number of methods
a #GIUnionInfo
Obtain the total size of the union.
size of the union in bytes
a #GIUnionInfo
Return true if this union contains discriminator field.
%TRUE if this is a discriminated union, %FALSE otherwise
a #GIUnionInfo
Obtain the enumeration value of the #GIValueInfo.
the enumeration value. This will always be representable
as a 32-bit signed or unsigned value. The use of gint64 as the
return type is to allow both.
a #GIValueInfo
This method will look up where inside the type struct of @implementor_gtype
is the implementation for @info.
address to a function or %NULL if an error happened
a #GIVFuncInfo
#GType implementing this virtual function
Obtain the flags for this virtual function info. See #GIVFuncInfoFlags for
more information about possible flag values.
the flags
a #GIVFuncInfo
If this virtual function has an associated invoker method, this
method will return it. An invoker method is a C entry point.
Not all virtuals will have invokers.
the #GIVFuncInfo or %NULL. Free it with
g_base_info_unref() when done.
a #GIVFuncInfo
Obtain the offset of the function pointer in the class struct. The value
0xFFFF indicates that the struct offset is unknown.
the struct offset or 0xFFFF if it's unknown
a #GIVFuncInfo
Obtain the signal for the virtual function if one is set.
The signal comes from the object or interface to which
this virtual function belongs.
the signal or %NULL if none set
a #GIVFuncInfo
Invokes the function described in @info with the given
arguments. Note that inout parameters must appear in both
argument lists.
%TRUE if the function has been invoked, %FALSE if an
error occurred.
a #GIVFuncInfo describing the virtual function to invoke
#GType of the type that implements this virtual function
an array of #GIArgument<!-- -->s, one for each in
parameter of @info. If there are no in parameter, @in_args
can be %NULL
the length of the @in_args array
an array of #GIArgument<!-- -->s, one for each out
parameter of @info. If there are no out parameters, @out_args
may be %NULL
the length of the @out_args array
return location for the return value of the
function. If the function returns void, @return_value may be
%NULL