Imported Upstream version 2.50.2
[platform/upstream/glib.git] / docs / reference / gio / html / GResource.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>GResource: GIO Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="resources.html" title="Resources">
9 <link rel="prev" href="resources.html" title="Resources">
10 <link rel="next" href="permissions.html" title="Permissions">
11 <meta name="generator" content="GTK-Doc V1.25.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="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#GResource.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#GResource.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
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="resources.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="resources.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="permissions.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="GResource"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="GResource.top_of_page"></a>GResource</span></h2>
31 <p>GResource — Resource framework</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsect1">
36 <a name="GResource.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table class="informaltable" width="100%" border="0">
38 <colgroup>
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
41 </colgroup>
42 <tbody>
43 <tr>
44 <td class="function_type">
45 <a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
46 </td>
47 <td class="function_name">
48 <a class="link" href="GResource.html#g-resource-load" title="g_resource_load ()">g_resource_load</a> <span class="c_punctuation">()</span>
49 </td>
50 </tr>
51 <tr>
52 <td class="function_type">
53 <a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
54 </td>
55 <td class="function_name">
56 <a class="link" href="GResource.html#g-resource-new-from-data" title="g_resource_new_from_data ()">g_resource_new_from_data</a> <span class="c_punctuation">()</span>
57 </td>
58 </tr>
59 <tr>
60 <td class="function_type">
61 <a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
62 </td>
63 <td class="function_name">
64 <a class="link" href="GResource.html#g-resource-ref" title="g_resource_ref ()">g_resource_ref</a> <span class="c_punctuation">()</span>
65 </td>
66 </tr>
67 <tr>
68 <td class="function_type">
69 <span class="returnvalue">void</span>
70 </td>
71 <td class="function_name">
72 <a class="link" href="GResource.html#g-resource-unref" title="g_resource_unref ()">g_resource_unref</a> <span class="c_punctuation">()</span>
73 </td>
74 </tr>
75 <tr>
76 <td class="function_type">
77 <a href="../glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
78 </td>
79 <td class="function_name">
80 <a class="link" href="GResource.html#g-resource-lookup-data" title="g_resource_lookup_data ()">g_resource_lookup_data</a> <span class="c_punctuation">()</span>
81 </td>
82 </tr>
83 <tr>
84 <td class="function_type">
85 <a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *
86 </td>
87 <td class="function_name">
88 <a class="link" href="GResource.html#g-resource-open-stream" title="g_resource_open_stream ()">g_resource_open_stream</a> <span class="c_punctuation">()</span>
89 </td>
90 </tr>
91 <tr>
92 <td class="function_type">
93 <span class="returnvalue">char</span> **
94 </td>
95 <td class="function_name">
96 <a class="link" href="GResource.html#g-resource-enumerate-children" title="g_resource_enumerate_children ()">g_resource_enumerate_children</a> <span class="c_punctuation">()</span>
97 </td>
98 </tr>
99 <tr>
100 <td class="function_type">
101 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
102 </td>
103 <td class="function_name">
104 <a class="link" href="GResource.html#g-resource-get-info" title="g_resource_get_info ()">g_resource_get_info</a> <span class="c_punctuation">()</span>
105 </td>
106 </tr>
107 <tr>
108 <td class="function_type">
109 <span class="returnvalue">void</span>
110 </td>
111 <td class="function_name">
112 <a class="link" href="GResource.html#g-static-resource-init" title="g_static_resource_init ()">g_static_resource_init</a> <span class="c_punctuation">()</span>
113 </td>
114 </tr>
115 <tr>
116 <td class="function_type">
117 <span class="returnvalue">void</span>
118 </td>
119 <td class="function_name">
120 <a class="link" href="GResource.html#g-static-resource-fini" title="g_static_resource_fini ()">g_static_resource_fini</a> <span class="c_punctuation">()</span>
121 </td>
122 </tr>
123 <tr>
124 <td class="function_type">
125 <a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
126 </td>
127 <td class="function_name">
128 <a class="link" href="GResource.html#g-static-resource-get-resource" title="g_static_resource_get_resource ()">g_static_resource_get_resource</a> <span class="c_punctuation">()</span>
129 </td>
130 </tr>
131 <tr>
132 <td class="function_type">
133 <span class="returnvalue">void</span>
134 </td>
135 <td class="function_name">
136 <a class="link" href="GResource.html#g-resources-register" title="g_resources_register ()">g_resources_register</a> <span class="c_punctuation">()</span>
137 </td>
138 </tr>
139 <tr>
140 <td class="function_type">
141 <span class="returnvalue">void</span>
142 </td>
143 <td class="function_name">
144 <a class="link" href="GResource.html#g-resources-unregister" title="g_resources_unregister ()">g_resources_unregister</a> <span class="c_punctuation">()</span>
145 </td>
146 </tr>
147 <tr>
148 <td class="function_type">
149 <a href="../glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
150 </td>
151 <td class="function_name">
152 <a class="link" href="GResource.html#g-resources-lookup-data" title="g_resources_lookup_data ()">g_resources_lookup_data</a> <span class="c_punctuation">()</span>
153 </td>
154 </tr>
155 <tr>
156 <td class="function_type">
157 <a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *
158 </td>
159 <td class="function_name">
160 <a class="link" href="GResource.html#g-resources-open-stream" title="g_resources_open_stream ()">g_resources_open_stream</a> <span class="c_punctuation">()</span>
161 </td>
162 </tr>
163 <tr>
164 <td class="function_type">
165 <span class="returnvalue">char</span> **
166 </td>
167 <td class="function_name">
168 <a class="link" href="GResource.html#g-resources-enumerate-children" title="g_resources_enumerate_children ()">g_resources_enumerate_children</a> <span class="c_punctuation">()</span>
169 </td>
170 </tr>
171 <tr>
172 <td class="function_type">
173 <a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
174 </td>
175 <td class="function_name">
176 <a class="link" href="GResource.html#g-resources-get-info" title="g_resources_get_info ()">g_resources_get_info</a> <span class="c_punctuation">()</span>
177 </td>
178 </tr>
179 </tbody>
180 </table></div>
181 </div>
182 <div class="refsect1">
183 <a name="GResource.other"></a><h2>Types and Values</h2>
184 <div class="informaltable"><table class="informaltable" width="100%" border="0">
185 <colgroup>
186 <col width="150px" class="name">
187 <col class="description">
188 </colgroup>
189 <tbody>
190 <tr>
191 <td class="datatype_keyword"> </td>
192 <td class="function_name"><a class="link" href="GResource.html#GResource-struct" title="GResource">GResource</a></td>
193 </tr>
194 <tr>
195 <td class="datatype_keyword">enum</td>
196 <td class="function_name"><a class="link" href="GResource.html#GResourceFlags" title="enum GResourceFlags">GResourceFlags</a></td>
197 </tr>
198 <tr>
199 <td class="datatype_keyword">enum</td>
200 <td class="function_name"><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags">GResourceLookupFlags</a></td>
201 </tr>
202 <tr>
203 <td class="datatype_keyword">struct</td>
204 <td class="function_name"><a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource">GStaticResource</a></td>
205 </tr>
206 <tr>
207 <td class="define_keyword">#define</td>
208 <td class="function_name"><a class="link" href="GResource.html#G-RESOURCE-ERROR:CAPS" title="G_RESOURCE_ERROR">G_RESOURCE_ERROR</a></td>
209 </tr>
210 <tr>
211 <td class="datatype_keyword">enum</td>
212 <td class="function_name"><a class="link" href="GResource.html#GResourceError" title="enum GResourceError">GResourceError</a></td>
213 </tr>
214 </tbody>
215 </table></div>
216 </div>
217 <div class="refsect1">
218 <a name="GResource.object-hierarchy"></a><h2>Object Hierarchy</h2>
219 <pre class="screen">    <a href="https://developer.gnome.org/gobject/unstable/gobject-Boxed-Types.html">GBoxed</a>
220     <span class="lineart">╰──</span> GResource
221 </pre>
222 </div>
223 <div class="refsect1">
224 <a name="GResource.includes"></a><h2>Includes</h2>
225 <pre class="synopsis">#include &lt;gio/gio.h&gt;
226 </pre>
227 </div>
228 <div class="refsect1">
229 <a name="GResource.description"></a><h2>Description</h2>
230 <p>Applications and libraries often contain binary or textual data that is
231 really part of the application, rather than user data. For instance
232 <a href="http://developer.gnome.org/gtk4/GtkBuilder.html#GtkBuilder-struct"><span class="type">GtkBuilder</span></a> .ui files, splashscreen images, GMenu markup XML, CSS files,
233 icons, etc. These are often shipped as files in <code class="literal">$datadir/appname</code>, or
234 manually included as literal strings in the code.</p>
235 <p>The <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> API and the glib-compile-resources program
236 provide a convenient and efficient alternative to this which has some nice properties. You
237 maintain the files as normal files, so its easy to edit them, but during the build the files
238 are combined into a binary bundle that is linked into the executable. This means that loading
239 the resource files are efficient (as they are already in memory, shared with other instances) and
240 simple (no need to check for things like I/O errors or locate the files in the filesystem). It
241 also makes it easier to create relocatable applications.</p>
242 <p>Resource files can also be marked as compressed. Such files will be included in the resource bundle
243 in a compressed form, but will be automatically uncompressed when the resource is used. This
244 is very useful e.g. for larger text files that are parsed once (or rarely) and then thrown away.</p>
245 <p>Resource files can also be marked to be preprocessed, by setting the value of the
246 <code class="literal">preprocess</code> attribute to a comma-separated list of preprocessing options.
247 The only options currently supported are:</p>
248 <p><code class="literal">xml-stripblanks</code> which will use the xmllint command
249 to strip ignorable whitespace from the XML file. For this to work,
250 the <code class="literal">XMLLINT</code> environment variable must be set to the full path to
251 the xmllint executable, or xmllint must be in the <code class="literal">PATH</code>; otherwise
252 the preprocessing step is skipped.</p>
253 <p><code class="literal">to-pixdata</code> which will use the gdk-pixbuf-pixdata command to convert
254 images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside
255 the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata
256 program must be in the PATH, or the <code class="literal">GDK_PIXBUF_PIXDATA</code> environment variable must be
257 set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will
258 abort.</p>
259 <p>Resource bundles are created by the glib-compile-resources program
260 which takes an XML file that describes the bundle, and a set of files that the XML references. These
261 are combined into a binary resource bundle.</p>
262 <p>An example resource description:</p>
263 <div class="informalexample">
264   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
265     <tbody>
266       <tr>
267         <td class="listing_lines" align="right"><pre>1
268 2
269 3
270 4
271 5
272 6
273 7
274 8</pre></td>
275         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt">&lt;</span>?xml version<span class="gtkdoc opt">=</span><span class="string">&quot;1.0&quot;</span> encoding<span class="gtkdoc opt">=</span><span class="string">&quot;UTF-8&quot;</span>?<span class="gtkdoc opt">&gt;</span>
276 <span class="gtkdoc opt">&lt;</span>gresources<span class="gtkdoc opt">&gt;</span>
277   <span class="gtkdoc opt">&lt;</span>gresource prefix<span class="gtkdoc opt">=</span><span class="string">&quot;/org/gtk/Example&quot;</span><span class="gtkdoc opt">&gt;</span>
278     <span class="gtkdoc opt">&lt;</span>file<span class="gtkdoc opt">&gt;</span>data<span class="gtkdoc opt">/</span>splashscreen<span class="gtkdoc opt">.</span>png<span class="gtkdoc opt">&lt;/</span>file<span class="gtkdoc opt">&gt;</span>
279     <span class="gtkdoc opt">&lt;</span>file compressed<span class="gtkdoc opt">=</span><span class="string">&quot;true&quot;</span><span class="gtkdoc opt">&gt;</span>dialog<span class="gtkdoc opt">.</span>ui<span class="gtkdoc opt">&lt;/</span>file<span class="gtkdoc opt">&gt;</span>
280     <span class="gtkdoc opt">&lt;</span>file preprocess<span class="gtkdoc opt">=</span><span class="string">&quot;xml-stripblanks&quot;</span><span class="gtkdoc opt">&gt;</span>menumarkup<span class="gtkdoc opt">.</span>xml<span class="gtkdoc opt">&lt;/</span>file<span class="gtkdoc opt">&gt;</span>
281   <span class="gtkdoc opt">&lt;/</span>gresource<span class="gtkdoc opt">&gt;</span>
282 <span class="gtkdoc opt">&lt;/</span>gresources<span class="gtkdoc opt">&gt;</span></pre></td>
283       </tr>
284     </tbody>
285   </table>
286 </div>
287
288 <p></p>
289 <p>This will create a resource bundle with the following files:</p>
290 <div class="informalexample">
291   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
292     <tbody>
293       <tr>
294         <td class="listing_lines" align="right"><pre>1
295 2
296 3</pre></td>
297         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt">/</span>org<span class="gtkdoc opt">/</span>gtk<span class="gtkdoc opt">/</span>Example<span class="gtkdoc opt">/</span>data<span class="gtkdoc opt">/</span>splashscreen<span class="gtkdoc opt">.</span>png
298 <span class="gtkdoc opt">/</span>org<span class="gtkdoc opt">/</span>gtk<span class="gtkdoc opt">/</span>Example<span class="gtkdoc opt">/</span>dialog<span class="gtkdoc opt">.</span>ui
299 <span class="gtkdoc opt">/</span>org<span class="gtkdoc opt">/</span>gtk<span class="gtkdoc opt">/</span>Example<span class="gtkdoc opt">/</span>menumarkup<span class="gtkdoc opt">.</span>xml</pre></td>
300       </tr>
301     </tbody>
302   </table>
303 </div>
304
305 <p></p>
306 <p>Note that all resources in the process share the same namespace, so use Java-style
307 path prefixes (like in the above example) to avoid conflicts.</p>
308 <p>You can then use glib-compile-resources to compile the XML to a
309 binary bundle that you can load with <a class="link" href="GResource.html#g-resource-load" title="g_resource_load ()"><code class="function">g_resource_load()</code></a>. However, its more common to use the --generate-source and
310 --generate-header arguments to create a source file and header to link directly into your application.
311 This will generate <code class="literal"><code class="function">get_resource()</code></code>, <code class="literal"><code class="function">register_resource()</code></code> and
312 <code class="literal"><code class="function">unregister_resource()</code></code> functions, prefixed by the <code class="literal">--c-name</code> argument passed
313 to glib-compile-resources. <code class="literal"><code class="function">get_resource()</code></code> returns
314 the generated <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> object. The register and unregister functions
315 register the resource so its files can be accessed using
316 <a class="link" href="GResource.html#g-resources-lookup-data" title="g_resources_lookup_data ()"><code class="function">g_resources_lookup_data()</code></a>.</p>
317 <p>Once a <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> has been created and registered all the data in it can be accessed globally in the process by
318 using API calls like <a class="link" href="GResource.html#g-resources-open-stream" title="g_resources_open_stream ()"><code class="function">g_resources_open_stream()</code></a> to stream the data or <a class="link" href="GResource.html#g-resources-lookup-data" title="g_resources_lookup_data ()"><code class="function">g_resources_lookup_data()</code></a> to get a direct pointer
319 to the data. You can also use URIs like "resource:///org/gtk/Example/data/splashscreen.png" with <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> to access
320 the resource data.</p>
321 <p>There are two forms of the generated source, the default version uses the compiler support for constructor
322 and destructor functions (where available) to automatically create and register the <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> on startup
323 or library load time. If you pass --manual-register two functions to register/unregister the resource is instead
324 created. This requires an explicit initialization call in your application/library, but it works on all platforms,
325 even on the minor ones where this is not available. (Constructor support is available for at least Win32, Mac OS and Linux.)</p>
326 <p>Note that resource data can point directly into the data segment of e.g. a library, so if you are unloading libraries
327 during runtime you need to be very careful with keeping around pointers to data from a resource, as this goes away
328 when the library is unloaded. However, in practice this is not generally a problem, since most resource accesses
329 is for your own resources, and resource data is often used once, during parsing, and then released.</p>
330 <p>When debugging a program or testing a change to an installed version, it is often useful to be able to
331 replace resources in the program or library, without recompiling, for debugging or quick hacking and testing
332 purposes.</p>
333 <p>Since GLib 2.50, it is possible to use the <code class="literal">G_RESOURCE_OVERLAYS</code> environment variable to selectively overlay
334 resources with replacements from the filesystem.  It is a colon-separated list of substitutions to perform
335 during resource lookups.</p>
336 <p>A substitution has the form</p>
337 <div class="informalexample">
338   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
339     <tbody>
340       <tr>
341         <td class="listing_lines" align="right"><pre>1</pre></td>
342         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt">/</span>org<span class="gtkdoc opt">/</span>gtk<span class="gtkdoc opt">/</span>libgtk<span class="gtkdoc opt">=/</span>home<span class="gtkdoc opt">/</span>desrt<span class="gtkdoc opt">/</span>gtk<span class="gtkdoc opt">-</span>overlay</pre></td>
343       </tr>
344     </tbody>
345   </table>
346 </div>
347
348 <p></p>
349 <p>The part before the <code class="literal">=</code> is the resource subpath for which the overlay applies.  The part after is a
350 filesystem path which contains files and subdirectories as you would like to be loaded as resources with the
351 equivalent names.</p>
352 <p>In the example above, if an application tried to load a resource with the resource path
353 <code class="literal">/org/gtk/libgtk/ui/gtkdialog.ui</code> then GResource would check the filesystem path
354 <code class="literal">/home/desrt/gtk-overlay/ui/gtkdialog.ui</code>.  If a file was found there, it would be used instead.  This is an
355 overlay, not an outright replacement, which means that if a file is not found at that path, the built-in
356 version will be used instead.  Whiteouts are not currently supported.</p>
357 <p>Substitutions must start with a slash, and must not contain a trailing slash before the '='.  The path after
358 the slash should ideally be absolute, but this is not strictly required.  It is possible to overlay the
359 location of a single resource with an individual file.</p>
360 </div>
361 <div class="refsect1">
362 <a name="GResource.functions_details"></a><h2>Functions</h2>
363 <div class="refsect2">
364 <a name="g-resource-load"></a><h3>g_resource_load ()</h3>
365 <pre class="programlisting"><a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
366 g_resource_load (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
367                  <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
368 <p>Loads a binary resource bundle and creates a <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> representation of it, allowing
369 you to query it for data.</p>
370 <p>If you want to use this resource in the global resource namespace you need
371 to register it with <a class="link" href="GResource.html#g-resources-register" title="g_resources_register ()"><code class="function">g_resources_register()</code></a>.</p>
372 <div class="refsect3">
373 <a name="g-resource-load.parameters"></a><h4>Parameters</h4>
374 <div class="informaltable"><table class="informaltable" width="100%" border="0">
375 <colgroup>
376 <col width="150px" class="parameters_name">
377 <col class="parameters_description">
378 <col width="200px" class="parameters_annotations">
379 </colgroup>
380 <tbody>
381 <tr>
382 <td class="parameter_name"><p>filename</p></td>
383 <td class="parameter_description"><p> the path of a filename to load, in the GLib filename encoding. </p></td>
384 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
385 </tr>
386 <tr>
387 <td class="parameter_name"><p>error</p></td>
388 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
389 <td class="parameter_annotations"> </td>
390 </tr>
391 </tbody>
392 </table></div>
393 </div>
394 <div class="refsect3">
395 <a name="g-resource-load.returns"></a><h4>Returns</h4>
396 <p> a new <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
397 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
398 </div>
399 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
400 </div>
401 <hr>
402 <div class="refsect2">
403 <a name="g-resource-new-from-data"></a><h3>g_resource_new_from_data ()</h3>
404 <pre class="programlisting"><a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
405 g_resource_new_from_data (<em class="parameter"><code><a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *data</code></em>,
406                           <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
407 <p>Creates a GResource from a reference to the binary resource bundle.
408 This will keep a reference to <em class="parameter"><code>data</code></em>
409  while the resource lives, so
410 the data should not be modified or freed.</p>
411 <p>If you want to use this resource in the global resource namespace you need
412 to register it with <a class="link" href="GResource.html#g-resources-register" title="g_resources_register ()"><code class="function">g_resources_register()</code></a>.</p>
413 <div class="refsect3">
414 <a name="g-resource-new-from-data.parameters"></a><h4>Parameters</h4>
415 <div class="informaltable"><table class="informaltable" width="100%" border="0">
416 <colgroup>
417 <col width="150px" class="parameters_name">
418 <col class="parameters_description">
419 <col width="200px" class="parameters_annotations">
420 </colgroup>
421 <tbody>
422 <tr>
423 <td class="parameter_name"><p>data</p></td>
424 <td class="parameter_description"><p>A <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a></p></td>
425 <td class="parameter_annotations"> </td>
426 </tr>
427 <tr>
428 <td class="parameter_name"><p>error</p></td>
429 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
430 <td class="parameter_annotations"> </td>
431 </tr>
432 </tbody>
433 </table></div>
434 </div>
435 <div class="refsect3">
436 <a name="g-resource-new-from-data.returns"></a><h4>Returns</h4>
437 <p> a new <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
438 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
439 </div>
440 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
441 </div>
442 <hr>
443 <div class="refsect2">
444 <a name="g-resource-ref"></a><h3>g_resource_ref ()</h3>
445 <pre class="programlisting"><a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
446 g_resource_ref (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);</pre>
447 <p>Atomically increments the reference count of <em class="parameter"><code>resource</code></em>
448  by one. This
449 function is MT-safe and may be called from any thread.</p>
450 <div class="refsect3">
451 <a name="g-resource-ref.parameters"></a><h4>Parameters</h4>
452 <div class="informaltable"><table class="informaltable" width="100%" border="0">
453 <colgroup>
454 <col width="150px" class="parameters_name">
455 <col class="parameters_description">
456 <col width="200px" class="parameters_annotations">
457 </colgroup>
458 <tbody><tr>
459 <td class="parameter_name"><p>resource</p></td>
460 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
461 <td class="parameter_annotations"> </td>
462 </tr></tbody>
463 </table></div>
464 </div>
465 <div class="refsect3">
466 <a name="g-resource-ref.returns"></a><h4>Returns</h4>
467 <p> The passed in <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p>
468 </div>
469 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
470 </div>
471 <hr>
472 <div class="refsect2">
473 <a name="g-resource-unref"></a><h3>g_resource_unref ()</h3>
474 <pre class="programlisting"><span class="returnvalue">void</span>
475 g_resource_unref (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);</pre>
476 <p>Atomically decrements the reference count of <em class="parameter"><code>resource</code></em>
477  by one. If the
478 reference count drops to 0, all memory allocated by the resource is
479 released. This function is MT-safe and may be called from any
480 thread.</p>
481 <div class="refsect3">
482 <a name="g-resource-unref.parameters"></a><h4>Parameters</h4>
483 <div class="informaltable"><table class="informaltable" width="100%" border="0">
484 <colgroup>
485 <col width="150px" class="parameters_name">
486 <col class="parameters_description">
487 <col width="200px" class="parameters_annotations">
488 </colgroup>
489 <tbody><tr>
490 <td class="parameter_name"><p>resource</p></td>
491 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
492 <td class="parameter_annotations"> </td>
493 </tr></tbody>
494 </table></div>
495 </div>
496 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
497 </div>
498 <hr>
499 <div class="refsect2">
500 <a name="g-resource-lookup-data"></a><h3>g_resource_lookup_data ()</h3>
501 <pre class="programlisting"><a href="../glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
502 g_resource_lookup_data (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
503                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
504                         <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
505                         <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
506 <p>Looks for a file at the specified <em class="parameter"><code>path</code></em>
507  in the resource and
508 returns a <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> that lets you directly access the data in
509 memory.</p>
510 <p>The data is always followed by a zero byte, so you
511 can safely use the data as a C string. However, that byte
512 is not included in the size of the GBytes.</p>
513 <p>For uncompressed resource files this is a pointer directly into
514 the resource bundle, which is typically in some readonly data section
515 in the program binary. For compressed files we allocate memory on
516 the heap and automatically uncompress the data.</p>
517 <p><em class="parameter"><code>lookup_flags</code></em>
518  controls the behaviour of the lookup.</p>
519 <div class="refsect3">
520 <a name="g-resource-lookup-data.parameters"></a><h4>Parameters</h4>
521 <div class="informaltable"><table class="informaltable" width="100%" border="0">
522 <colgroup>
523 <col width="150px" class="parameters_name">
524 <col class="parameters_description">
525 <col width="200px" class="parameters_annotations">
526 </colgroup>
527 <tbody>
528 <tr>
529 <td class="parameter_name"><p>resource</p></td>
530 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
531 <td class="parameter_annotations"> </td>
532 </tr>
533 <tr>
534 <td class="parameter_name"><p>path</p></td>
535 <td class="parameter_description"><p>A pathname inside the resource</p></td>
536 <td class="parameter_annotations"> </td>
537 </tr>
538 <tr>
539 <td class="parameter_name"><p>lookup_flags</p></td>
540 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
541 <td class="parameter_annotations"> </td>
542 </tr>
543 <tr>
544 <td class="parameter_name"><p>error</p></td>
545 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
546 <td class="parameter_annotations"> </td>
547 </tr>
548 </tbody>
549 </table></div>
550 </div>
551 <div class="refsect3">
552 <a name="g-resource-lookup-data.returns"></a><h4>Returns</h4>
553 <p> <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
554 Free the returned object with <a href="../glib-Byte-Arrays.html#g-bytes-unref"><code class="function">g_bytes_unref()</code></a>. </p>
555 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
556 </div>
557 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
558 </div>
559 <hr>
560 <div class="refsect2">
561 <a name="g-resource-open-stream"></a><h3>g_resource_open_stream ()</h3>
562 <pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *
563 g_resource_open_stream (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
564                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
565                         <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
566                         <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
567 <p>Looks for a file at the specified <em class="parameter"><code>path</code></em>
568  in the resource and
569 returns a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> that lets you read the data.</p>
570 <p><em class="parameter"><code>lookup_flags</code></em>
571  controls the behaviour of the lookup.</p>
572 <div class="refsect3">
573 <a name="g-resource-open-stream.parameters"></a><h4>Parameters</h4>
574 <div class="informaltable"><table class="informaltable" width="100%" border="0">
575 <colgroup>
576 <col width="150px" class="parameters_name">
577 <col class="parameters_description">
578 <col width="200px" class="parameters_annotations">
579 </colgroup>
580 <tbody>
581 <tr>
582 <td class="parameter_name"><p>resource</p></td>
583 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
584 <td class="parameter_annotations"> </td>
585 </tr>
586 <tr>
587 <td class="parameter_name"><p>path</p></td>
588 <td class="parameter_description"><p>A pathname inside the resource</p></td>
589 <td class="parameter_annotations"> </td>
590 </tr>
591 <tr>
592 <td class="parameter_name"><p>lookup_flags</p></td>
593 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
594 <td class="parameter_annotations"> </td>
595 </tr>
596 <tr>
597 <td class="parameter_name"><p>error</p></td>
598 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
599 <td class="parameter_annotations"> </td>
600 </tr>
601 </tbody>
602 </table></div>
603 </div>
604 <div class="refsect3">
605 <a name="g-resource-open-stream.returns"></a><h4>Returns</h4>
606 <p> <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
607 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
608 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
609 </div>
610 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
611 </div>
612 <hr>
613 <div class="refsect2">
614 <a name="g-resource-enumerate-children"></a><h3>g_resource_enumerate_children ()</h3>
615 <pre class="programlisting"><span class="returnvalue">char</span> **
616 g_resource_enumerate_children (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
617                                <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
618                                <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
619                                <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
620 <p>Returns all the names of children at the specified <em class="parameter"><code>path</code></em>
621  in the resource.
622 The return result is a <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of strings which should
623 be released with <a href="../glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.</p>
624 <p>If <em class="parameter"><code>path</code></em>
625  is invalid or does not exist in the <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a>,
626 <a class="link" href="GResource.html#G-RESOURCE-ERROR-NOT-FOUND:CAPS"><code class="literal">G_RESOURCE_ERROR_NOT_FOUND</code></a> will be returned.</p>
627 <p><em class="parameter"><code>lookup_flags</code></em>
628  controls the behaviour of the lookup.</p>
629 <div class="refsect3">
630 <a name="g-resource-enumerate-children.parameters"></a><h4>Parameters</h4>
631 <div class="informaltable"><table class="informaltable" width="100%" border="0">
632 <colgroup>
633 <col width="150px" class="parameters_name">
634 <col class="parameters_description">
635 <col width="200px" class="parameters_annotations">
636 </colgroup>
637 <tbody>
638 <tr>
639 <td class="parameter_name"><p>resource</p></td>
640 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
641 <td class="parameter_annotations"> </td>
642 </tr>
643 <tr>
644 <td class="parameter_name"><p>path</p></td>
645 <td class="parameter_description"><p>A pathname inside the resource</p></td>
646 <td class="parameter_annotations"> </td>
647 </tr>
648 <tr>
649 <td class="parameter_name"><p>lookup_flags</p></td>
650 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
651 <td class="parameter_annotations"> </td>
652 </tr>
653 <tr>
654 <td class="parameter_name"><p>error</p></td>
655 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
656 <td class="parameter_annotations"> </td>
657 </tr>
658 </tbody>
659 </table></div>
660 </div>
661 <div class="refsect3">
662 <a name="g-resource-enumerate-children.returns"></a><h4>Returns</h4>
663 <p> an array of constant strings. </p>
664 <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
665 </div>
666 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
667 </div>
668 <hr>
669 <div class="refsect2">
670 <a name="g-resource-get-info"></a><h3>g_resource_get_info ()</h3>
671 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
672 g_resource_get_info (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
673                      <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
674                      <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
675                      <em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
676                      <em class="parameter"><code><a href="../glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
677                      <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
678 <p>Looks for a file at the specified <em class="parameter"><code>path</code></em>
679  in the resource and
680 if found returns information about it.</p>
681 <p><em class="parameter"><code>lookup_flags</code></em>
682  controls the behaviour of the lookup.</p>
683 <div class="refsect3">
684 <a name="g-resource-get-info.parameters"></a><h4>Parameters</h4>
685 <div class="informaltable"><table class="informaltable" width="100%" border="0">
686 <colgroup>
687 <col width="150px" class="parameters_name">
688 <col class="parameters_description">
689 <col width="200px" class="parameters_annotations">
690 </colgroup>
691 <tbody>
692 <tr>
693 <td class="parameter_name"><p>resource</p></td>
694 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
695 <td class="parameter_annotations"> </td>
696 </tr>
697 <tr>
698 <td class="parameter_name"><p>path</p></td>
699 <td class="parameter_description"><p>A pathname inside the resource</p></td>
700 <td class="parameter_annotations"> </td>
701 </tr>
702 <tr>
703 <td class="parameter_name"><p>lookup_flags</p></td>
704 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
705 <td class="parameter_annotations"> </td>
706 </tr>
707 <tr>
708 <td class="parameter_name"><p>size</p></td>
709 <td class="parameter_description"><p> a location to place the length of the contents of the file,
710 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. </p></td>
711 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
712 </tr>
713 <tr>
714 <td class="parameter_name"><p>flags</p></td>
715 <td class="parameter_description"><p> a location to place the flags about the file,
716 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. </p></td>
717 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
718 </tr>
719 <tr>
720 <td class="parameter_name"><p>error</p></td>
721 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
722 <td class="parameter_annotations"> </td>
723 </tr>
724 </tbody>
725 </table></div>
726 </div>
727 <div class="refsect3">
728 <a name="g-resource-get-info.returns"></a><h4>Returns</h4>
729 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was found. <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were errors</p>
730 </div>
731 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
732 </div>
733 <hr>
734 <div class="refsect2">
735 <a name="g-static-resource-init"></a><h3>g_static_resource_init ()</h3>
736 <pre class="programlisting"><span class="returnvalue">void</span>
737 g_static_resource_init (<em class="parameter"><code><a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource"><span class="type">GStaticResource</span></a> *static_resource</code></em>);</pre>
738 <p>Initializes a GResource from static data using a
739 GStaticResource.</p>
740 <p>This is normally used by code generated by
741 glib-compile-resources
742 and is not typically used by other code.</p>
743 <div class="refsect3">
744 <a name="g-static-resource-init.parameters"></a><h4>Parameters</h4>
745 <div class="informaltable"><table class="informaltable" width="100%" border="0">
746 <colgroup>
747 <col width="150px" class="parameters_name">
748 <col class="parameters_description">
749 <col width="200px" class="parameters_annotations">
750 </colgroup>
751 <tbody><tr>
752 <td class="parameter_name"><p>static_resource</p></td>
753 <td class="parameter_description"><p>pointer to a static <a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource"><span class="type">GStaticResource</span></a></p></td>
754 <td class="parameter_annotations"> </td>
755 </tr></tbody>
756 </table></div>
757 </div>
758 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
759 </div>
760 <hr>
761 <div class="refsect2">
762 <a name="g-static-resource-fini"></a><h3>g_static_resource_fini ()</h3>
763 <pre class="programlisting"><span class="returnvalue">void</span>
764 g_static_resource_fini (<em class="parameter"><code><a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource"><span class="type">GStaticResource</span></a> *static_resource</code></em>);</pre>
765 <p>Finalized a GResource initialized by <a class="link" href="GResource.html#g-static-resource-init" title="g_static_resource_init ()"><code class="function">g_static_resource_init()</code></a>.</p>
766 <p>This is normally used by code generated by
767 glib-compile-resources
768 and is not typically used by other code.</p>
769 <div class="refsect3">
770 <a name="g-static-resource-fini.parameters"></a><h4>Parameters</h4>
771 <div class="informaltable"><table class="informaltable" width="100%" border="0">
772 <colgroup>
773 <col width="150px" class="parameters_name">
774 <col class="parameters_description">
775 <col width="200px" class="parameters_annotations">
776 </colgroup>
777 <tbody><tr>
778 <td class="parameter_name"><p>static_resource</p></td>
779 <td class="parameter_description"><p>pointer to a static <a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource"><span class="type">GStaticResource</span></a></p></td>
780 <td class="parameter_annotations"> </td>
781 </tr></tbody>
782 </table></div>
783 </div>
784 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
785 </div>
786 <hr>
787 <div class="refsect2">
788 <a name="g-static-resource-get-resource"></a><h3>g_static_resource_get_resource ()</h3>
789 <pre class="programlisting"><a class="link" href="GResource.html" title="GResource"><span class="returnvalue">GResource</span></a> *
790 g_static_resource_get_resource (<em class="parameter"><code><a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource"><span class="type">GStaticResource</span></a> *static_resource</code></em>);</pre>
791 <p>Gets the GResource that was registered by a call to <a class="link" href="GResource.html#g-static-resource-init" title="g_static_resource_init ()"><code class="function">g_static_resource_init()</code></a>.</p>
792 <p>This is normally used by code generated by
793 glib-compile-resources
794 and is not typically used by other code.</p>
795 <div class="refsect3">
796 <a name="g-static-resource-get-resource.parameters"></a><h4>Parameters</h4>
797 <div class="informaltable"><table class="informaltable" width="100%" border="0">
798 <colgroup>
799 <col width="150px" class="parameters_name">
800 <col class="parameters_description">
801 <col width="200px" class="parameters_annotations">
802 </colgroup>
803 <tbody><tr>
804 <td class="parameter_name"><p>static_resource</p></td>
805 <td class="parameter_description"><p>pointer to a static <a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource"><span class="type">GStaticResource</span></a></p></td>
806 <td class="parameter_annotations"> </td>
807 </tr></tbody>
808 </table></div>
809 </div>
810 <div class="refsect3">
811 <a name="g-static-resource-get-resource.returns"></a><h4>Returns</h4>
812 <p> a <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a>. </p>
813 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
814 </div>
815 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
816 </div>
817 <hr>
818 <div class="refsect2">
819 <a name="g-resources-register"></a><h3>g_resources_register ()</h3>
820 <pre class="programlisting"><span class="returnvalue">void</span>
821 g_resources_register (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);</pre>
822 <p>Registers the resource with the process-global set of resources.
823 Once a resource is registered the files in it can be accessed
824 with the global resource lookup functions like <a class="link" href="GResource.html#g-resources-lookup-data" title="g_resources_lookup_data ()"><code class="function">g_resources_lookup_data()</code></a>.</p>
825 <div class="refsect3">
826 <a name="g-resources-register.parameters"></a><h4>Parameters</h4>
827 <div class="informaltable"><table class="informaltable" width="100%" border="0">
828 <colgroup>
829 <col width="150px" class="parameters_name">
830 <col class="parameters_description">
831 <col width="200px" class="parameters_annotations">
832 </colgroup>
833 <tbody><tr>
834 <td class="parameter_name"><p>resource</p></td>
835 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
836 <td class="parameter_annotations"> </td>
837 </tr></tbody>
838 </table></div>
839 </div>
840 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
841 </div>
842 <hr>
843 <div class="refsect2">
844 <a name="g-resources-unregister"></a><h3>g_resources_unregister ()</h3>
845 <pre class="programlisting"><span class="returnvalue">void</span>
846 g_resources_unregister (<em class="parameter"><code><a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);</pre>
847 <p>Unregisters the resource from the process-global set of resources.</p>
848 <div class="refsect3">
849 <a name="g-resources-unregister.parameters"></a><h4>Parameters</h4>
850 <div class="informaltable"><table class="informaltable" width="100%" border="0">
851 <colgroup>
852 <col width="150px" class="parameters_name">
853 <col class="parameters_description">
854 <col width="200px" class="parameters_annotations">
855 </colgroup>
856 <tbody><tr>
857 <td class="parameter_name"><p>resource</p></td>
858 <td class="parameter_description"><p>A <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a></p></td>
859 <td class="parameter_annotations"> </td>
860 </tr></tbody>
861 </table></div>
862 </div>
863 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
864 </div>
865 <hr>
866 <div class="refsect2">
867 <a name="g-resources-lookup-data"></a><h3>g_resources_lookup_data ()</h3>
868 <pre class="programlisting"><a href="../glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
869 g_resources_lookup_data (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
870                          <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
871                          <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
872 <p>Looks for a file at the specified <em class="parameter"><code>path</code></em>
873  in the set of
874 globally registered resources and returns a <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> that
875 lets you directly access the data in memory.</p>
876 <p>The data is always followed by a zero byte, so you
877 can safely use the data as a C string. However, that byte
878 is not included in the size of the GBytes.</p>
879 <p>For uncompressed resource files this is a pointer directly into
880 the resource bundle, which is typically in some readonly data section
881 in the program binary. For compressed files we allocate memory on
882 the heap and automatically uncompress the data.</p>
883 <p><em class="parameter"><code>lookup_flags</code></em>
884  controls the behaviour of the lookup.</p>
885 <div class="refsect3">
886 <a name="g-resources-lookup-data.parameters"></a><h4>Parameters</h4>
887 <div class="informaltable"><table class="informaltable" width="100%" border="0">
888 <colgroup>
889 <col width="150px" class="parameters_name">
890 <col class="parameters_description">
891 <col width="200px" class="parameters_annotations">
892 </colgroup>
893 <tbody>
894 <tr>
895 <td class="parameter_name"><p>path</p></td>
896 <td class="parameter_description"><p>A pathname inside the resource</p></td>
897 <td class="parameter_annotations"> </td>
898 </tr>
899 <tr>
900 <td class="parameter_name"><p>lookup_flags</p></td>
901 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
902 <td class="parameter_annotations"> </td>
903 </tr>
904 <tr>
905 <td class="parameter_name"><p>error</p></td>
906 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
907 <td class="parameter_annotations"> </td>
908 </tr>
909 </tbody>
910 </table></div>
911 </div>
912 <div class="refsect3">
913 <a name="g-resources-lookup-data.returns"></a><h4>Returns</h4>
914 <p> <a href="../glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
915 Free the returned object with <a href="../glib-Byte-Arrays.html#g-bytes-unref"><code class="function">g_bytes_unref()</code></a>. </p>
916 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
917 </div>
918 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
919 </div>
920 <hr>
921 <div class="refsect2">
922 <a name="g-resources-open-stream"></a><h3>g_resources_open_stream ()</h3>
923 <pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *
924 g_resources_open_stream (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
925                          <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
926                          <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
927 <p>Looks for a file at the specified <em class="parameter"><code>path</code></em>
928  in the set of
929 globally registered resources and returns a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>
930 that lets you read the data.</p>
931 <p><em class="parameter"><code>lookup_flags</code></em>
932  controls the behaviour of the lookup.</p>
933 <div class="refsect3">
934 <a name="g-resources-open-stream.parameters"></a><h4>Parameters</h4>
935 <div class="informaltable"><table class="informaltable" width="100%" border="0">
936 <colgroup>
937 <col width="150px" class="parameters_name">
938 <col class="parameters_description">
939 <col width="200px" class="parameters_annotations">
940 </colgroup>
941 <tbody>
942 <tr>
943 <td class="parameter_name"><p>path</p></td>
944 <td class="parameter_description"><p>A pathname inside the resource</p></td>
945 <td class="parameter_annotations"> </td>
946 </tr>
947 <tr>
948 <td class="parameter_name"><p>lookup_flags</p></td>
949 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
950 <td class="parameter_annotations"> </td>
951 </tr>
952 <tr>
953 <td class="parameter_name"><p>error</p></td>
954 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
955 <td class="parameter_annotations"> </td>
956 </tr>
957 </tbody>
958 </table></div>
959 </div>
960 <div class="refsect3">
961 <a name="g-resources-open-stream.returns"></a><h4>Returns</h4>
962 <p> <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
963 Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
964 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
965 </div>
966 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
967 </div>
968 <hr>
969 <div class="refsect2">
970 <a name="g-resources-enumerate-children"></a><h3>g_resources_enumerate_children ()</h3>
971 <pre class="programlisting"><span class="returnvalue">char</span> **
972 g_resources_enumerate_children (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
973                                 <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
974                                 <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
975 <p>Returns all the names of children at the specified <em class="parameter"><code>path</code></em>
976  in the set of
977 globally registered resources.
978 The return result is a <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of strings which should
979 be released with <a href="../glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.</p>
980 <p><em class="parameter"><code>lookup_flags</code></em>
981  controls the behaviour of the lookup.</p>
982 <div class="refsect3">
983 <a name="g-resources-enumerate-children.parameters"></a><h4>Parameters</h4>
984 <div class="informaltable"><table class="informaltable" width="100%" border="0">
985 <colgroup>
986 <col width="150px" class="parameters_name">
987 <col class="parameters_description">
988 <col width="200px" class="parameters_annotations">
989 </colgroup>
990 <tbody>
991 <tr>
992 <td class="parameter_name"><p>path</p></td>
993 <td class="parameter_description"><p>A pathname inside the resource</p></td>
994 <td class="parameter_annotations"> </td>
995 </tr>
996 <tr>
997 <td class="parameter_name"><p>lookup_flags</p></td>
998 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
999 <td class="parameter_annotations"> </td>
1000 </tr>
1001 <tr>
1002 <td class="parameter_name"><p>error</p></td>
1003 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1004 <td class="parameter_annotations"> </td>
1005 </tr>
1006 </tbody>
1007 </table></div>
1008 </div>
1009 <div class="refsect3">
1010 <a name="g-resources-enumerate-children.returns"></a><h4>Returns</h4>
1011 <p> an array of constant strings. </p>
1012 <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1013 </div>
1014 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
1015 </div>
1016 <hr>
1017 <div class="refsect2">
1018 <a name="g-resources-get-info"></a><h3>g_resources_get_info ()</h3>
1019 <pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1020 g_resources_get_info (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
1021                       <em class="parameter"><code><a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
1022                       <em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
1023                       <em class="parameter"><code><a href="../glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
1024                       <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1025 <p>Looks for a file at the specified <em class="parameter"><code>path</code></em>
1026  in the set of
1027 globally registered resources and if found returns information about it.</p>
1028 <p><em class="parameter"><code>lookup_flags</code></em>
1029  controls the behaviour of the lookup.</p>
1030 <div class="refsect3">
1031 <a name="g-resources-get-info.parameters"></a><h4>Parameters</h4>
1032 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1033 <colgroup>
1034 <col width="150px" class="parameters_name">
1035 <col class="parameters_description">
1036 <col width="200px" class="parameters_annotations">
1037 </colgroup>
1038 <tbody>
1039 <tr>
1040 <td class="parameter_name"><p>path</p></td>
1041 <td class="parameter_description"><p>A pathname inside the resource</p></td>
1042 <td class="parameter_annotations"> </td>
1043 </tr>
1044 <tr>
1045 <td class="parameter_name"><p>lookup_flags</p></td>
1046 <td class="parameter_description"><p>A <a class="link" href="GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a></p></td>
1047 <td class="parameter_annotations"> </td>
1048 </tr>
1049 <tr>
1050 <td class="parameter_name"><p>size</p></td>
1051 <td class="parameter_description"><p> a location to place the length of the contents of the file,
1052 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. </p></td>
1053 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1054 </tr>
1055 <tr>
1056 <td class="parameter_name"><p>flags</p></td>
1057 <td class="parameter_description"><p> a location to place the flags about the file,
1058 or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. </p></td>
1059 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1060 </tr>
1061 <tr>
1062 <td class="parameter_name"><p>error</p></td>
1063 <td class="parameter_description"><p>return location for a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1064 <td class="parameter_annotations"> </td>
1065 </tr>
1066 </tbody>
1067 </table></div>
1068 </div>
1069 <div class="refsect3">
1070 <a name="g-resources-get-info.returns"></a><h4>Returns</h4>
1071 <p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was found. <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were errors</p>
1072 </div>
1073 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
1074 </div>
1075 </div>
1076 <div class="refsect1">
1077 <a name="GResource.other_details"></a><h2>Types and Values</h2>
1078 <div class="refsect2">
1079 <a name="GResource-struct"></a><h3>GResource</h3>
1080 <pre class="programlisting">typedef struct _GResource GResource;</pre>
1081 <p>A resource bundle.</p>
1082 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
1083 </div>
1084 <hr>
1085 <div class="refsect2">
1086 <a name="GResourceFlags"></a><h3>enum GResourceFlags</h3>
1087 <p>GResourceFlags give information about a particular file inside a resource
1088 bundle.</p>
1089 <div class="refsect3">
1090 <a name="GResourceFlags.members"></a><h4>Members</h4>
1091 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1092 <colgroup>
1093 <col width="300px" class="enum_members_name">
1094 <col class="enum_members_description">
1095 <col width="200px" class="enum_members_annotations">
1096 </colgroup>
1097 <tbody>
1098 <tr>
1099 <td class="enum_member_name"><p><a name="G-RESOURCE-FLAGS-NONE:CAPS"></a>G_RESOURCE_FLAGS_NONE</p></td>
1100 <td class="enum_member_description">
1101 <p>No flags set.</p>
1102 </td>
1103 <td class="enum_member_annotations"> </td>
1104 </tr>
1105 <tr>
1106 <td class="enum_member_name"><p><a name="G-RESOURCE-FLAGS-COMPRESSED:CAPS"></a>G_RESOURCE_FLAGS_COMPRESSED</p></td>
1107 <td class="enum_member_description">
1108 <p>The file is compressed.</p>
1109 </td>
1110 <td class="enum_member_annotations"> </td>
1111 </tr>
1112 </tbody>
1113 </table></div>
1114 </div>
1115 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
1116 </div>
1117 <hr>
1118 <div class="refsect2">
1119 <a name="GResourceLookupFlags"></a><h3>enum GResourceLookupFlags</h3>
1120 <p>GResourceLookupFlags determine how resource path lookups are handled.</p>
1121 <div class="refsect3">
1122 <a name="GResourceLookupFlags.members"></a><h4>Members</h4>
1123 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1124 <colgroup>
1125 <col width="300px" class="enum_members_name">
1126 <col class="enum_members_description">
1127 <col width="200px" class="enum_members_annotations">
1128 </colgroup>
1129 <tbody><tr>
1130 <td class="enum_member_name"><p><a name="G-RESOURCE-LOOKUP-FLAGS-NONE:CAPS"></a>G_RESOURCE_LOOKUP_FLAGS_NONE</p></td>
1131 <td class="enum_member_description">
1132 <p>No flags set.</p>
1133 </td>
1134 <td class="enum_member_annotations"> </td>
1135 </tr></tbody>
1136 </table></div>
1137 </div>
1138 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
1139 </div>
1140 <hr>
1141 <div class="refsect2">
1142 <a name="GStaticResource"></a><h3>struct GStaticResource</h3>
1143 <pre class="programlisting">struct GStaticResource {
1144 };
1145 </pre>
1146 <p><a class="link" href="GResource.html#GStaticResource" title="struct GStaticResource"><span class="type">GStaticResource</span></a> is an opaque data structure and can only be accessed
1147 using the following functions.</p>
1148 </div>
1149 <hr>
1150 <div class="refsect2">
1151 <a name="G-RESOURCE-ERROR:CAPS"></a><h3>G_RESOURCE_ERROR</h3>
1152 <pre class="programlisting">#define G_RESOURCE_ERROR (g_resource_error_quark ())
1153 </pre>
1154 <p>Error domain for <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a>. Errors in this domain will be from the
1155 <a class="link" href="GResource.html#GResourceError" title="enum GResourceError"><span class="type">GResourceError</span></a> enumeration. See <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for more information on
1156 error domains.</p>
1157 </div>
1158 <hr>
1159 <div class="refsect2">
1160 <a name="GResourceError"></a><h3>enum GResourceError</h3>
1161 <p>An error code used with <a class="link" href="GResource.html#G-RESOURCE-ERROR:CAPS" title="G_RESOURCE_ERROR"><code class="literal">G_RESOURCE_ERROR</code></a> in a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> returned
1162 from a <a class="link" href="GResource.html" title="GResource"><span class="type">GResource</span></a> routine.</p>
1163 <div class="refsect3">
1164 <a name="GResourceError.members"></a><h4>Members</h4>
1165 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1166 <colgroup>
1167 <col width="300px" class="enum_members_name">
1168 <col class="enum_members_description">
1169 <col width="200px" class="enum_members_annotations">
1170 </colgroup>
1171 <tbody>
1172 <tr>
1173 <td class="enum_member_name"><p><a name="G-RESOURCE-ERROR-NOT-FOUND:CAPS"></a>G_RESOURCE_ERROR_NOT_FOUND</p></td>
1174 <td class="enum_member_description">
1175 <p>no file was found at the requested path</p>
1176 </td>
1177 <td class="enum_member_annotations"> </td>
1178 </tr>
1179 <tr>
1180 <td class="enum_member_name"><p><a name="G-RESOURCE-ERROR-INTERNAL:CAPS"></a>G_RESOURCE_ERROR_INTERNAL</p></td>
1181 <td class="enum_member_description">
1182 <p>unknown error</p>
1183 </td>
1184 <td class="enum_member_annotations"> </td>
1185 </tr>
1186 </tbody>
1187 </table></div>
1188 </div>
1189 <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
1190 </div>
1191 </div>
1192 </div>
1193 <div class="footer">
1194 <hr>Generated by GTK-Doc V1.25.1</div>
1195 </body>
1196 </html>