1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GObject Introspection Reference Manual: GIVFuncInfo</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="GObject Introspection Reference Manual">
8 <link rel="up" href="ch01.html" title="GIRepository">
9 <link rel="prev" href="gi-GISignalInfo.html" title="GISignalInfo">
10 <link rel="next" href="gi-GIRegisteredTypeInfo.html" title="GIRegisteredTypeInfo">
11 <meta name="generator" content="GTK-Doc V1.19.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16 <td width="100%" align="left">
17 <a href="#" class="shortcut">Top</a>
19 <a href="#gi-GIVFuncInfo.description" class="shortcut">Description</a>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="gi-GISignalInfo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="gi-GIRegisteredTypeInfo.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
26 <div class="refentry">
27 <a name="gi-GIVFuncInfo"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
30 <h2><span class="refentrytitle"><a name="gi-GIVFuncInfo.top_of_page"></a>GIVFuncInfo</span></h2>
31 <p>GIVFuncInfo — Struct representing a virtual function</p>
33 <td valign="top" align="right"></td>
35 <div class="refsynopsisdiv">
36 <a name="gi-GIVFuncInfo.synopsis"></a><h2>Synopsis</h2>
37 <pre class="synopsis">typedef <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo">GIVFuncInfo</a>;
38 enum <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags">GIVFuncInfoFlags</a>;
39 <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags"><span class="returnvalue">GIVFuncInfoFlags</span></a> <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-flags" title="g_vfunc_info_get_flags ()">g_vfunc_info_get_flags</a> (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
40 <span class="returnvalue">gint</span> <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-offset" title="g_vfunc_info_get_offset ()">g_vfunc_info_get_offset</a> (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
41 <a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> * <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-signal" title="g_vfunc_info_get_signal ()">g_vfunc_info_get_signal</a> (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
42 <a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> * <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-invoker" title="g_vfunc_info_get_invoker ()">g_vfunc_info_get_invoker</a> (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);
43 <span class="returnvalue">gpointer</span> <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-get-address" title="g_vfunc_info_get_address ()">g_vfunc_info_get_address</a> (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>,
44 <em class="parameter"><code><span class="type">GType</span> implementor_gtype</code></em>,
45 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
46 <span class="returnvalue">gboolean</span> <a class="link" href="gi-GIVFuncInfo.html#g-vfunc-info-invoke" title="g_vfunc_info_invoke ()">g_vfunc_info_invoke</a> (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>,
47 <em class="parameter"><code><span class="type">GType</span> implementor</code></em>,
48 <em class="parameter"><code>const <a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a> *in_args</code></em>,
49 <em class="parameter"><code><span class="type">int</span> n_in_args</code></em>,
50 <em class="parameter"><code>const <a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a> *out_args</code></em>,
51 <em class="parameter"><code><span class="type">int</span> n_out_args</code></em>,
52 <em class="parameter"><code><a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a> *return_value</code></em>,
53 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
56 <div class="refsect1">
57 <a name="gi-GIVFuncInfo.description"></a><h2>Description</h2>
59 GIVfuncInfo represents a virtual function. A property belongs to
60 either a <a class="link" href="gi-GIObjectInfo.html#GIObjectInfo" title="GIObjectInfo"><span class="type">GIObjectInfo</span></a> or a <a class="link" href="gi-GIInterfaceInfo.html#GIInterfaceInfo" title="GIInterfaceInfo"><span class="type">GIInterfaceInfo</span></a>.
64 <div class="refsect1">
65 <a name="gi-givfuncinfo.struct-hierarchy"></a><h2>Struct hierarchy</h2>
66 <pre class="synopsis">
67 <a class="link" href="gi-GIBaseInfo.html" title="GIBaseInfo">GIBaseInfo</a>
68 +----<a class="link" href="gi-GICallableInfo.html" title="GICallableInfo">GICallableInfo</a>
69 +----<a class="link" href="gi-GIFunctionInfo.html" title="GIFunctionInfo">GIFunctionInfo</a>
70 +----<a class="link" href="gi-GISignalInfo.html" title="GISignalInfo">GISignalInfo</a>
77 <div class="refsect1">
78 <a name="gi-GIVFuncInfo.details"></a><h2>Details</h2>
79 <div class="refsect2">
80 <a name="GIVFuncInfo"></a><h3>GIVFuncInfo</h3>
81 <pre class="programlisting">typedef GIBaseInfo GIVFuncInfo;
84 Represents a virtual function.
88 <div class="refsect2">
89 <a name="GIVFuncInfoFlags"></a><h3>enum GIVFuncInfoFlags</h3>
90 <pre class="programlisting">typedef enum {
91 GI_VFUNC_MUST_CHAIN_UP = 1 << 0,
92 GI_VFUNC_MUST_OVERRIDE = 1 << 1,
93 GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2,
94 GI_VFUNC_THROWS = 1 << 3
98 Flags of a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> struct.
100 <div class="variablelist"><table border="0" class="variablelist">
102 <col align="left" valign="top">
107 <td><p><a name="GI-VFUNC-MUST-CHAIN-UP:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_MUST_CHAIN_UP</code></span></p></td>
108 <td>chains up to the parent type
112 <td><p><a name="GI-VFUNC-MUST-OVERRIDE:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_MUST_OVERRIDE</code></span></p></td>
117 <td><p><a name="GI-VFUNC-MUST-NOT-OVERRIDE:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_MUST_NOT_OVERRIDE</code></span></p></td>
118 <td>does not override
122 <td><p><a name="GI-VFUNC-THROWS:CAPS"></a><span class="term"><code class="literal">GI_VFUNC_THROWS</code></span></p></td>
123 <td>Includes a <span class="type">GError</span>
130 <div class="refsect2">
131 <a name="g-vfunc-info-get-flags"></a><h3>g_vfunc_info_get_flags ()</h3>
132 <pre class="programlisting"><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags"><span class="returnvalue">GIVFuncInfoFlags</span></a> g_vfunc_info_get_flags (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
134 Obtain the flags for this virtual function info. See <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfoFlags" title="enum GIVFuncInfoFlags"><span class="type">GIVFuncInfoFlags</span></a> for
135 more information about possible flag values.
137 <div class="variablelist"><table border="0" class="variablelist">
139 <col align="left" valign="top">
144 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
145 <td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
149 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
156 <div class="refsect2">
157 <a name="g-vfunc-info-get-offset"></a><h3>g_vfunc_info_get_offset ()</h3>
158 <pre class="programlisting"><span class="returnvalue">gint</span> g_vfunc_info_get_offset (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
160 Obtain the offset of the function pointer in the class struct. The value
161 0xFFFF indicates that the struct offset is unknown.
163 <div class="variablelist"><table border="0" class="variablelist">
165 <col align="left" valign="top">
170 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
171 <td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
175 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
176 <td>the struct offset or 0xFFFF if it's unknown</td>
182 <div class="refsect2">
183 <a name="g-vfunc-info-get-signal"></a><h3>g_vfunc_info_get_signal ()</h3>
184 <pre class="programlisting"><a class="link" href="gi-GISignalInfo.html#GISignalInfo" title="GISignalInfo"><span class="returnvalue">GISignalInfo</span></a> * g_vfunc_info_get_signal (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
186 Obtain the signal for the virtual function if one is set.
187 The signal comes from the object or interface to which
188 this virtual function belongs.
190 <div class="variablelist"><table border="0" class="variablelist">
192 <col align="left" valign="top">
197 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
198 <td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
202 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
203 <td>the signal or <code class="literal">NULL</code> if none set. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
210 <div class="refsect2">
211 <a name="g-vfunc-info-get-invoker"></a><h3>g_vfunc_info_get_invoker ()</h3>
212 <pre class="programlisting"><a class="link" href="gi-GIFunctionInfo.html#GIFunctionInfo" title="GIFunctionInfo"><span class="returnvalue">GIFunctionInfo</span></a> * g_vfunc_info_get_invoker (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>);</pre>
214 If this virtual function has an associated invoker method, this
215 method will return it. An invoker method is a C entry point.
218 Not all virtuals will have invokers.
220 <div class="variablelist"><table border="0" class="variablelist">
222 <col align="left" valign="top">
227 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
228 <td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
232 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
233 <td>the <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> or <code class="literal">NULL</code>. Free it with
234 <a class="link" href="gi-GIBaseInfo.html#g-base-info-unref" title="g_base_info_unref ()"><code class="function">g_base_info_unref()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
241 <div class="refsect2">
242 <a name="g-vfunc-info-get-address"></a><h3>g_vfunc_info_get_address ()</h3>
243 <pre class="programlisting"><span class="returnvalue">gpointer</span> g_vfunc_info_get_address (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>,
244 <em class="parameter"><code><span class="type">GType</span> implementor_gtype</code></em>,
245 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
247 This method will look up where inside the type struct of <em class="parameter"><code>implementor_gtype</code></em>
248 is the implementation for <em class="parameter"><code>info</code></em>.
250 <div class="variablelist"><table border="0" class="variablelist">
252 <col align="left" valign="top">
257 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
258 <td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a>
262 <td><p><span class="term"><em class="parameter"><code>implementor_gtype</code></em> :</span></p></td>
264 <span class="type">GType</span> implementing this virtual function</td>
267 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
268 <td>return location for a <span class="type">GError</span>
272 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
273 <td>address to a function or <code class="literal">NULL</code> if an error happened</td>
279 <div class="refsect2">
280 <a name="g-vfunc-info-invoke"></a><h3>g_vfunc_info_invoke ()</h3>
281 <pre class="programlisting"><span class="returnvalue">gboolean</span> g_vfunc_info_invoke (<em class="parameter"><code><a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> *info</code></em>,
282 <em class="parameter"><code><span class="type">GType</span> implementor</code></em>,
283 <em class="parameter"><code>const <a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a> *in_args</code></em>,
284 <em class="parameter"><code><span class="type">int</span> n_in_args</code></em>,
285 <em class="parameter"><code>const <a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a> *out_args</code></em>,
286 <em class="parameter"><code><span class="type">int</span> n_out_args</code></em>,
287 <em class="parameter"><code><a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a> *return_value</code></em>,
288 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
290 Invokes the function described in <em class="parameter"><code>info</code></em> with the given
291 arguments. Note that inout parameters must appear in both
294 <div class="variablelist"><table border="0" class="variablelist">
296 <col align="left" valign="top">
301 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
302 <td>a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> describing the virtual function to invoke</td>
305 <td><p><span class="term"><em class="parameter"><code>implementor</code></em> :</span></p></td>
307 <span class="type">GType</span> of the type that implements this virtual function</td>
310 <td><p><span class="term"><em class="parameter"><code>in_args</code></em> :</span></p></td>
311 <td>an array of <a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a>s, one for each in
312 parameter of <em class="parameter"><code>info</code></em>. If there are no in parameter, <em class="parameter"><code>in_args</code></em>
313 can be <code class="literal">NULL</code>
317 <td><p><span class="term"><em class="parameter"><code>n_in_args</code></em> :</span></p></td>
318 <td>the length of the <em class="parameter"><code>in_args</code></em> array</td>
321 <td><p><span class="term"><em class="parameter"><code>out_args</code></em> :</span></p></td>
322 <td>an array of <a class="link" href="gi-common-types.html#GIArgument" title="union GIArgument"><span class="type">GIArgument</span></a>s, one for each out
323 parameter of <em class="parameter"><code>info</code></em>. If there are no out parameters, <em class="parameter"><code>out_args</code></em>
324 may be <code class="literal">NULL</code>
328 <td><p><span class="term"><em class="parameter"><code>n_out_args</code></em> :</span></p></td>
329 <td>the length of the <em class="parameter"><code>out_args</code></em> array</td>
332 <td><p><span class="term"><em class="parameter"><code>return_value</code></em> :</span></p></td>
333 <td>return location for the return value of the
334 function. If the function returns void, <em class="parameter"><code>return_value</code></em> may be
335 <code class="literal">NULL</code>
339 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
340 <td>return location for detailed error information, or <code class="literal">NULL</code>
344 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
346 <code class="literal">TRUE</code> if the function has been invoked, <code class="literal">FALSE</code> if an
356 Generated by GTK-Doc V1.19.1</div>