<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Object_info (gobject-introspection.GObject_introspection.Object_info)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">gobject-introspection</a> &#x00BB; <a href="../index.html">GObject_introspection</a> &#x00BB; Object_info</nav><h1>Module <code>GObject_introspection.Object_info</code></h1></header><aside><p>Object_info — Struct representing a GObject</p></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>Object_info represents a GObject. This doesn't represent a specific instance of a GObject, instead this represent the object type (eg class). A GObject has methods, fields, properties, signals, interfaces, constants and virtual functions.</p></dd></dl><dl><dt class="spec value" id="val-objectinfo"><a href="#val-objectinfo" class="anchor"></a><code><span class="keyword">val</span> objectinfo : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.typ</span></code></dt><dt class="spec value" id="val-get_abstract"><a href="#val-get_abstract" class="anchor"></a><code><span class="keyword">val</span> get_abstract : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>Obtain if the object type is an abstract type, eg if it cannot be instantiated</p></dd></dl><dl><dt class="spec value" id="val-get_fundamental"><a href="#val-get_fundamental" class="anchor"></a><code><span class="keyword">val</span> get_fundamental : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> bool</code></dt><dd><p>Obtain if the object type is of a fundamental type which is not G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.</p></dd></dl><dl><dt class="spec value" id="val-get_parent"><a href="#val-get_parent" class="anchor"></a><code><span class="keyword">val</span> get_parent : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="../Base_info/index.html#type-t">Base_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain the parent of the object type.</p></dd></dl><dl><dt class="spec value" id="val-get_type_name"><a href="#val-get_type_name" class="anchor"></a><code><span class="keyword">val</span> get_type_name : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> string</code></dt><dd><p>Obtain the name of the objects class/type.</p></dd></dl><dl><dt class="spec value" id="val-get_type_init"><a href="#val-get_type_init" class="anchor"></a><code><span class="keyword">val</span> get_type_init : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> string</code></dt><dd><p>Obtain the function which when called will return the GType function for which this object type is registered.</p></dd></dl><dl><dt class="spec value" id="val-get_n_constants"><a href="#val-get_n_constants" class="anchor"></a><code><span class="keyword">val</span> get_n_constants : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int</code></dt><dd><p>Obtain the number of constants that this object type has.</p></dd></dl><dl><dt class="spec value" id="val-get_constant"><a href="#val-get_constant" class="anchor"></a><code><span class="keyword">val</span> get_constant : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span><a href="../Constant_info/index.html#type-t">Constant_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an object type constant at index n .</p></dd></dl><dl><dt class="spec value" id="val-get_n_fields"><a href="#val-get_n_fields" class="anchor"></a><code><span class="keyword">val</span> get_n_fields : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int</code></dt><dd><p>Obtain the number of fields that this object type has.</p></dd></dl><dl><dt class="spec value" id="val-get_field"><a href="#val-get_field" class="anchor"></a><code><span class="keyword">val</span> get_field : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span><a href="../Field_info/index.html#type-t">Field_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an object type field at index n .</p></dd></dl><dl><dt class="spec value" id="val-get_n_interfaces"><a href="#val-get_n_interfaces" class="anchor"></a><code><span class="keyword">val</span> get_n_interfaces : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int</code></dt><dd><p>Obtain the number of interfaces that this object type has.</p></dd></dl><dl><dt class="spec value" id="val-get_interface"><a href="#val-get_interface" class="anchor"></a><code><span class="keyword">val</span> get_interface : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span><a href="../Interface_info/index.html#type-t">Interface_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an object type interface at index n .</p></dd></dl><dl><dt class="spec value" id="val-get_n_methods"><a href="#val-get_n_methods" class="anchor"></a><code><span class="keyword">val</span> get_n_methods : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int</code></dt><dd><p>Obtain the number of methods that this object type has.</p></dd></dl><dl><dt class="spec value" id="val-get_method"><a href="#val-get_method" class="anchor"></a><code><span class="keyword">val</span> get_method : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span><a href="../Function_info/index.html#type-t">Function_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an object type method at index n .</p></dd></dl><dl><dt class="spec value" id="val-find_method"><a href="#val-find_method" class="anchor"></a><code><span class="keyword">val</span> find_method : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span><span><a href="../Function_info/index.html#type-t">Function_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span></code></dt><dd><p>Obtain a method of the object type given a name . None will be returned if there's no method available with that name.</p></dd></dl><dl><dt class="spec value" id="val-get_n_properties"><a href="#val-get_n_properties" class="anchor"></a><code><span class="keyword">val</span> get_n_properties : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int</code></dt><dd><p>Obtain the number of properties that this object type has.</p></dd></dl><dl><dt class="spec value" id="val-get_property"><a href="#val-get_property" class="anchor"></a><code><span class="keyword">val</span> get_property : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span><a href="../Property_info/index.html#type-t">Property_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an object type property at index n .</p></dd></dl><dl><dt class="spec value" id="val-get_n_signals"><a href="#val-get_n_signals" class="anchor"></a><code><span class="keyword">val</span> get_n_signals : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int</code></dt><dd><p>Obtain the number of signals that this object type has.</p></dd></dl><dl><dt class="spec value" id="val-get_signal"><a href="#val-get_signal" class="anchor"></a><code><span class="keyword">val</span> get_signal : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span><a href="../Signal_info/index.html#type-t">Signal_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an object type signal at index n .</p></dd></dl><dl><dt class="spec value" id="val-find_signal"><a href="#val-find_signal" class="anchor"></a><code><span class="keyword">val</span> find_signal : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span><span><a href="../Signal_info/index.html#type-t">Signal_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span></code></dt><dd><p>Find a signal with a name.</p></dd></dl><dl><dt class="spec value" id="val-get_n_vfuncs"><a href="#val-get_n_vfuncs" class="anchor"></a><code><span class="keyword">val</span> get_n_vfuncs : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int</code></dt><dd><p>Obtain the number of virtual functions that this object type has.</p></dd></dl><dl><dt class="spec value" id="val-get_vfunc"><a href="#val-get_vfunc" class="anchor"></a><code><span class="keyword">val</span> get_vfunc : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <span><span><a href="../VFunc_info/index.html#type-t">VFunc_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an object type virtual function at index n .</p></dd></dl><dl><dt class="spec value" id="val-find_vfunc"><a href="#val-find_vfunc" class="anchor"></a><code><span class="keyword">val</span> find_vfunc : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span><span><a href="../VFunc_info/index.html#type-t">VFunc_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span></code></dt><dd><p>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 VFunc_info.get_invoker, otherwise None will be returned. See the documentation for VFunc_info.get_invoker for more information on invoking virtuals.</p></dd></dl><dl><dt class="spec value" id="val-get_class_struct"><a href="#val-get_class_struct" class="anchor"></a><code><span class="keyword">val</span> get_class_struct : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><span><a href="../Struct_info/index.html#type-t">Struct_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span></code></dt><dd><p>Every GObject has two structures; an instance structure and a class structure. This function returns the metadata for the class structure. It returns a Struct_info.t or None.</p></dd></dl><dl><dt class="spec value" id="val-find_method_using_interfaces"><a href="#val-find_method_using_interfaces" class="anchor"></a><code><span class="keyword">val</span> find_method_using_interfaces : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span><span><a href="../Function_info/index.html#type-t">Function_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span> * <span><span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span></code></dt><dd><p>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.</p></dd></dl><dl><dt class="spec value" id="val-get_ref_function"><a href="#val-get_ref_function" class="anchor"></a><code><span class="keyword">val</span> get_ref_function : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span>string option</span></code></dt><dd><p>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 Object_infoRefFunction, to fetch the function pointer see Object_info.get_ref_function.</p></dd></dl><dl><dt class="spec value" id="val-get_unref_function"><a href="#val-get_unref_function" class="anchor"></a><code><span class="keyword">val</span> get_unref_function : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span>string option</span></code></dt><dd><p>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 Object_infoUnrefFunction, to fetch the function pointer see Object_info.get_unref_function.</p></dd></dl><dl><dt class="spec value" id="val-get_set_value_function"><a href="#val-get_set_value_function" class="anchor"></a><code><span class="keyword">val</span> get_set_value_function : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span>string option</span></code></dt><dd><p>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 Object_infoSetValueFunction, to fetch the function pointer see Object_info.get_set_value_function.</p></dd></dl><dl><dt class="spec value" id="val-get_get_value_function"><a href="#val-get_get_value_function" class="anchor"></a><code><span class="keyword">val</span> get_get_value_function : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span>string option</span></code></dt><dd><p>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 Object_infoGetValueFunction, to fetch the function pointer see Object_info.get_get_value_function.</p></dd></dl><dl><dt class="spec value" id="val-find_vfunc_using_interfaces"><a href="#val-find_vfunc_using_interfaces" class="anchor"></a><code><span class="keyword">val</span> find_vfunc_using_interfaces : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <span><span><span><a href="../VFunc_info/index.html#type-t">VFunc_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span> * <span><span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span></code></dt><dd><p>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 None will be returned. Note that this function does *not* search parent classes; you will have to chain up if that's desired.</p></dd></dl><dl><dt class="spec value" id="val-cast_from_baseinfo"><a href="#val-cast_from_baseinfo" class="anchor"></a><code><span class="keyword">val</span> cast_from_baseinfo : <span><span><a href="../Base_info/index.html#type-t">Base_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Just cast OCaml Ctypes base info to object info.</p></dd></dl><dl><dt class="spec value" id="val-cast_to_baseinfo"><a href="#val-cast_to_baseinfo" class="anchor"></a><code><span class="keyword">val</span> cast_to_baseinfo : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="../Base_info/index.html#type-t">Base_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Just cast OCaml Ctypes object info to base info</p></dd></dl><dl><dt class="spec value" id="val-from_baseinfo"><a href="#val-from_baseinfo" class="anchor"></a><code><span class="keyword">val</span> from_baseinfo : <span><span><a href="../Base_info/index.html#type-t">Base_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Return a Object_info.t from a Base_info.t, the underlying C structure ref count is increased and the value is Gc.finalis&quot;ed&quot; with Base_info.baseinfo_unref.</p></dd></dl><dl><dt class="spec value" id="val-to_baseinfo"><a href="#val-to_baseinfo" class="anchor"></a><code><span class="keyword">val</span> to_baseinfo : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="../Base_info/index.html#type-t">Base_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Return a Base_info.t from a Object_info, the underlying C structure ref count is increased and the value is Gc.finalis&quot;ed&quot; with Base_info.baseinfo_unref.</p></dd></dl><dl><dt class="spec value" id="val-cast_from_registeredtypeinfo"><a href="#val-cast_from_registeredtypeinfo" class="anchor"></a><code><span class="keyword">val</span> cast_from_registeredtypeinfo : <span><span><a href="../Registered_type_info/index.html#type-t">Registered_type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Just cast OCaml Ctypes registeredtype info to object info.</p></dd></dl><dl><dt class="spec value" id="val-cast_to_registeredtypeinfo"><a href="#val-cast_to_registeredtypeinfo" class="anchor"></a><code><span class="keyword">val</span> cast_to_registeredtypeinfo : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="../Registered_type_info/index.html#type-t">Registered_type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Just cast OCaml Ctypes object info to registeredtype info</p></dd></dl><dl><dt class="spec value" id="val-from_registeredtypeinfo"><a href="#val-from_registeredtypeinfo" class="anchor"></a><code><span class="keyword">val</span> from_registeredtypeinfo : <span><span><a href="../Registered_type_info/index.html#type-t">Registered_type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Return a Object_info.t from a Registered_type_info.t, the underlying C structure ref count is increased and the value is Gc.finalis&quot;ed&quot; with Registered_type_info.registeredtypeinfo_unref.</p></dd></dl><dl><dt class="spec value" id="val-to_registeredtypeinfo"><a href="#val-to_registeredtypeinfo" class="anchor"></a><code><span class="keyword">val</span> to_registeredtypeinfo : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="../Registered_type_info/index.html#type-t">Registered_type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Return a Registered_type_info.t form a Object_info, the underlying C structure ref count is increased and the value is Gc.finalis&quot;ed&quot; with Registered_type_info.registeredtypeinfo_unref.</p></dd></dl></div></body></html>