Functions

arg_info_get_closure (info)

arg_info_get_destroy (info)

arg_info_get_direction (info)

arg_info_get_ownership_transfer (info)

arg_info_get_scope (info)

arg_info_get_type (info)

arg_info_is_caller_allocates (info)

arg_info_is_optional (info)

arg_info_is_return_value (info)

arg_info_is_skip (info)

arg_info_load_type (info)

arg_info_may_be_null (info)

callable_info_can_throw_gerror (info)

callable_info_get_arg (info, n)

callable_info_get_caller_owns (info)

callable_info_get_instance_ownership_transfer (info)

callable_info_get_n_args (info)

callable_info_get_return_attribute (info, name)

callable_info_get_return_type (info)

callable_info_invoke (info, function, in_args, out_args, return_value, is_method, throws)

callable_info_is_method (info)

callable_info_iterate_return_attributes (info, iterator)

callable_info_load_arg (info, n)

callable_info_load_return_type (info)

callable_info_may_return_null (info)

callable_info_skip_return (info)

cclosure_marshal_generic (closure, return_gvalue, n_param_values, param_values, invocation_hint, marshal_data)

constant_info_get_type (info)

enum_info_get_error_domain (info)

enum_info_get_method (info, n)

enum_info_get_n_methods (info)

enum_info_get_n_values (info)

enum_info_get_storage_type (info)

enum_info_get_value (info, n)

field_info_get_flags (info)

field_info_get_offset (info)

field_info_get_size (info)

field_info_get_type (info)

function_info_get_flags (info)

function_info_get_property (info)

function_info_get_symbol (info)

function_info_get_vfunc (info)

get_major_version ()

get_micro_version ()

get_minor_version ()

info_new (type, container, typelib, offset)

info_type_to_string (type)

interface_info_find_method (info, name)

interface_info_find_signal (info, name)

interface_info_find_vfunc (info, name)

interface_info_get_constant (info, n)

interface_info_get_iface_struct (info)

interface_info_get_method (info, n)

interface_info_get_n_constants (info)

interface_info_get_n_methods (info)

interface_info_get_n_prerequisites (info)

interface_info_get_n_properties (info)

interface_info_get_n_signals (info)

interface_info_get_n_vfuncs (info)

interface_info_get_prerequisite (info, n)

interface_info_get_property (info, n)

interface_info_get_signal (info, n)

interface_info_get_vfunc (info, n)

invoke_error_quark ()

object_info_find_method (info, name)

object_info_find_method_using_interfaces (info, name)

object_info_find_signal (info, name)

object_info_find_vfunc (info, name)

object_info_find_vfunc_using_interfaces (info, name)

object_info_get_abstract (info)

object_info_get_class_struct (info)

object_info_get_constant (info, n)

object_info_get_field (info, n)

object_info_get_final (info)

object_info_get_fundamental (info)

object_info_get_get_value_function (info)

object_info_get_interface (info, n)

object_info_get_method (info, n)

object_info_get_n_constants (info)

object_info_get_n_fields (info)

object_info_get_n_interfaces (info)

object_info_get_n_methods (info)

object_info_get_n_properties (info)

object_info_get_n_signals (info)

object_info_get_n_vfuncs (info)

object_info_get_parent (info)

object_info_get_property (info, n)

object_info_get_ref_function (info)

object_info_get_set_value_function (info)

object_info_get_signal (info, n)

object_info_get_type_init (info)

object_info_get_type_name (info)

object_info_get_unref_function (info)

object_info_get_vfunc (info, n)

property_info_get_flags (info)

property_info_get_getter (info)

property_info_get_ownership_transfer (info)

property_info_get_setter (info)

property_info_get_type (info)

registered_type_info_get_g_type (info)

registered_type_info_get_type_init (info)

registered_type_info_get_type_name (info)

signal_info_get_class_closure (info)

signal_info_get_flags (info)

signal_info_true_stops_emit (info)

struct_info_find_field (info, name)

struct_info_find_method (info, name)

struct_info_get_alignment (info)

struct_info_get_copy_function (info)

struct_info_get_field (info, n)

struct_info_get_free_function (info)

struct_info_get_method (info, n)

struct_info_get_n_fields (info)

struct_info_get_n_methods (info)

struct_info_get_size (info)

struct_info_is_foreign (info)

struct_info_is_gtype_struct (info)

type_info_argument_from_hash_pointer (info, hash_pointer, arg)

type_info_get_array_fixed_size (info)

type_info_get_array_length (info)

type_info_get_array_type (info)

type_info_get_interface (info)

