<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>GObject_introspection__Callable_info (gobject-introspection.GObject_introspection__Callable_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__Callable_info</nav><h1>Module <code>GObject_introspection__Callable_info</code></h1><p>Callable_info — Struct representing a callable.</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>Callable_info represents an entity which is callable. Currently a function (Function_info), virtual function, (VFunc_info) or callback (GICallbackInfo). A callable has a list of arguments (Arg_info), a return type, direction and a flag which decides if it returns null</p></dd></dl><dl><dt class="spec value" id="val-callableinfo"><a href="#val-callableinfo" class="anchor"></a><code><span class="keyword">val</span> callableinfo : <span><span><a href="index.html#type-t">t</a> Ctypes.structure</span> Ctypes.typ</span></code></dt><dt class="spec value" id="val-can_throw_gerror"><a href="#val-can_throw_gerror" class="anchor"></a><code><span class="keyword">val</span> can_throw_gerror : <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>Does the function throws an error.</p></dd></dl><dl><dt class="spec value" id="val-get_n_args"><a href="#val-get_n_args" class="anchor"></a><code><span class="keyword">val</span> get_n_args : <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 arguments (both IN and OUT) for this callable.</p></dd></dl><dl><dt class="spec value" id="val-get_return_attribute"><a href="#val-get_return_attribute" class="anchor"></a><code><span class="keyword">val</span> get_return_attribute : <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>Retrieve an arbitrary attribute associated with the return value.</p></dd></dl><dl><dt class="spec value" id="val-is_method"><a href="#val-is_method" class="anchor"></a><code><span class="keyword">val</span> is_method : <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>Determines if the callable info is a method. For VFunc_infos, GICallbackInfos, and Signal_infos, this is always true. Otherwise, this looks at the Function_info.Is_method flag on the Function_info. Concretely, this function returns whether Callable_info.get_n_args matches the number of arguments in the raw C method. For methods, there is one more C argument than is exposed by introspection: the &quot;self&quot; or &quot;this&quot; object.</p></dd></dl><dl><dt class="spec value" id="val-may_return_null"><a href="#val-may_return_null" class="anchor"></a><code><span class="keyword">val</span> may_return_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>See if a callable could return NULL.</p></dd></dl><dl><dt class="spec value" id="val-skip_return"><a href="#val-skip_return" class="anchor"></a><code><span class="keyword">val</span> skip_return : <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>See if a callable's return value is only useful in C.</p></dd></dl><dl><dt class="spec value" id="val-get_arg"><a href="#val-get_arg" class="anchor"></a><code><span class="keyword">val</span> get_arg : <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/Arg_info/index.html#type-t">GObject_introspection.Arg_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain information about a particular argument of this callable.</p></dd></dl><dl><dt class="spec value" id="val-get_return_type"><a href="#val-get_return_type" class="anchor"></a><code><span class="keyword">val</span> get_return_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="../GObject_introspection/Type_info/index.html#type-t">GObject_introspection.Type_info.t</a> Ctypes.structure</span> Ctypes.ptr</span></code></dt><dd><p>Obtain the return type of a callable item as a Type_info.</p></dd></dl><dl><dt class="spec value" id="val-get_caller_owns"><a href="#val-get_caller_owns" class="anchor"></a><code><span class="keyword">val</span> get_caller_owns : <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>See whether the caller owns the return value of this callable. GITransfer contains a list of possible transfer values.</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 callable 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 callable 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="../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 Function_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 from a Function_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>