<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Registered_type_info (gobject-introspection.GObject_introspection.Registered_type_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; Registered_type_info</nav><h1>Module <code>GObject_introspection.Registered_type_info</code></h1></header><aside><p>Registered_type_info — Struct representing a struct with a GType.</p></aside><aside><p>Registered_type_info represents an entity with a GType associated. Could be either a Enum_info, Interface_info, Object_info, Struct_info or a Union_info. A registered type info struct has a name and a type function. To get the name call Registered_type_info.get_type_name. Most users want to call Registered_type_info.get_g_type and don't worry about the rest of the details.</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></dl><dl><dt class="spec value" id="val-registeredtypeinfo"><a href="#val-registeredtypeinfo" class="anchor"></a><code><span class="keyword">val</span> registeredtypeinfo : <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_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> <span>string option</span></code></dt><dd><p>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.</p></dd></dl><dl><dt class="spec value" id="val-get_g_type"><a href="#val-get_g_type" class="anchor"></a><code><span class="keyword">val</span> get_g_type : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><a href="../Repository/index.html#type-gtype">Repository.gtype</a> option</span></code></dt><dd><p>Obtain the gtype for this registered type or 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.</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> <span>string option</span></code></dt><dd><p>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 Registered_type_info.get_g_type directly instead.</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 registeredtype 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 registeredtype info to base info</p></dd></dl><dl><dt class="spec value" id="val-add_unref_finaliser"><a href="#val-add_unref_finaliser" class="anchor"></a><code><span class="keyword">val</span> add_unref_finaliser : <span><span><a href="index.html#type-t">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>Add unref of the C underlying structure whith Gc.finalise.</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 Registered_type_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 Registered_type_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></div></body></html>