Top |
GIObjectInfo represents a classed type.
Classed types in GType inherit from GTypeInstance; the most common type is GObject.
A GIObjectInfo doesn't represent a specific instance of a classed type, instead this represent the object type (eg class).
A GIObjectInfo has methods, fields, properties, signals, interfaces, constants and virtual functions.
gboolean
g_object_info_get_abstract (GIObjectInfo *info
);
Obtain if the object type is an abstract type, eg if it cannot be instantiated
gboolean
g_object_info_get_fundamental (GIObjectInfo *info
);
Obtain if the object type is of a fundamental type which is not G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.
gboolean
g_object_info_get_final (GIObjectInfo *info
);
Checks whether the object type is a final type, i.e. if it cannot be derived
Since: 1.70
GIObjectInfo *
g_object_info_get_parent (GIObjectInfo *info
);
Obtain the parent of the object type.
the GIObjectInfo. Free the struct by calling
g_base_info_unref()
when done.
[transfer full][nullable]
const gchar *
g_object_info_get_type_name (GIObjectInfo *info
);
Obtain the name of the objects class/type.
const gchar *
g_object_info_get_type_init (GIObjectInfo *info
);
Obtain the function which when called will return the GType function for which this object type is registered.
gint
g_object_info_get_n_constants (GIObjectInfo *info
);
Obtain the number of constants that this object type has.
GIConstantInfo * g_object_info_get_constant (GIObjectInfo *info
,gint n
);
Obtain an object type constant at index n
.
the GIConstantInfo. Free the struct by calling
g_base_info_unref()
when done.
[transfer full]
gint
g_object_info_get_n_fields (GIObjectInfo *info
);
Obtain the number of fields that this object type has.
GIFieldInfo * g_object_info_get_field (GIObjectInfo *info
,gint n
);
Obtain an object type field at index n
.
gint
g_object_info_get_n_interfaces (GIObjectInfo *info
);
Obtain the number of interfaces that this object type has.
GIInterfaceInfo * g_object_info_get_interface (GIObjectInfo *info
,gint n
);
Obtain an object type interface at index n
.
the GIInterfaceInfo. Free the struct by calling
g_base_info_unref()
when done.
[transfer full]
gint
g_object_info_get_n_methods (GIObjectInfo *info
);
Obtain the number of methods that this object type has.
GIFunctionInfo * g_object_info_get_method (GIObjectInfo *info
,gint n
);
Obtain an object type method at index n
.
the GIFunctionInfo. Free the struct by calling
g_base_info_unref()
when done.
[transfer full]
GIFunctionInfo * g_object_info_find_method (GIObjectInfo *info
,const gchar *name
);
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.
[transfer full][nullable]
GIFunctionInfo * g_object_info_find_method_using_interfaces (GIObjectInfo *info
,const gchar *name
,GIObjectInfo **implementor
);
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.
info |
||
name |
name of method to obtain |
|
implementor |
The implementor of the interface. |
[out][transfer full] |
the GIFunctionInfo. Free the struct by calling
g_base_info_unref()
when done.
[transfer full][nullable]
gint
g_object_info_get_n_properties (GIObjectInfo *info
);
Obtain the number of properties that this object type has.
GIPropertyInfo * g_object_info_get_property (GIObjectInfo *info
,gint n
);
Obtain an object type property at index n
.
the GIPropertyInfo. Free the struct by calling
g_base_info_unref()
when done.
[transfer full]
gint
g_object_info_get_n_signals (GIObjectInfo *info
);
Obtain the number of signals that this object type has.
GISignalInfo * g_object_info_get_signal (GIObjectInfo *info
,gint n
);
Obtain an object type signal at index n
.
GISignalInfo * g_object_info_find_signal (GIObjectInfo *info
,const gchar *name
);
TODO
gint
g_object_info_get_n_vfuncs (GIObjectInfo *info
);
Obtain the number of virtual functions that this object type has.
GIVFuncInfo * g_object_info_get_vfunc (GIObjectInfo *info
,gint n
);
Obtain an object type virtual function at index n
.
GIVFuncInfo * g_object_info_find_vfunc (GIObjectInfo *info
,const gchar *name
);
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.
[transfer full][nullable]
GIVFuncInfo * g_object_info_find_vfunc_using_interfaces (GIObjectInfo *info
,const gchar *name
,GIObjectInfo **implementor
);
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.
info |
||
name |
name of vfunc to obtain |
|
implementor |
The implementor of the interface. |
[out][transfer full] |
the GIVFuncInfo. Free the struct by calling
g_base_info_unref()
when done.
[transfer full][nullable]
GIStructInfo *
g_object_info_get_class_struct (GIObjectInfo *info
);
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.
[transfer full][nullable]
const char *
g_object_info_get_ref_function (GIObjectInfo *info
);
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()
.
GIObjectInfoRefFunction
g_object_info_get_ref_function_pointer
(GIObjectInfo *info
);
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.
[skip]
const char *
g_object_info_get_unref_function (GIObjectInfo *info
);
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()
.
GIObjectInfoUnrefFunction
g_object_info_get_unref_function_pointer
(GIObjectInfo *info
);
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.
[skip]
const char *
g_object_info_get_set_value_function (GIObjectInfo *info
);
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()
.
GIObjectInfoSetValueFunction
g_object_info_get_set_value_function_pointer
(GIObjectInfo *info
);
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.
[skip]
const char *
g_object_info_get_get_value_function (GIObjectInfo *info
);
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()
.
GIObjectInfoGetValueFunction
g_object_info_get_get_value_function_pointer
(GIObjectInfo *info
);
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.
[skip]
void *
(*GIObjectInfoRefFunction) (void *object
);
Increases the reference count of an object instance.
[skip]
void
(*GIObjectInfoUnrefFunction) (void *object
);
Decreases the reference count of an object instance.
[skip]
void (*GIObjectInfoSetValueFunction) (GValue *value
,void *object
);
Update value
and attach the object instance pointer object
to it.
[skip]