<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>GObject_introspection__Enum_info (gobject-introspection.GObject_introspection__Enum_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; GObject_introspection__Enum_info</nav><h1>Module <code>GObject_introspection__Enum_info</code></h1><p>Enum_info — Structs representing an enumeration and its values</p></header><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>A Enum_info represents an enumeration and a Value_info struct represents a value of an enumeration. The Enum_info contains a set of values and a type The Value_info is fetched by calling Enum_info.get_value on a Enum_info.</p></dd></dl><dl><dt class="spec value" id="val-enuminfo"><a href="#val-enuminfo" class="anchor"></a><code><span class="keyword">val</span> enuminfo : <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_n_values"><a href="#val-get_n_values" class="anchor"></a><code><span class="keyword">val</span> get_n_values : <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 values this enumeration contains.</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 enum 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="../GObject_introspection/Function_info/index.html#type-t">GObject_introspection.Function_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain an enum type method at index n .</p></dd></dl><dl><dt class="spec value" id="val-get_value"><a href="#val-get_value" class="anchor"></a><code><span class="keyword">val</span> get_value : <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><span><a href="../GObject_introspection/Value_info/index.html#type-t">GObject_introspection.Value_info.t</a> Ctypes.structure</span> Ctypes.ptr</span> option</span></code></dt><dd><p>Obtain a value for this enumeration.</p></dd></dl><dl><dt class="spec value" id="val-get_error_domain"><a href="#val-get_error_domain" class="anchor"></a><code><span class="keyword">val</span> get_error_domain : <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 string form of the quark for the error domain associated with this enum, if any.</p></dd></dl><dl><dt class="spec value" id="val-get_storage_type"><a href="#val-get_storage_type" class="anchor"></a><code><span class="keyword">val</span> get_storage_type : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <a href="../Bindings/Types/index.html#type-tag">Bindings.Types.tag</a></code></dt><dd><p>Obtain the tag of the type used for the enum in the C ABI. This 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.</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="../GObject_introspection/Base_info/index.html#type-t">GObject_introspection.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 enum 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="../GObject_introspection/Base_info/index.html#type-t">GObject_introspection.Base_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Just cast OCaml Ctypes enum 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="../GObject_introspection/Base_info/index.html#type-t">GObject_introspection.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 Enum_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="../GObject_introspection/Base_info/index.html#type-t">GObject_introspection.Base_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Return a Base_info.t form a Enum_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="../GObject_introspection/Registered_type_info/index.html#type-t">GObject_introspection.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 enum 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="../GObject_introspection/Registered_type_info/index.html#type-t">GObject_introspection.Registered_type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Just cast OCaml Ctypes enum 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="../GObject_introspection/Registered_type_info/index.html#type-t">GObject_introspection.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 Enum_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="../GObject_introspection/Registered_type_info/index.html#type-t">GObject_introspection.Registered_type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Return a Registered_type_info.t form a Enum_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>