type_info_get_param_type (info, n)

type_info_get_storage_type (info)

type_info_get_tag (info)

type_info_hash_pointer_from_argument (info, arg)

type_info_is_pointer (info)

type_info_is_zero_terminated (info)

type_tag_argument_from_hash_pointer (storage_type, hash_pointer, arg)

type_tag_hash_pointer_from_argument (storage_type, arg)

type_tag_to_string (type)

union_info_find_method (info, name)

union_info_get_alignment (info)

union_info_get_copy_function (info)

union_info_get_discriminator (info, n)

union_info_get_discriminator_offset (info)

union_info_get_discriminator_type (info)

union_info_get_field (info, n)

union_info_get_free_function (info)

union_info_get_method (info, n)

union_info_get_n_fields (info)

union_info_get_n_methods (info)

union_info_get_size (info)

union_info_is_discriminated (info)

value_info_get_value (info)

vfunc_info_get_address (info, implementor_gtype)

vfunc_info_get_flags (info)

vfunc_info_get_invoker (info)

vfunc_info_get_offset (info)

vfunc_info_get_signal (info)

Details

GIRepository.arg_info_get_closure(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

index of the user data argument or -1 if there is none

Return type:

int

Obtain the index of the user data argument. This is only valid for arguments which are callbacks.

GIRepository.arg_info_get_destroy(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

index of the GLib.DestroyNotify argument or -1 if there is none

Return type:

int

Obtains the index of the GLib.DestroyNotify argument. This is only valid for arguments which are callbacks.

GIRepository.arg_info_get_direction(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

the direction

Return type:

GIRepository.Direction

Obtain the direction of the argument. Check GIRepository.Direction for possible direction values.

GIRepository.arg_info_get_ownership_transfer(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

the transfer

Return type:

GIRepository.Transfer

Obtain the ownership transfer for this argument. GIRepository.Transfer contains a list of possible values.

GIRepository.arg_info_get_scope(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

the scope type

Return type:

GIRepository.ScopeType

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. GIRepository.ScopeType contains a list of possible values.

GIRepository.arg_info_get_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

the #GITypeInfo holding the type information for info, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for info.

GIRepository.arg_info_is_caller_allocates(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

True if caller is required to have allocated the argument

Return type:

bool

Obtain if the argument is a pointer to a struct or object that will receive an output of a function. The default assumption for GIRepository.Direction.OUT arguments which have allocation is that the callee allocates; if this is True, then the caller must allocate.

GIRepository.arg_info_is_optional(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

True if it is an optional argument

Return type:

bool

Obtain if the argument is optional. For ‘out’ arguments this means that you can pass None in order to ignore the result.

GIRepository.arg_info_is_return_value(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

True if it is a return value

Return type:

bool

Obtain if the argument is a return value. It can either be a parameter or a return value.

GIRepository.arg_info_is_skip(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

True if argument is only useful in C.

Return type:

bool

Obtain if an argument is only useful in C.

New in version 1.30.

GIRepository.arg_info_load_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

Initialized with information about type of info

Return type:

type: GIRepository.BaseInfo

Obtain information about a the type of given argument info; this function is a variant of GIRepository.arg_info_get_type() designed for stack allocation.

The initialized type must not be referenced after info is deallocated.

GIRepository.arg_info_may_be_null(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIArgInfo

Returns:

True if the value may be None

Return type:

bool

Obtain if the type of the argument includes the possibility of None. For ‘in’ values this means that None is a valid value. For ‘out’ values, this means that None may be returned.

See also GIRepository.arg_info_is_optional().

GIRepository.callable_info_can_throw_gerror(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

True if this #GICallableInfo can throw a GLib.Error

Return type:

bool

TODO

New in version 1.34.

GIRepository.callable_info_get_arg(info, n)
Parameters:
Returns:

the #GIArgInfo. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain information about a particular argument of this callable.

GIRepository.callable_info_get_caller_owns(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

the transfer mode for the return value of the callable

Return type:

GIRepository.Transfer

See whether the caller owns the return value of this callable. GIRepository.Transfer contains a list of possible transfer values.

GIRepository.callable_info_get_instance_ownership_transfer(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

the transfer mode of the instance argument

Return type:

GIRepository.Transfer

Obtains the ownership transfer for the instance argument. GIRepository.Transfer contains a list of possible transfer values.

New in version 1.42.

GIRepository.callable_info_get_n_args(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

The number of arguments this callable expects.

Return type:

int

Obtain the number of arguments (both IN and OUT) for this callable.

GIRepository.callable_info_get_return_attribute(info, name)
Parameters:
Returns:

The value of the attribute, or None if no such attribute exists

Return type:

str

Retrieve an arbitrary attribute associated with the return value.

GIRepository.callable_info_get_return_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

the #GITypeInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the return type of a callable item as a #GITypeInfo.

GIRepository.callable_info_invoke(info, function, in_args, out_args, return_value, is_method, throws)
Parameters:
Raises:

GLib.Error

Return type:

bool

TODO

GIRepository.callable_info_is_method(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

True if info is a method, False otherwise

Return type:

bool

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 GIRepository.FunctionInfoFlags.IS_METHOD flag on the #GIFunctionInfo.

Concretely, this function returns whether GIRepository.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.

New in version 1.34.

GIRepository.callable_info_iterate_return_attributes(info, iterator)
Parameters:
Returns:

True if there are more attributes

iterator:

a GIRepository.AttributeIter structure, must be initialized; see below

name:

Returned name, must not be freed

value:

Returned name, must not be freed

Return type:

(bool, iterator: GIRepository.AttributeIter, name: str, value: str)

Iterate over all attributes associated with the return value. The iterator structure is typically stack allocated, and must have its first member initialized to None.

Both the name and value should be treated as constants and must not be freed.

See GIRepository.BaseInfo.iterate_attributes() for an example of how to use a similar API.

GIRepository.callable_info_load_arg(info, n)
Parameters:
Returns:

Initialize with argument number n

Return type:

arg: GIRepository.BaseInfo

Obtain information about a particular argument of this callable; this function is a variant of GIRepository.callable_info_get_arg() designed for stack allocation.

The initialized arg must not be referenced after info is deallocated.

GIRepository.callable_info_load_return_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

Initialized with return type of info

Return type:

type: GIRepository.BaseInfo

Obtain information about a return value of callable; this function is a variant of GIRepository.callable_info_get_return_type() designed for stack allocation.

The initialized type must not be referenced after info is deallocated.

GIRepository.callable_info_may_return_null(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

True if callable could return None

Return type:

bool

See if a callable could return None.

GIRepository.callable_info_skip_return(info)
Parameters:

info (GIRepository.BaseInfo) – a #GICallableInfo

Returns:

True if return value is only useful in C.

Return type:

bool

See if a callable’s return value is only useful in C.

GIRepository.cclosure_marshal_generic(closure, return_gvalue, n_param_values, param_values, invocation_hint, marshal_data)
Parameters:
GIRepository.constant_info_get_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIConstantInfo

Returns:

the #GITypeInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type of the constant as a #GITypeInfo.

GIRepository.enum_info_get_error_domain(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIEnumInfo

Returns:

the string form of the error domain associated with this enum, or None.

Return type:

str

Obtain the string form of the quark for the error domain associated with this enum, if any.

New in version 1.30.

GIRepository.enum_info_get_method(info, n)
Parameters:
Returns:

the #GIFunctionInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an enum type method at index n.

New in version 1.30.

GIRepository.enum_info_get_n_methods(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIEnumInfo

Returns:

number of methods

Return type:

int

Obtain the number of methods that this enum type has.

New in version 1.30.

GIRepository.enum_info_get_n_values(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIEnumInfo

Returns:

the number of enumeration values

Return type:

int

Obtain the number of values this enumeration contains.

GIRepository.enum_info_get_storage_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIEnumInfo

Returns:

the storage type for the enumeration

Return type:

GIRepository.TypeTag

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.

GIRepository.enum_info_get_value(info, n)
Parameters:
Returns:

the enumeration value or None if type tag is wrong, free the struct with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain a value for this enumeration.

GIRepository.field_info_get_flags(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFieldInfo

Returns:

the flags

Return type:

GIRepository.FieldInfoFlags

Obtain the flags for this #GIFieldInfo. See GIRepository.FieldInfoFlags for possible flag values.

GIRepository.field_info_get_offset(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFieldInfo

Returns:

the field offset

Return type:

int

Obtain the offset in bytes of the field member, this is relative to the beginning of the struct or union.

GIRepository.field_info_get_size(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFieldInfo

Returns:

the field size

Return type:

int

Obtain the size in bits of the field member, this is how much space you need to allocate to store the field.

GIRepository.field_info_get_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFieldInfo

Returns:

the #GITypeInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type of a field as a #GITypeInfo.

GIRepository.function_info_get_flags(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFunctionInfo

Returns:

the flags

Return type:

GIRepository.FunctionInfoFlags

Obtain the GIRepository.FunctionInfoFlags for the info.

GIRepository.function_info_get_property(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFunctionInfo

Returns:

the property or None if not set. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the property associated with this #GIFunctionInfo. Only #GIFunctionInfo with the flag GIRepository.FunctionInfoFlags.IS_GETTER or GIRepository.FunctionInfoFlags.IS_SETTER have a property set. For other cases, None will be returned.

GIRepository.function_info_get_symbol(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFunctionInfo

Returns:

the symbol

Return type:

str

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().

GIRepository.function_info_get_vfunc(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIFunctionInfo

Returns:

the virtual function or None if not set. Free it by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the virtual function associated with this #GIFunctionInfo. Only #GIFunctionInfo with the flag GIRepository.FunctionInfoFlags.WRAPS_VFUNC has a virtual function set. For other cases, None will be returned.

GIRepository.get_major_version()
Returns:

the major version number of the girepository library

Return type:

int

Returns the major version number of the girepository library. (e.g. in version 1.58.2 this is 1.)

New in version 1.60.

GIRepository.get_micro_version()
Returns:

the micro version number of the girepository library

Return type:

int

Returns the micro version number of the girepository library. (e.g. in version 1.58.2 this is 2.)

New in version 1.60.

GIRepository.get_minor_version()
Returns:

the minor version number of the girepository library

Return type:

int

Returns the minor version number of the girepository library. (e.g. in version 1.58.2 this is 58.)

New in version 1.60.

GIRepository.info_new(type, container, typelib, offset)
Parameters:
Returns:

TODO

Return type:

GIRepository.BaseInfo

TODO

GIRepository.info_type_to_string(type)
Parameters:

type (GIRepository.InfoType) – the info type

Returns:

the string

Return type:

str

Obtain a string representation of type

GIRepository.interface_info_find_method(info, name)
Parameters:
Returns:

the #GIFunctionInfo or None if none found. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain a method of the interface type given a name. None will be returned if there’s no method available with that name.

GIRepository.interface_info_find_signal(info, name)
Parameters:
Returns:

Info for the signal with name name in info, or None on failure.

Return type:

GIRepository.BaseInfo

TODO

New in version 1.34.

GIRepository.interface_info_find_vfunc(info, name)
Parameters:
Returns:

the #GIVFuncInfo, or None. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Locate a virtual function slot with name name. See the documentation for GIRepository.object_info_find_vfunc() for more information on virtuals.

GIRepository.interface_info_get_constant(info, n)
Parameters:
Returns:

the #GIConstantInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an interface type constant at index n.

GIRepository.interface_info_get_iface_struct(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIInterfaceInfo

Returns:

the #GIStructInfo or None. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Returns the layout C structure associated with this #GInterface.

GIRepository.interface_info_get_method(info, n)
Parameters:
Returns:

the #GIFunctionInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an interface type method at index n.

GIRepository.interface_info_get_n_constants(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIInterfaceInfo

Returns:

number of constants

Return type:

int

Obtain the number of constants that this interface type has.

GIRepository.interface_info_get_n_methods(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIInterfaceInfo

Returns:

number of methods

Return type:

int

Obtain the number of methods that this interface type has.

GIRepository.interface_info_get_n_prerequisites(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIInterfaceInfo

Returns:

number of prerequisites

Return type:

int

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.

GIRepository.interface_info_get_n_properties(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIInterfaceInfo

Returns:

number of properties

Return type:

int

Obtain the number of properties that this interface type has.

GIRepository.interface_info_get_n_signals(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIInterfaceInfo

Returns:

number of signals

Return type:

int

Obtain the number of signals that this interface type has.

GIRepository.interface_info_get_n_vfuncs(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIInterfaceInfo

Returns:

number of virtual functions

Return type:

int

Obtain the number of virtual functions that this interface type has.

GIRepository.interface_info_get_prerequisite(info, n)
Parameters:
Returns:

the prerequisites as a GIRepository.BaseInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an interface type prerequisites index n.

GIRepository.interface_info_get_property(info, n)
Parameters:
Returns:

the #GIPropertyInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an interface type property at index n.

GIRepository.interface_info_get_signal(info, n)
Parameters:
Returns:

the #GISignalInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an interface type signal at index n.

GIRepository.interface_info_get_vfunc(info, n)
Parameters:
Returns:

the #GIVFuncInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an interface type virtual function at index n.

GIRepository.invoke_error_quark()
Returns:

TODO

Return type:

int

TODO

GIRepository.object_info_find_method(info, name)
Parameters:
Returns:

the #GIFunctionInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo or None

Obtain a method of the object type given a name. None will be returned if there’s no method available with that name.

GIRepository.object_info_find_method_using_interfaces(info, name)
Parameters:
Returns:

the #GIFunctionInfo. Free the struct by calling g_base_info_unref() when done.

implementor:

The implementor of the interface

Return type:

(GIRepository.BaseInfo or None, implementor: GIRepository.BaseInfo)

Obtain a method of the object given a name, searching both the object info and any interfaces it implements. None 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.

GIRepository.object_info_find_signal(info, name)
Parameters:
Returns:

Info for the signal with name name in info, or None on failure.

Return type:

GIRepository.BaseInfo or None

TODO

GIRepository.object_info_find_vfunc(info, name)
Parameters:
Returns:

the #GIVFuncInfo, or None. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo or None

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 GIRepository.vfunc_info_get_invoker(), otherwise None will be returned. See the documentation for GIRepository.vfunc_info_get_invoker() for more information on invoking virtuals.

GIRepository.object_info_find_vfunc_using_interfaces(info, name)
Parameters:
Returns:

the #GIVFuncInfo. Free the struct by calling g_base_info_unref() when done.

implementor:

The implementor of the interface

Return type:

(GIRepository.BaseInfo or None, implementor: GIRepository.BaseInfo)

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 GIRepository.vfunc_info_get_invoker(), otherwise None will be returned.

Note that this function does *not* search parent classes; you will have to chain up if that’s desired.

GIRepository.object_info_get_abstract(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

True if the object type is abstract

Return type:

bool

Obtain if the object type is an abstract type, eg if it cannot be instantiated

GIRepository.object_info_get_class_struct(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

the #GIStructInfo or None. Free with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo or None

Every GObject.Object has two structures; an instance structure and a class structure. This function returns the metadata for the class structure.

GIRepository.object_info_get_constant(info, n)
Parameters:
Returns:

the #GIConstantInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an object type constant at index n.

GIRepository.object_info_get_field(info, n)
Parameters:
Returns:

the #GIFieldInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an object type field at index n.

GIRepository.object_info_get_final(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

True if the object type is final

Return type:

bool

Checks whether the object type is a final type, i.e. if it cannot be derived

New in version 1.70.

GIRepository.object_info_get_fundamental(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

True if the object type is a fundamental type

Return type:

bool

Obtain if the object type is of a fundamental type which is not GObject.TYPE_OBJECT. This is mostly for supporting GstMiniObject.

GIRepository.object_info_get_get_value_function(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

the symbol or None

Return type:

str or None

Obtain the symbol name of the function that should be called to convert an object instance pointer of this object type to a GObject.Value. I’s mainly used fundamental types. The type signature for the symbol is %GIObjectInfoGetValueFunction, to fetch the function pointer see GIRepository.object_info_get_get_value_function().

GIRepository.object_info_get_interface(info, n)
Parameters:
Returns:

the #GIInterfaceInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an object type interface at index n.

GIRepository.object_info_get_method(info, n)
Parameters:
Returns:

the #GIFunctionInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an object type method at index n.

GIRepository.object_info_get_n_constants(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

number of constants

Return type:

int

Obtain the number of constants that this object type has.

GIRepository.object_info_get_n_fields(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

number of fields

Return type:

int

Obtain the number of fields that this object type has.

GIRepository.object_info_get_n_interfaces(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

number of interfaces

Return type:

int

Obtain the number of interfaces that this object type has.

GIRepository.object_info_get_n_methods(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

number of methods

Return type:

int

Obtain the number of methods that this object type has.

GIRepository.object_info_get_n_properties(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

number of properties

Return type:

int

Obtain the number of properties that this object type has.

GIRepository.object_info_get_n_signals(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

number of signals

Return type:

int

Obtain the number of signals that this object type has.

GIRepository.object_info_get_n_vfuncs(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

number of virtual functions

Return type:

int

Obtain the number of virtual functions that this object type has.

GIRepository.object_info_get_parent(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

the #GIObjectInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo or None

Obtain the parent of the object type.

GIRepository.object_info_get_property(info, n)
Parameters:
Returns:

the #GIPropertyInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an object type property at index n.

GIRepository.object_info_get_ref_function(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

the symbol or None

Return type:

str or None

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 GIRepository.object_info_get_ref_function().

GIRepository.object_info_get_set_value_function(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

the symbol or None

Return type:

str or None

Obtain the symbol name of the function that should be called to convert set a GObject.Value 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 GIRepository.object_info_get_set_value_function().

GIRepository.object_info_get_signal(info, n)
Parameters:
Returns:

the #GISignalInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an object type signal at index n.

GIRepository.object_info_get_type_init(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

the type init function

Return type:

str

Obtain the function which when called will return the GObject.GType function for which this object type is registered.

GIRepository.object_info_get_type_name(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

name of the objects type

Return type:

str

Obtain the name of the objects class/type.

GIRepository.object_info_get_unref_function(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIObjectInfo

Returns:

the symbol or None

Return type:

str or None

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 GIRepository.object_info_get_unref_function().

GIRepository.object_info_get_vfunc(info, n)
Parameters:
Returns:

the #GIVFuncInfo. Free the struct by calling g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain an object type virtual function at index n.

GIRepository.property_info_get_flags(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIPropertyInfo

Returns:

the flags

Return type:

GObject.ParamFlags

Obtain the flags for this property info. See GObject.ParamFlags for more information about possible flag values.

GIRepository.property_info_get_getter(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIPropertyInfo

Returns:

the function info or None if not set. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo or None

Obtains the getter function associated with this #GIPropertyInfo.

The setter is only available for GObject.ParamFlags.READABLE properties.

GIRepository.property_info_get_ownership_transfer(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIPropertyInfo

Returns:

the transfer

Return type:

GIRepository.Transfer

Obtain the ownership transfer for this property. See GIRepository.Transfer for more information about transfer values.

GIRepository.property_info_get_setter(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIPropertyInfo

Returns:

the function info or None if not set. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo or None

Obtains the setter function associated with this #GIPropertyInfo.

The setter is only available for GObject.ParamFlags.WRITABLE properties that are also not GObject.ParamFlags.CONSTRUCT_ONLY.

GIRepository.property_info_get_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIPropertyInfo

Returns:

the #GITypeInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for the property info.

GIRepository.registered_type_info_get_g_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIRegisteredTypeInfo

Returns:

the GObject.GType.

Return type:

GObject.GType

Obtain the GObject.GType for this registered type or GObject.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.

GIRepository.registered_type_info_get_type_init(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIRegisteredTypeInfo

Returns:

the symbol name of the type init function, suitable for passing into g_module_symbol().

Return type:

str

Obtain the type init function for info. The type init function is the function which will register the GObject.GType within the GObject.Object type system. Usually this is not called by langauge bindings or applications, use GIRepository.registered_type_info_get_g_type() directly instead.

GIRepository.registered_type_info_get_type_name(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIRegisteredTypeInfo

Returns:

the type name

Return type:

str

Obtain the type name of the struct within the GObject.Object type system. This type can be passed to GObject.type_name() to get a GObject.GType.

GIRepository.signal_info_get_class_closure(info)
Parameters:

info (GIRepository.BaseInfo) – a #GISignalInfo

Returns:

the class closure or None

Return type:

GIRepository.BaseInfo

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 None will be returned.

GIRepository.signal_info_get_flags(info)
Parameters:

info (GIRepository.BaseInfo) – a #GISignalInfo

Returns:

the flags

Return type:

GObject.SignalFlags

Obtain the flags for this signal info. See GObject.SignalFlags for more information about possible flag values.

GIRepository.signal_info_true_stops_emit(info)
Parameters:

info (GIRepository.BaseInfo) – a #GISignalInfo

Returns:

True if returning true stops the signal emission

Return type:

bool

Obtain if the returning true in the signal handler will stop the emission of the signal.

GIRepository.struct_info_find_field(info, name)
Parameters:
Returns:

the #GIFieldInfo or None if not found, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for field named name.

New in version 1.46.

GIRepository.struct_info_find_method(info, name)
Parameters:
Returns:

the #GIFunctionInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for method named name.

GIRepository.struct_info_get_alignment(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIStructInfo

Returns:

required alignment in bytes

Return type:

int

Obtain the required alignment of the structure.

GIRepository.struct_info_get_copy_function(info)
Parameters:

info (GIRepository.BaseInfo) – a struct information blob

Returns:

the name of the copy function

Return type:

str or None

Retrieves the name of the copy function for info, if any is set.

New in version 1.76.

GIRepository.struct_info_get_field(info, n)
Parameters:
Returns:

the #GIFieldInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for field with specified index.

GIRepository.struct_info_get_free_function(info)
Parameters:

info (GIRepository.BaseInfo) – a struct information blob

Returns:

the name of the free function

Return type:

str or None

Retrieves the name of the free function for info, if any is set.

New in version 1.76.

GIRepository.struct_info_get_method(info, n)
Parameters:
Returns:

the #GIFunctionInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for method with specified index.

GIRepository.struct_info_get_n_fields(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIStructInfo

Returns:

number of fields

Return type:

int

Obtain the number of fields this structure has.

GIRepository.struct_info_get_n_methods(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIStructInfo

Returns:

number of methods

Return type:

int

Obtain the number of methods this structure has.

GIRepository.struct_info_get_size(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIStructInfo

Returns:

size of the structure in bytes

Return type:

int

Obtain the total size of the structure.

GIRepository.struct_info_is_foreign(info)
Parameters:

info (GIRepository.BaseInfo) – TODO

Returns:

TODO

Return type:

bool

TODO

GIRepository.struct_info_is_gtype_struct(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIStructInfo

Returns:

True if this is a class struct, False otherwise

Return type:

bool

Return true if this structure represents the “class structure” for some GObject.Object or #GInterface. This function is mainly useful to hide this kind of structure from generated public APIs.

GIRepository.type_info_argument_from_hash_pointer(info, hash_pointer, arg)
Parameters:

GLib data structures, such as GLib.List, GLib.SList, and GLib.HashTable, all store data pointers. In the case where the list or hash table is storing single types rather than structs, these data pointers may have values stuffed into them via macros such as %GPOINTER_TO_INT.

Use this function to ensure that all values are correctly extracted from stuffed pointers, regardless of the machine’s architecture or endianness.

This function fills in the appropriate field of arg with the value extracted from hash_pointer, depending on the storage type of info.

New in version 1.66.

GIRepository.type_info_get_array_fixed_size(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

the size or -1 if it’s not an array

Return type:

int

Obtain the fixed array size of the type. The type tag must be a GIRepository.TypeTag.ARRAY or -1 will be returned.

GIRepository.type_info_get_array_length(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

the array length, or -1 if the type is not an array

Return type:

int

Obtain the position of the argument which gives the array length of the type. The type tag must be a GIRepository.TypeTag.ARRAY or -1 will be returned.

GIRepository.type_info_get_array_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

the array type or -1

Return type:

GIRepository.ArrayType

Obtain the array type for this type. See GIRepository.ArrayType for a list of possible values. If the type tag of this type is not array, -1 will be returned.

GIRepository.type_info_get_interface(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

the GIRepository.BaseInfo, or None. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

For types which have GIRepository.TypeTag.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 GIRepository.BaseInfo to further query whether it is a concrete GObject.Object, a GInterface, a structure, etc. using GIRepository.BaseInfo.get_type().

GIRepository.type_info_get_param_type(info, n)
Parameters:
Returns:

the param type info

Return type:

GIRepository.BaseInfo

Obtain the parameter type n.

GIRepository.type_info_get_storage_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

the type tag

Return type:

GIRepository.TypeTag

Obtain the type tag corresponding to the underlying storage type in C for the type. See GIRepository.TypeTag for a list of type tags.

New in version 1.66.

GIRepository.type_info_get_tag(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

the type tag

Return type:

GIRepository.TypeTag

Obtain the type tag for the type. See GIRepository.TypeTag for a list of type tags.

GIRepository.type_info_hash_pointer_from_argument(info, arg)
Parameters:
Returns:

A stuffed pointer, that can be stored in a GLib.HashTable, for example

Return type:

object or None

GLib data structures, such as GLib.List, GLib.SList, and GLib.HashTable, all store data pointers. In the case where the list or hash table is storing single types rather than structs, these data pointers may have values stuffed into them via macros such as %GPOINTER_TO_INT.

Use this function to ensure that all values are correctly stuffed into pointers, regardless of the machine’s architecture or endianness.

This function returns a pointer stuffed with the appropriate field of arg, depending on the storage type of info.

New in version 1.66.

GIRepository.type_info_is_pointer(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

True if it is a pointer

Return type:

bool

Obtain if the type is passed as a reference.

Note that the types of GIRepository.Direction.OUT and GIRepository.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).

GIRepository.type_info_is_zero_terminated(info)
Parameters:

info (GIRepository.BaseInfo) – a #GITypeInfo

Returns:

True if zero terminated

Return type:

bool

Obtain if the last element of the array is None. The type tag must be a GIRepository.TypeTag.ARRAY or False will be returned.

GIRepository.type_tag_argument_from_hash_pointer(storage_type, hash_pointer, arg)
Parameters:

GLib data structures, such as GLib.List, GLib.SList, and GLib.HashTable, all store data pointers. In the case where the list or hash table is storing single types rather than structs, these data pointers may have values stuffed into them via macros such as %GPOINTER_TO_INT.

Use this function to ensure that all values are correctly extracted from stuffed pointers, regardless of the machine’s architecture or endianness.

This function fills in the appropriate field of arg with the value extracted from hash_pointer, depending on storage_type.

New in version 1.72.

GIRepository.type_tag_hash_pointer_from_argument(storage_type, arg)
Parameters:
Returns:

A stuffed pointer, that can be stored in a GLib.HashTable, for example

Return type:

object or None

GLib data structures, such as GLib.List, GLib.SList, and GLib.HashTable, all store data pointers. In the case where the list or hash table is storing single types rather than structs, these data pointers may have values stuffed into them via macros such as %GPOINTER_TO_INT.

Use this function to ensure that all values are correctly stuffed into pointers, regardless of the machine’s architecture or endianness.

This function returns a pointer stuffed with the appropriate field of arg, depending on storage_type.

New in version 1.72.

GIRepository.type_tag_to_string(type)
Parameters:

type (GIRepository.TypeTag) – the type_tag

Returns:

the string

Return type:

str

Obtain a string representation of type

GIRepository.union_info_find_method(info, name)
Parameters:
Returns:

the #GIFunctionInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for method named name.

GIRepository.union_info_get_alignment(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIUnionInfo

Returns:

required alignment in bytes

Return type:

int

Obtain the required alignment of the union.

GIRepository.union_info_get_copy_function(info)
Parameters:

info (GIRepository.BaseInfo) – a union information blob

Returns:

the name of the copy function

Return type:

str or None

Retrieves the name of the copy function for info, if any is set.

New in version 1.76.

GIRepository.union_info_get_discriminator(info, n)
Parameters:
Returns:

the #GIConstantInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain discriminator value assigned for n-th union field, i.e. n-th union field is the active one if discriminator contains this constant.

GIRepository.union_info_get_discriminator_offset(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIUnionInfo

Returns:

offset in bytes of the discriminator

Return type:

int

Returns offset of the discriminator field in the structure.

GIRepository.union_info_get_discriminator_type(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIUnionInfo

Returns:

the #GITypeInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information of the union discriminator.

GIRepository.union_info_get_field(info, n)
Parameters:
Returns:

the #GIFieldInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for field with specified index.

GIRepository.union_info_get_free_function(info)
Parameters:

info (GIRepository.BaseInfo) – a union information blob

Returns:

the name of the free function

Return type:

str or None

Retrieves the name of the free function for info, if any is set.

New in version 1.76.

GIRepository.union_info_get_method(info, n)
Parameters:
Returns:

the #GIFunctionInfo, free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

Obtain the type information for method with specified index.

GIRepository.union_info_get_n_fields(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIUnionInfo

Returns:

number of fields

Return type:

int

Obtain the number of fields this union has.

GIRepository.union_info_get_n_methods(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIUnionInfo

Returns:

number of methods

Return type:

int

Obtain the number of methods this union has.

GIRepository.union_info_get_size(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIUnionInfo

Returns:

size of the union in bytes

Return type:

int

Obtain the total size of the union.

GIRepository.union_info_is_discriminated(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIUnionInfo

Returns:

True if this is a discriminated union, False otherwise

Return type:

bool

Return true if this union contains discriminator field.

GIRepository.value_info_get_value(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIValueInfo

Returns:

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.

Return type:

int

Obtain the enumeration value of the #GIValueInfo.

GIRepository.vfunc_info_get_address(info, implementor_gtype)
Parameters:
Raises:

GLib.Error

Returns:

address to a function or None if an error happened

Return type:

object or None

This method will look up where inside the type struct of implementor_gtype is the implementation for info.

GIRepository.vfunc_info_get_flags(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIVFuncInfo

Returns:

the flags

Return type:

GIRepository.VFuncInfoFlags

Obtain the flags for this virtual function info. See GIRepository.VFuncInfoFlags for more information about possible flag values.

GIRepository.vfunc_info_get_invoker(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIVFuncInfo

Returns:

the #GIVFuncInfo or None. Free it with g_base_info_unref() when done.

Return type:

GIRepository.BaseInfo

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.

GIRepository.vfunc_info_get_offset(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIVFuncInfo

Returns:

the struct offset or 0xFFFF if it’s unknown

Return type:

int

Obtain the offset of the function pointer in the class struct. The value 0xFFFF indicates that the struct offset is unknown.

GIRepository.vfunc_info_get_signal(info)
Parameters:

info (GIRepository.BaseInfo) – a #GIVFuncInfo

Returns:

the signal or None if none set

Return type:

GIRepository.BaseInfo

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.