<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Arg_info (gobject-introspection.GObject_introspection.Arg_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; Arg_info</nav><h1>Module <code>GObject_introspection.Arg_info</code></h1></header><aside><p>Arg_info — Struct representing an argument</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>Arg_info represents an argument. An argument is always part of a Callable_info.</p></dd></dl><dl><dt class="spec value" id="val-arginfo"><a href="#val-arginfo" class="anchor"></a><code><span class="keyword">val</span> arginfo : <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_direction"><a href="#val-get_direction" class="anchor"></a><code><span class="keyword">val</span> get_direction : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <a href="../../Bindings/Arg_info/index.html#type-direction">Bindings.Arg_info.direction</a></code></dt><dd><p>Obtain the direction of the argument. Check GIDirection for possible direction values.</p></dd></dl><dl><dt class="spec value" id="val-get_closure"><a href="#val-get_closure" class="anchor"></a><code><span class="keyword">val</span> get_closure : <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 index of the user data argument. This is only valid for arguments which are callbacks. Returns index of the user data argument or -1 if there is none.</p></dd></dl><dl><dt class="spec value" id="val-get_destroy"><a href="#val-get_destroy" class="anchor"></a><code><span class="keyword">val</span> get_destroy : <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>Obtains the index of the GDestroyNotify argument. This is only valid for arguments which are callbacks. Returns index of the GDestroyNotify argument or -1 if there is none</p></dd></dl><dl><dt class="spec value" id="val-get_ownership_transfer"><a href="#val-get_ownership_transfer" class="anchor"></a><code><span class="keyword">val</span> get_ownership_transfer : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <a href="../../Bindings/Arg_info/index.html#type-transfer">Bindings.Arg_info.transfer</a></code></dt><dd><p>Obtain the ownership transfer for this argument. GITransfer contains a list of possible values.</p></dd></dl><dl><dt class="spec value" id="val-may_be_null"><a href="#val-may_be_null" class="anchor"></a><code><span class="keyword">val</span> may_be_null : <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 type of the argument includes the possibility of NULL. For 'in' values this means that NULL is a valid value. For 'out' values, this means that NULL may be returned. See also Arg_info.is_optional.</p></dd></dl><dl><dt class="spec value" id="val-is_caller_allocates"><a href="#val-is_caller_allocates" class="anchor"></a><code><span class="keyword">val</span> is_caller_allocates : <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 argument is a pointer to a struct or object that will receive an output of a function. The default assumption for Arg_info.Out arguments which have allocation is that the callee allocates; if this is TRUE, then the caller must allocate.</p></dd></dl><dl><dt class="spec value" id="val-is_optional"><a href="#val-is_optional" class="anchor"></a><code><span class="keyword">val</span> is_optional : <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 argument is optional. For 'out' arguments this means that you can pass NULL in order to ignore the result.</p></dd></dl><dl><dt class="spec value" id="val-is_return_value"><a href="#val-is_return_value" class="anchor"></a><code><span class="keyword">val</span> is_return_value : <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 argument is a return value. It can either be a parameter or a return value.</p></dd></dl><dl><dt class="spec value" id="val-is_skip"><a href="#val-is_skip" class="anchor"></a><code><span class="keyword">val</span> is_skip : <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 an argument is only useful in C.</p></dd></dl><dl><dt class="spec value" id="val-get_scope"><a href="#val-get_scope" class="anchor"></a><code><span class="keyword">val</span> get_scope : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <a href="../../Bindings/Arg_info/index.html#type-scope_type">Bindings.Arg_info.scope_type</a></code></dt><dt class="spec value" id="val-get_type"><a href="#val-get_type" class="anchor"></a><code><span class="keyword">val</span> get_type : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.ptr</span> <span>&#45;&gt;</span> <span><span><a href="../Type_info/index.html#type-t">Type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><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 arg 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 arg 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 Arg_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 form a Arg_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>