Imported Upstream version 1.39.3
[platform/upstream/gobject-introspection.git] / docs / reference / html / gi-GIVFuncInfo.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
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">
13 </head>
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>
18                    | 
19                   <a href="#gi-GIVFuncInfo.description" class="shortcut">Description</a>
20 </td>
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>
25 </tr></table>
26 <div class="refentry">
27 <a name="gi-GIVFuncInfo"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
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>
32 </td>
33 <td valign="top" align="right"></td>
34 </tr></table></div>
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>);
54 </pre>
55 </div>
56 <div class="refsect1">
57 <a name="gi-GIVFuncInfo.description"></a><h2>Description</h2>
58 <p>
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>.
61 </p>
62 <p>
63 </p>
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>
71          +----GIVFuncInfo
72 </pre>
73 </div>
74 <p>
75 </p>
76 </div>
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;
82 </pre>
83 <p>
84 Represents a virtual function.
85 </p>
86 </div>
87 <hr>
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 &lt;&lt; 0,
92   GI_VFUNC_MUST_OVERRIDE     = 1 &lt;&lt; 1,
93   GI_VFUNC_MUST_NOT_OVERRIDE = 1 &lt;&lt; 2,
94   GI_VFUNC_THROWS =            1 &lt;&lt; 3
95 } GIVFuncInfoFlags;
96 </pre>
97 <p>
98 Flags of a <a class="link" href="gi-GIVFuncInfo.html#GIVFuncInfo" title="GIVFuncInfo"><span class="type">GIVFuncInfo</span></a> struct.
99 </p>
100 <div class="variablelist"><table border="0" class="variablelist">
101 <colgroup>
102 <col align="left" valign="top">
103 <col>
104 </colgroup>
105 <tbody>
106 <tr>
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
109 </td>
110 </tr>
111 <tr>
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>
113 <td>overrides
114 </td>
115 </tr>
116 <tr>
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
119 </td>
120 </tr>
121 <tr>
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>
124 </td>
125 </tr>
126 </tbody>
127 </table></div>
128 </div>
129 <hr>
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>
133 <p>
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.
136 </p>
137 <div class="variablelist"><table border="0" class="variablelist">
138 <colgroup>
139 <col align="left" valign="top">
140 <col>
141 </colgroup>
142 <tbody>
143 <tr>
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>
146 </td>
147 </tr>
148 <tr>
149 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
150 <td>the flags</td>
151 </tr>
152 </tbody>
153 </table></div>
154 </div>
155 <hr>
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>
159 <p>
160 Obtain the offset of the function pointer in the class struct. The value
161 0xFFFF indicates that the struct offset is unknown.
162 </p>
163 <div class="variablelist"><table border="0" class="variablelist">
164 <colgroup>
165 <col align="left" valign="top">
166 <col>
167 </colgroup>
168 <tbody>
169 <tr>
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>
172 </td>
173 </tr>
174 <tr>
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>
177 </tr>
178 </tbody>
179 </table></div>
180 </div>
181 <hr>
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>
185 <p>
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.
189 </p>
190 <div class="variablelist"><table border="0" class="variablelist">
191 <colgroup>
192 <col align="left" valign="top">
193 <col>
194 </colgroup>
195 <tbody>
196 <tr>
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>
199 </td>
200 </tr>
201 <tr>
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>
204 </td>
205 </tr>
206 </tbody>
207 </table></div>
208 </div>
209 <hr>
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>
213 <p>
214 If this virtual function has an associated invoker method, this
215 method will return it.  An invoker method is a C entry point.
216 </p>
217 <p>
218 Not all virtuals will have invokers.
219 </p>
220 <div class="variablelist"><table border="0" class="variablelist">
221 <colgroup>
222 <col align="left" valign="top">
223 <col>
224 </colgroup>
225 <tbody>
226 <tr>
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>
229 </td>
230 </tr>
231 <tr>
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>
235 </td>
236 </tr>
237 </tbody>
238 </table></div>
239 </div>
240 <hr>
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>
246 <p>
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>.
249 </p>
250 <div class="variablelist"><table border="0" class="variablelist">
251 <colgroup>
252 <col align="left" valign="top">
253 <col>
254 </colgroup>
255 <tbody>
256 <tr>
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>
259 </td>
260 </tr>
261 <tr>
262 <td><p><span class="term"><em class="parameter"><code>implementor_gtype</code></em> :</span></p></td>
263 <td>
264 <span class="type">GType</span> implementing this virtual function</td>
265 </tr>
266 <tr>
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>
269 </td>
270 </tr>
271 <tr>
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>
274 </tr>
275 </tbody>
276 </table></div>
277 </div>
278 <hr>
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>
289 <p>
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
292 argument lists.
293 </p>
294 <div class="variablelist"><table border="0" class="variablelist">
295 <colgroup>
296 <col align="left" valign="top">
297 <col>
298 </colgroup>
299 <tbody>
300 <tr>
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>
303 </tr>
304 <tr>
305 <td><p><span class="term"><em class="parameter"><code>implementor</code></em> :</span></p></td>
306 <td>
307 <span class="type">GType</span> of the type that implements this virtual function</td>
308 </tr>
309 <tr>
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>
314 </td>
315 </tr>
316 <tr>
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>
319 </tr>
320 <tr>
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>
325 </td>
326 </tr>
327 <tr>
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>
330 </tr>
331 <tr>
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>
336 </td>
337 </tr>
338 <tr>
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>
341 </td>
342 </tr>
343 <tr>
344 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
345 <td>
346 <code class="literal">TRUE</code> if the function has been invoked, <code class="literal">FALSE</code> if an
347 error occurred.</td>
348 </tr>
349 </tbody>
350 </table></div>
351 </div>
352 </div>
353 </div>
354 <div class="footer">
355 <hr>
356           Generated by GTK-Doc V1.19.1</div>
357 </body>
358 </html>