~ubuntu-branches/ubuntu/raring/glib2.0/raring-proposed

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/gio-GResource.html

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-03-22 15:34:02 UTC
  • mfrom: (172.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130322153402-sairsye8us9zxmew
Tags: 2.35.9-2ubuntu1
* Resynchronise with Debian experimental, remaining change:
  - Make python BD :all to facilitate cross building

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GResource</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
7
<link rel="home" href="index.html" title="GIO Reference Manual">
8
8
<link rel="up" href="resources.html" title="Resources">
9
9
<link rel="prev" href="resources.html" title="Resources">
10
10
<link rel="next" href="permissions.html" title="Permissions">
11
 
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
43
43
                    <a class="link" href="gio-GResource.html#GResource" title="GResource">GResource</a>;
44
44
enum                <a class="link" href="gio-GResource.html#GResourceFlags" title="enum GResourceFlags">GResourceFlags</a>;
45
45
enum                <a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags">GResourceLookupFlags</a>;
46
 
<a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         <a class="link" href="gio-GResource.html#g-resource-load" title="g_resource_load ()">g_resource_load</a>                     (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
47
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
48
 
<a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         <a class="link" href="gio-GResource.html#g-resource-new-from-data" title="g_resource_new_from_data ()">g_resource_new_from_data</a>            (<em class="parameter"><code><a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *data</code></em>,
49
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
46
<a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         <a class="link" href="gio-GResource.html#g-resource-load" title="g_resource_load ()">g_resource_load</a>                     (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
 
47
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
48
<a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         <a class="link" href="gio-GResource.html#g-resource-new-from-data" title="g_resource_new_from_data ()">g_resource_new_from_data</a>            (<em class="parameter"><code><a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *data</code></em>,
 
49
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
50
50
<a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         <a class="link" href="gio-GResource.html#g-resource-ref" title="g_resource_ref ()">g_resource_ref</a>                      (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);
51
51
<span class="returnvalue">void</span>                <a class="link" href="gio-GResource.html#g-resource-unref" title="g_resource_unref ()">g_resource_unref</a>                    (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);
52
 
<a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            <a class="link" href="gio-GResource.html#g-resource-lookup-data" title="g_resource_lookup_data ()">g_resource_lookup_data</a>              (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
 
52
<a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            <a class="link" href="gio-GResource.html#g-resource-lookup-data" title="g_resource_lookup_data ()">g_resource_lookup_data</a>              (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
53
53
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
54
54
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
55
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
55
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
56
56
<a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *      <a class="link" href="gio-GResource.html#g-resource-open-stream" title="g_resource_open_stream ()">g_resource_open_stream</a>              (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
57
57
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
58
58
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
59
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
59
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
60
60
<span class="returnvalue">char</span> **             <a class="link" href="gio-GResource.html#g-resource-enumerate-children" title="g_resource_enumerate_children ()">g_resource_enumerate_children</a>       (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
61
61
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
62
62
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
63
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
64
 
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GResource.html#g-resource-get-info" title="g_resource_get_info ()">g_resource_get_info</a>                 (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
 
63
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
64
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GResource.html#g-resource-get-info" title="g_resource_get_info ()">g_resource_get_info</a>                 (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
65
65
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
66
66
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
67
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
68
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
69
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
67
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
 
68
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
 
69
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
70
70
 
71
71
<span class="returnvalue">void</span>                <a class="link" href="gio-GResource.html#g-static-resource-init" title="g_static_resource_init ()">g_static_resource_init</a>              (<em class="parameter"><code><span class="type">GStaticResource</span> *static_resource</code></em>);
72
72
<span class="returnvalue">void</span>                <a class="link" href="gio-GResource.html#g-static-resource-fini" title="g_static_resource_fini ()">g_static_resource_fini</a>              (<em class="parameter"><code><span class="type">GStaticResource</span> *static_resource</code></em>);
74
74
 
75
75
<span class="returnvalue">void</span>                <a class="link" href="gio-GResource.html#g-resources-register" title="g_resources_register ()">g_resources_register</a>                (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);
76
76
<span class="returnvalue">void</span>                <a class="link" href="gio-GResource.html#g-resources-unregister" title="g_resources_unregister ()">g_resources_unregister</a>              (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>);
77
 
<a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            <a class="link" href="gio-GResource.html#g-resources-lookup-data" title="g_resources_lookup_data ()">g_resources_lookup_data</a>             (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
 
77
<a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            <a class="link" href="gio-GResource.html#g-resources-lookup-data" title="g_resources_lookup_data ()">g_resources_lookup_data</a>             (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
78
78
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
79
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
79
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
80
80
<a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *      <a class="link" href="gio-GResource.html#g-resources-open-stream" title="g_resources_open_stream ()">g_resources_open_stream</a>             (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
81
81
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
82
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
82
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
83
83
<span class="returnvalue">char</span> **             <a class="link" href="gio-GResource.html#g-resources-enumerate-children" title="g_resources_enumerate_children ()">g_resources_enumerate_children</a>      (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
84
84
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
85
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
86
 
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GResource.html#g-resources-get-info" title="g_resources_get_info ()">g_resources_get_info</a>                (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
 
85
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
86
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GResource.html#g-resources-get-info" title="g_resources_get_info ()">g_resources_get_info</a>                (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
87
87
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
88
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
89
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
90
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
88
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
 
89
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
 
90
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
91
91
 
92
92
#define             <a class="link" href="gio-GResource.html#G-RESOURCE-ERROR:CAPS" title="G_RESOURCE_ERROR">G_RESOURCE_ERROR</a>
93
93
enum                <a class="link" href="gio-GResource.html#GResourceError" title="enum GResourceError">GResourceError</a>;
97
97
<a name="gio-GResource.description"></a><h2>Description</h2>
98
98
<p>
99
99
Applications and libraries often contain binary or textual data that is really part of the
100
 
application, rather than user data. For instance <a href="http://developer.gnome.org/gtk2/GtkBuilder.html"><span class="type">GtkBuilder</span></a> .ui files, splashscreen images,
 
100
application, rather than user data. For instance <span class="type">GtkBuilder</span> .ui files, splashscreen images,
101
101
GMenu markup xml, CSS files, icons, etc. These are often shipped as files in <code class="filename">$datadir/appname</code>, or
102
102
manually included as literal strings in the code.
103
103
</p>
143
143
</p>
144
144
<div class="example">
145
145
<a name="resource-example"></a><p class="title"><b>Example 17. Example resource description</b></p>
146
 
<div class="example-contents"><pre class="programlisting">
147
 
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 
146
<div class="example-contents">
 
147
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
148
    <tbody>
 
149
      <tr>
 
150
        <td class="listing_lines" align="right"><pre>1
 
151
2
 
152
3
 
153
4
 
154
5
 
155
6
 
156
7
 
157
8</pre></td>
 
158
        <td class="listing_code"><pre class="programlisting">&lt;?xml version=<span class="number">&quot;1.0&quot;</span> encoding=<span class="number">&quot;UTF-8&quot;</span>?&gt;
148
159
&lt;gresources&gt;
149
 
  &lt;gresource prefix="/org/gtk/Example"&gt;
 
160
  &lt;gresource prefix=<span class="number">&quot;/org/gtk/Example&quot;</span>&gt;
150
161
    &lt;file&gt;data/splashscreen.png&lt;/file&gt;
151
 
    &lt;file compressed="true"&gt;dialog.ui&lt;/file&gt;
152
 
    &lt;file preprocess="xml-stripblanks"&gt;menumarkup.xml&lt;/file&gt;
 
162
    &lt;file compressed=<span class="number">&quot;true&quot;</span>&gt;dialog.ui&lt;/file&gt;
 
163
    &lt;file preprocess=<span class="number">&quot;xml-stripblanks&quot;</span>&gt;menumarkup.xml&lt;/file&gt;
153
164
  &lt;/gresource&gt;
154
 
&lt;/gresources&gt;
155
 
</pre></div>
 
165
&lt;/gresources&gt;</pre></td>
 
166
      </tr>
 
167
    </tbody>
 
168
  </table>
 
169
</div>
 
170
 
156
171
</div>
157
172
<p><br class="example-break">
158
173
</p>
217
232
GResourceFlags give information about a particular file inside a resource
218
233
bundle.
219
234
</p>
220
 
<div class="variablelist"><table border="0">
 
235
<div class="variablelist"><table border="0" class="variablelist">
 
236
<colgroup>
221
237
<col align="left" valign="top">
 
238
<col>
 
239
</colgroup>
222
240
<tbody>
223
241
<tr>
224
242
<td><p><a name="G-RESOURCE-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_RESOURCE_FLAGS_NONE</code></span></p></td>
244
262
<p>
245
263
GResourceLookupFlags determine how resource path lookups are handled.
246
264
</p>
247
 
<div class="variablelist"><table border="0">
 
265
<div class="variablelist"><table border="0" class="variablelist">
 
266
<colgroup>
248
267
<col align="left" valign="top">
 
268
<col>
 
269
</colgroup>
249
270
<tbody><tr>
250
271
<td><p><a name="G-RESOURCE-LOOKUP-FLAGS-NONE:CAPS"></a><span class="term"><code class="literal">G_RESOURCE_LOOKUP_FLAGS_NONE</code></span></p></td>
251
272
<td>No flags set.
257
278
<hr>
258
279
<div class="refsect2">
259
280
<a name="g-resource-load"></a><h3>g_resource_load ()</h3>
260
 
<pre class="programlisting"><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         g_resource_load                     (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
261
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
281
<pre class="programlisting"><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         g_resource_load                     (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
 
282
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
262
283
<p>
263
284
Loads a binary resource bundle and creates a <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> representation of it, allowing
264
285
you to query it for data.
267
288
If you want to use this resource in the global resource namespace you need
268
289
to register it with <a class="link" href="gio-GResource.html#g-resources-register" title="g_resources_register ()"><code class="function">g_resources_register()</code></a>.
269
290
</p>
270
 
<div class="variablelist"><table border="0">
 
291
<div class="variablelist"><table border="0" class="variablelist">
 
292
<colgroup>
271
293
<col align="left" valign="top">
 
294
<col>
 
295
</colgroup>
272
296
<tbody>
273
297
<tr>
274
298
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
275
 
<td>the path of a filename to load, in the GLib filename encoding. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> filename]</span>
 
299
<td>the path of a filename to load, in the GLib filename encoding. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span>
276
300
</td>
277
301
</tr>
278
302
<tr>
279
303
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
280
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
304
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
281
305
</td>
282
306
</tr>
283
307
<tr>
284
308
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
285
 
<td>a new <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
309
<td>a new <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
286
310
</td>
287
311
</tr>
288
312
</tbody>
292
316
<hr>
293
317
<div class="refsect2">
294
318
<a name="g-resource-new-from-data"></a><h3>g_resource_new_from_data ()</h3>
295
 
<pre class="programlisting"><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         g_resource_new_from_data            (<em class="parameter"><code><a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *data</code></em>,
296
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
319
<pre class="programlisting"><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="returnvalue">GResource</span></a> *         g_resource_new_from_data            (<em class="parameter"><code><a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *data</code></em>,
 
320
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
297
321
<p>
298
322
Creates a GResource from a reference to the binary resource bundle.
299
323
This will keep a reference to <em class="parameter"><code>data</code></em> while the resource lives, so
303
327
If you want to use this resource in the global resource namespace you need
304
328
to register it with <a class="link" href="gio-GResource.html#g-resources-register" title="g_resources_register ()"><code class="function">g_resources_register()</code></a>.
305
329
</p>
306
 
<div class="variablelist"><table border="0">
 
330
<div class="variablelist"><table border="0" class="variablelist">
 
331
<colgroup>
307
332
<col align="left" valign="top">
 
333
<col>
 
334
</colgroup>
308
335
<tbody>
309
336
<tr>
310
337
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
311
 
<td>A <a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a>
 
338
<td>A <a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a>
312
339
</td>
313
340
</tr>
314
341
<tr>
315
342
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
316
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
343
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
317
344
</td>
318
345
</tr>
319
346
<tr>
320
347
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
321
 
<td>a new <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
348
<td>a new <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
322
349
</td>
323
350
</tr>
324
351
</tbody>
333
360
Atomically increments the reference count of <em class="parameter"><code>array</code></em> by one. This
334
361
function is MT-safe and may be called from any thread.
335
362
</p>
336
 
<div class="variablelist"><table border="0">
 
363
<div class="variablelist"><table border="0" class="variablelist">
 
364
<colgroup>
337
365
<col align="left" valign="top">
 
366
<col>
 
367
</colgroup>
338
368
<tbody>
339
369
<tr>
340
370
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
360
390
released. This function is MT-safe and may be called from any
361
391
thread.
362
392
</p>
363
 
<div class="variablelist"><table border="0">
 
393
<div class="variablelist"><table border="0" class="variablelist">
 
394
<colgroup>
364
395
<col align="left" valign="top">
 
396
<col>
 
397
</colgroup>
365
398
<tbody><tr>
366
399
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
367
400
<td>A <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>
373
406
<hr>
374
407
<div class="refsect2">
375
408
<a name="g-resource-lookup-data"></a><h3>g_resource_lookup_data ()</h3>
376
 
<pre class="programlisting"><a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            g_resource_lookup_data              (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
 
409
<pre class="programlisting"><a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            g_resource_lookup_data              (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
377
410
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
378
411
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
379
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
412
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
380
413
<p>
381
414
Looks for a file at the specified <em class="parameter"><code>path</code></em> in the resource and
382
 
returns a <a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> that lets you directly access the data in
 
415
returns a <a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> that lets you directly access the data in
383
416
memory.
384
417
</p>
385
418
<p>
396
429
<p>
397
430
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
398
431
</p>
399
 
<div class="variablelist"><table border="0">
 
432
<div class="variablelist"><table border="0" class="variablelist">
 
433
<colgroup>
400
434
<col align="left" valign="top">
 
435
<col>
 
436
</colgroup>
401
437
<tbody>
402
438
<tr>
403
439
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
415
451
</tr>
416
452
<tr>
417
453
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
418
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
454
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
419
455
</td>
420
456
</tr>
421
457
<tr>
422
458
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
423
459
<td>
424
 
<a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
425
 
Free the returned object with <a href="./../glib/glib/glib-Byte-Arrays.html#g-bytes-unref"><code class="function">g_bytes_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
460
<a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
461
Free the returned object with <a href="../glib/glib-Byte-Arrays.html#g-bytes-unref"><code class="function">g_bytes_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
426
462
</td>
427
463
</tr>
428
464
</tbody>
435
471
<pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *      g_resource_open_stream              (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
436
472
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
437
473
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
438
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
474
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
439
475
<p>
440
476
Looks for a file at the specified <em class="parameter"><code>path</code></em> in the resource and
441
477
returns a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> that lets you read the data.
443
479
<p>
444
480
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
445
481
</p>
446
 
<div class="variablelist"><table border="0">
 
482
<div class="variablelist"><table border="0" class="variablelist">
 
483
<colgroup>
447
484
<col align="left" valign="top">
 
485
<col>
 
486
</colgroup>
448
487
<tbody>
449
488
<tr>
450
489
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
462
501
</tr>
463
502
<tr>
464
503
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
465
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
504
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
466
505
</td>
467
506
</tr>
468
507
<tr>
469
508
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
470
509
<td>
471
 
<a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
472
 
Free the returned object with <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
510
<a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
511
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
473
512
</td>
474
513
</tr>
475
514
</tbody>
482
521
<pre class="programlisting"><span class="returnvalue">char</span> **             g_resource_enumerate_children       (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
483
522
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
484
523
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
485
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
524
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
486
525
<p>
487
526
Returns all the names of children at the specified <em class="parameter"><code>path</code></em> in the resource.
488
 
The return result is a <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of strings which should
489
 
be released with <a href="./../glib/glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.
 
527
The return result is a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of strings which should
 
528
be released with <a href="../glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.
490
529
</p>
491
530
<p>
492
531
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
493
532
</p>
494
 
<div class="variablelist"><table border="0">
 
533
<div class="variablelist"><table border="0" class="variablelist">
 
534
<colgroup>
495
535
<col align="left" valign="top">
 
536
<col>
 
537
</colgroup>
496
538
<tbody>
497
539
<tr>
498
540
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
510
552
</tr>
511
553
<tr>
512
554
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
513
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
555
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
514
556
</td>
515
557
</tr>
516
558
<tr>
525
567
<hr>
526
568
<div class="refsect2">
527
569
<a name="g-resource-get-info"></a><h3>g_resource_get_info ()</h3>
528
 
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_resource_get_info                 (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
 
570
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_resource_get_info                 (<em class="parameter"><code><a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> *resource</code></em>,
529
571
                                                         <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
530
572
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
531
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
532
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
533
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
573
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
 
574
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
 
575
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
534
576
<p>
535
577
Looks for a file at the specified <em class="parameter"><code>path</code></em> in the resource and
536
578
if found returns information about it.
538
580
<p>
539
581
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
540
582
</p>
541
 
<div class="variablelist"><table border="0">
 
583
<div class="variablelist"><table border="0" class="variablelist">
 
584
<colgroup>
542
585
<col align="left" valign="top">
 
586
<col>
 
587
</colgroup>
543
588
<tbody>
544
589
<tr>
545
590
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
558
603
<tr>
559
604
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
560
605
<td>a location to place the length of the contents of the file,
561
 
or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
 
606
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
562
607
</td>
563
608
</tr>
564
609
<tr>
565
610
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
566
611
<td>a location to place the flags about the file,
567
 
or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
 
612
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
568
613
</td>
569
614
</tr>
570
615
<tr>
571
616
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
572
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
617
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
573
618
</td>
574
619
</tr>
575
620
<tr>
576
621
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
577
622
<td>
578
 
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was found. <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were errors</td>
 
623
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was found. <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were errors</td>
579
624
</tr>
580
625
</tbody>
581
626
</table></div>
594
639
<a href="glib-compile-resources.html">glib-compile-resources</a>
595
640
and is not typically used by other code.
596
641
</p>
597
 
<div class="variablelist"><table border="0">
 
642
<div class="variablelist"><table border="0" class="variablelist">
 
643
<colgroup>
598
644
<col align="left" valign="top">
 
645
<col>
 
646
</colgroup>
599
647
<tbody><tr>
600
648
<td><p><span class="term"><em class="parameter"><code>static_resource</code></em> :</span></p></td>
601
649
<td>pointer to a static <span class="type">GStaticResource</span>
616
664
<a href="glib-compile-resources.html">glib-compile-resources</a>
617
665
and is not typically used by other code.
618
666
</p>
619
 
<div class="variablelist"><table border="0">
 
667
<div class="variablelist"><table border="0" class="variablelist">
 
668
<colgroup>
620
669
<col align="left" valign="top">
 
670
<col>
 
671
</colgroup>
621
672
<tbody><tr>
622
673
<td><p><span class="term"><em class="parameter"><code>static_resource</code></em> :</span></p></td>
623
674
<td>pointer to a static <span class="type">GStaticResource</span>
638
689
<a href="glib-compile-resources.html">glib-compile-resources</a>
639
690
and is not typically used by other code.
640
691
</p>
641
 
<div class="variablelist"><table border="0">
 
692
<div class="variablelist"><table border="0" class="variablelist">
 
693
<colgroup>
642
694
<col align="left" valign="top">
 
695
<col>
 
696
</colgroup>
643
697
<tbody>
644
698
<tr>
645
699
<td><p><span class="term"><em class="parameter"><code>static_resource</code></em> :</span></p></td>
664
718
Once a resource is registered the files in it can be accessed
665
719
with the global resource lookup functions like <a class="link" href="gio-GResource.html#g-resources-lookup-data" title="g_resources_lookup_data ()"><code class="function">g_resources_lookup_data()</code></a>.
666
720
</p>
667
 
<div class="variablelist"><table border="0">
 
721
<div class="variablelist"><table border="0" class="variablelist">
 
722
<colgroup>
668
723
<col align="left" valign="top">
 
724
<col>
 
725
</colgroup>
669
726
<tbody><tr>
670
727
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
671
728
<td>A <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>
681
738
<p>
682
739
Unregisters the resource from the process-global set of resources.
683
740
</p>
684
 
<div class="variablelist"><table border="0">
 
741
<div class="variablelist"><table border="0" class="variablelist">
 
742
<colgroup>
685
743
<col align="left" valign="top">
 
744
<col>
 
745
</colgroup>
686
746
<tbody><tr>
687
747
<td><p><span class="term"><em class="parameter"><code>resource</code></em> :</span></p></td>
688
748
<td>A <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>
694
754
<hr>
695
755
<div class="refsect2">
696
756
<a name="g-resources-lookup-data"></a><h3>g_resources_lookup_data ()</h3>
697
 
<pre class="programlisting"><a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            g_resources_lookup_data             (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
 
757
<pre class="programlisting"><a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *            g_resources_lookup_data             (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
698
758
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
699
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
759
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
700
760
<p>
701
761
Looks for a file at the specified <em class="parameter"><code>path</code></em> in the set of
702
 
globally registered resources and returns a <a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> that
 
762
globally registered resources and returns a <a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> that
703
763
lets you directly access the data in memory.
704
764
</p>
705
765
<p>
716
776
<p>
717
777
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
718
778
</p>
719
 
<div class="variablelist"><table border="0">
 
779
<div class="variablelist"><table border="0" class="variablelist">
 
780
<colgroup>
720
781
<col align="left" valign="top">
 
782
<col>
 
783
</colgroup>
721
784
<tbody>
722
785
<tr>
723
786
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
730
793
</tr>
731
794
<tr>
732
795
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
733
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
796
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
734
797
</td>
735
798
</tr>
736
799
<tr>
737
800
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
738
801
<td>
739
 
<a href="./../glib/glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
740
 
Free the returned object with <a href="./../glib/glib/glib-Byte-Arrays.html#g-bytes-unref"><code class="function">g_bytes_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
802
<a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
803
Free the returned object with <a href="../glib/glib-Byte-Arrays.html#g-bytes-unref"><code class="function">g_bytes_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
741
804
</td>
742
805
</tr>
743
806
</tbody>
749
812
<a name="g-resources-open-stream"></a><h3>g_resources_open_stream ()</h3>
750
813
<pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> *      g_resources_open_stream             (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
751
814
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
752
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
815
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
753
816
<p>
754
817
Looks for a file at the specified <em class="parameter"><code>path</code></em> in the set of
755
818
globally registered resources and returns a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>
758
821
<p>
759
822
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
760
823
</p>
761
 
<div class="variablelist"><table border="0">
 
824
<div class="variablelist"><table border="0" class="variablelist">
 
825
<colgroup>
762
826
<col align="left" valign="top">
 
827
<col>
 
828
</colgroup>
763
829
<tbody>
764
830
<tr>
765
831
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
772
838
</tr>
773
839
<tr>
774
840
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
775
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
841
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
776
842
</td>
777
843
</tr>
778
844
<tr>
779
845
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
780
846
<td>
781
 
<a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
782
 
Free the returned object with <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
847
<a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
848
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
783
849
</td>
784
850
</tr>
785
851
</tbody>
791
857
<a name="g-resources-enumerate-children"></a><h3>g_resources_enumerate_children ()</h3>
792
858
<pre class="programlisting"><span class="returnvalue">char</span> **             g_resources_enumerate_children      (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
793
859
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
794
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
860
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
795
861
<p>
796
862
Returns all the names of children at the specified <em class="parameter"><code>path</code></em> in the set of
797
863
globally registered resources.
798
 
The return result is a <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of strings which should
799
 
be released with <a href="./../glib/glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.
 
864
The return result is a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of strings which should
 
865
be released with <a href="../glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.
800
866
</p>
801
867
<p>
802
868
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
803
869
</p>
804
 
<div class="variablelist"><table border="0">
 
870
<div class="variablelist"><table border="0" class="variablelist">
 
871
<colgroup>
805
872
<col align="left" valign="top">
 
873
<col>
 
874
</colgroup>
806
875
<tbody>
807
876
<tr>
808
877
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
815
884
</tr>
816
885
<tr>
817
886
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
818
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
887
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
819
888
</td>
820
889
</tr>
821
890
<tr>
830
899
<hr>
831
900
<div class="refsect2">
832
901
<a name="g-resources-get-info"></a><h3>g_resources_get_info ()</h3>
833
 
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_resources_get_info                (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
 
902
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_resources_get_info                (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
834
903
                                                         <em class="parameter"><code><a class="link" href="gio-GResource.html#GResourceLookupFlags" title="enum GResourceLookupFlags"><span class="type">GResourceLookupFlags</span></a> lookup_flags</code></em>,
835
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
836
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
837
 
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
904
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
 
905
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *flags</code></em>,
 
906
                                                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
838
907
<p>
839
908
Looks for a file at the specified <em class="parameter"><code>path</code></em> in the set of
840
909
globally registered resources and if found returns information about it.
842
911
<p>
843
912
<em class="parameter"><code>lookup_flags</code></em> controls the behaviour of the lookup.
844
913
</p>
845
 
<div class="variablelist"><table border="0">
 
914
<div class="variablelist"><table border="0" class="variablelist">
 
915
<colgroup>
846
916
<col align="left" valign="top">
 
917
<col>
 
918
</colgroup>
847
919
<tbody>
848
920
<tr>
849
921
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
857
929
<tr>
858
930
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
859
931
<td>a location to place the length of the contents of the file,
860
 
or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
 
932
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
861
933
</td>
862
934
</tr>
863
935
<tr>
864
936
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
865
937
<td>a location to place the flags about the file,
866
 
or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
 
938
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the length is not needed. <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>
867
939
</td>
868
940
</tr>
869
941
<tr>
870
942
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
871
 
<td>return location for a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
943
<td>return location for a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
872
944
</td>
873
945
</tr>
874
946
<tr>
875
947
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
876
948
<td>
877
 
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was found. <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were errors</td>
 
949
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was found. <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were errors</td>
878
950
</tr>
879
951
</tbody>
880
952
</table></div>
887
959
</pre>
888
960
<p>
889
961
Error domain for <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a>. Errors in this domain will be from the
890
 
<a class="link" href="gio-GResource.html#GResourceError" title="enum GResourceError"><span class="type">GResourceError</span></a> enumeration. See <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for more information on
 
962
<a class="link" href="gio-GResource.html#GResourceError" title="enum GResourceError"><span class="type">GResourceError</span></a> enumeration. See <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for more information on
891
963
error domains.
892
964
</p>
893
965
</div>
900
972
} GResourceError;
901
973
</pre>
902
974
<p>
903
 
An error code used with <a class="link" href="gio-GResource.html#G-RESOURCE-ERROR:CAPS" title="G_RESOURCE_ERROR"><code class="literal">G_RESOURCE_ERROR</code></a> in a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> returned
 
975
An error code used with <a class="link" href="gio-GResource.html#G-RESOURCE-ERROR:CAPS" title="G_RESOURCE_ERROR"><code class="literal">G_RESOURCE_ERROR</code></a> in a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> returned
904
976
from a <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> routine.
905
977
</p>
906
 
<div class="variablelist"><table border="0">
 
978
<div class="variablelist"><table border="0" class="variablelist">
 
979
<colgroup>
907
980
<col align="left" valign="top">
 
981
<col>
 
982
</colgroup>
908
983
<tbody>
909
984
<tr>
910
985
<td><p><a name="G-RESOURCE-ERROR-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_RESOURCE_ERROR_NOT_FOUND</code></span></p></td>
924
999
</div>
925
1000
<div class="footer">
926
1001
<hr>
927
 
          Generated by GTK-Doc V1.18</div>
 
1002
          Generated by GTK-Doc V1.18.1</div>
928
1003
</body>
929
1004
</html>
 
 
b'\\ No newline at end of file'