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

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/GIcon.html

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2014-03-24 20:58:34 UTC
  • mfrom: (1.66.13)
  • Revision ID: package-import@ubuntu.com-20140324205834-8hsgok8k36ftocqa
Tags: 2.40.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
<tbody>
46
46
<tr>
47
47
<td class="function_type">
48
 
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
48
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
49
49
</td>
50
50
<td class="function_name">
51
51
<a class="link" href="GIcon.html#g-icon-hash" title="g_icon_hash ()">g_icon_hash</a> <span class="c_punctuation">()</span>
53
53
</tr>
54
54
<tr>
55
55
<td class="function_type">
56
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
57
57
</td>
58
58
<td class="function_name">
59
59
<a class="link" href="GIcon.html#g-icon-equal" title="g_icon_equal ()">g_icon_equal</a> <span class="c_punctuation">()</span>
61
61
</tr>
62
62
<tr>
63
63
<td class="function_type">
64
 
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
64
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
65
65
</td>
66
66
<td class="function_name">
67
67
<a class="link" href="GIcon.html#g-icon-to-string" title="g_icon_to_string ()">g_icon_to_string</a> <span class="c_punctuation">()</span>
77
77
</tr>
78
78
<tr>
79
79
<td class="function_type">
80
 
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
 
80
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
81
81
</td>
82
82
<td class="function_name">
83
83
<a class="link" href="GIcon.html#g-icon-serialize" title="g_icon_serialize ()">g_icon_serialize</a> <span class="c_punctuation">()</span>
115
115
</div>
116
116
<div class="refsect1">
117
117
<a name="GIcon.object-hierarchy"></a><h2>Object Hierarchy</h2>
118
 
<pre class="screen">    <a href="/home/desrt/.cache/jhbuild/install/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
 
118
<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html">GInterface</a>
119
119
    <span class="lineart">╰──</span> GIcon
120
120
</pre>
121
121
</div>
123
123
<a name="GIcon.prerequisites"></a><h2>Prerequisites</h2>
124
124
<p>
125
125
GIcon requires
126
 
 <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
 
126
 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
127
127
</div>
128
128
<div class="refsect1">
129
129
<a name="GIcon.derived-interfaces"></a><h2>Known Derived Interfaces</h2>
157
157
<p>If you want to consume <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> (for example, in a toolkit) you must
158
158
be prepared to handle at least the three following cases:
159
159
<a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>, <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> and <a class="link" href="GEmblemedIcon.html" title="GEmblemedIcon"><span class="type">GEmblemedIcon</span></a>.  It may also make
160
 
sense to have fast-paths for other cases (like handling <span class="type">GdkPixbuf</span>
 
160
sense to have fast-paths for other cases (like handling <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
161
161
directly, for example) but all compliant <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> implementations
162
162
outside of GIO must implement <a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>.</p>
163
163
<p>If your application or library provides one or more <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>
171
171
<a name="GIcon.functions_details"></a><h2>Functions</h2>
172
172
<div class="refsect2">
173
173
<a name="g-icon-hash"></a><h3>g_icon_hash ()</h3>
174
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
175
 
g_icon_hash (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> icon</code></em>);</pre>
 
174
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
175
g_icon_hash (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> icon</code></em>);</pre>
176
176
<p>Gets a hash for an icon.</p>
177
177
<p>Virtual: hash</p>
178
178
<div class="refsect3">
185
185
</colgroup>
186
186
<tbody><tr>
187
187
<td class="parameter_name"><p>icon</p></td>
188
 
<td class="parameter_description"><p><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> to an icon object.</p></td>
 
188
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> to an icon object.</p></td>
189
189
<td class="parameter_annotations"> </td>
190
190
</tr></tbody>
191
191
</table></div>
192
192
</div>
193
193
<div class="refsect3">
194
194
<a name="id-1.4.10.2.11.2.7"></a><h4>Returns</h4>
195
 
<p> a <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> containing a hash for the <em class="parameter"><code>icon</code></em>
 
195
<p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> containing a hash for the <em class="parameter"><code>icon</code></em>
196
196
, suitable for
197
 
use in a <a href="../glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> or similar data structure.</p>
 
197
use in a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> or similar data structure.</p>
198
198
<p></p>
199
199
</div>
200
200
</div>
201
201
<hr>
202
202
<div class="refsect2">
203
203
<a name="g-icon-equal"></a><h3>g_icon_equal ()</h3>
204
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
204
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
205
205
g_icon_equal (<em class="parameter"><code><a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> *icon1</code></em>,
206
206
              <em class="parameter"><code><a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> *icon2</code></em>);</pre>
207
207
<p>Checks if two icons are equal.</p>
229
229
</div>
230
230
<div class="refsect3">
231
231
<a name="id-1.4.10.2.11.3.6"></a><h4>Returns</h4>
232
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>icon1</code></em>
 
232
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>icon1</code></em>
233
233
is equal to <em class="parameter"><code>icon2</code></em>
234
 
. <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
 
234
. <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
235
235
<p></p>
236
236
</div>
237
237
</div>
238
238
<hr>
239
239
<div class="refsect2">
240
240
<a name="g-icon-to-string"></a><h3>g_icon_to_string ()</h3>
241
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
241
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
242
242
g_icon_to_string (<em class="parameter"><code><a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> *icon</code></em>);</pre>
243
243
<p>Generates a textual representation of <em class="parameter"><code>icon</code></em>
244
244
 that can be used for
279
279
</div>
280
280
<div class="refsect3">
281
281
<a name="id-1.4.10.2.11.4.9"></a><h4>Returns</h4>
282
 
<p> An allocated NUL-terminated UTF8 string or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>icon</code></em>
 
282
<p> An allocated NUL-terminated UTF8 string or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>icon</code></em>
283
283
can't
284
 
be serialized. Use <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> to free.</p>
 
284
be serialized. Use <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> to free.</p>
285
285
<p></p>
286
286
</div>
287
287
<p class="since">Since 2.20</p>
290
290
<div class="refsect2">
291
291
<a name="g-icon-new-for-string"></a><h3>g_icon_new_for_string ()</h3>
292
292
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *
293
 
g_icon_new_for_string (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
294
 
                       <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
293
g_icon_new_for_string (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
 
294
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
295
295
<p>Generate a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> instance from <em class="parameter"><code>str</code></em>
296
296
. This function can fail if
297
297
<em class="parameter"><code>str</code></em>
298
298
 is not valid - see <a class="link" href="GIcon.html#g-icon-to-string" title="g_icon_to_string ()"><code class="function">g_icon_to_string()</code></a> for discussion.</p>
299
299
<p>If your application or library provides one or more <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>
300
 
implementations you need to ensure that each <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> is registered
 
300
implementations you need to ensure that each <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> is registered
301
301
with the type system prior to calling <a class="link" href="GIcon.html#g-icon-new-for-string" title="g_icon_new_for_string ()"><code class="function">g_icon_new_for_string()</code></a>.</p>
302
302
<div class="refsect3">
303
303
<a name="id-1.4.10.2.11.5.6"></a><h4>Parameters</h4>
324
324
<div class="refsect3">
325
325
<a name="id-1.4.10.2.11.5.7"></a><h4>Returns</h4>
326
326
<p> An object implementing the <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>
327
 
interface or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
 
327
interface or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
328
328
is set. </p>
329
329
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
330
330
</div>
333
333
<hr>
334
334
<div class="refsect2">
335
335
<a name="g-icon-serialize"></a><h3>g_icon_serialize ()</h3>
336
 
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
 
336
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
337
337
g_icon_serialize (<em class="parameter"><code><a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> *icon</code></em>);</pre>
338
 
<p>Serializes a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> into a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>. An equivalent <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> can be retrieved
 
338
<p>Serializes a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>. An equivalent <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> can be retrieved
339
339
back by calling <a class="link" href="GIcon.html#g-icon-deserialize" title="g_icon_deserialize ()"><code class="function">g_icon_deserialize()</code></a> on the returned value.
340
340
As serialization will avoid using raw icon data when possible, it only
341
 
makes sense to transfer the <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> between processes on the same machine,
 
341
makes sense to transfer the <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> between processes on the same machine,
342
342
(as opposed to over the network), and within the same file system namespace.</p>
343
343
<div class="refsect3">
344
344
<a name="id-1.4.10.2.11.6.5"></a><h4>Parameters</h4>
357
357
</div>
358
358
<div class="refsect3">
359
359
<a name="id-1.4.10.2.11.6.6"></a><h4>Returns</h4>
360
 
<p> a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when serialization fails. </p>
 
360
<p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when serialization fails. </p>
361
361
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
362
362
</div>
363
363
<p class="since">Since 2.38</p>
366
366
<div class="refsect2">
367
367
<a name="g-icon-deserialize"></a><h3>g_icon_deserialize ()</h3>
368
368
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *
369
 
g_icon_deserialize (<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
 
369
g_icon_deserialize (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
370
370
<p>Deserializes a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> previously serialized using <a class="link" href="GIcon.html#g-icon-serialize" title="g_icon_serialize ()"><code class="function">g_icon_serialize()</code></a>.</p>
371
371
<div class="refsect3">
372
372
<a name="id-1.4.10.2.11.7.5"></a><h4>Parameters</h4>
378
378
</colgroup>
379
379
<tbody><tr>
380
380
<td class="parameter_name"><p>value</p></td>
381
 
<td class="parameter_description"><p>a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> created with <a class="link" href="GIcon.html#g-icon-serialize" title="g_icon_serialize ()"><code class="function">g_icon_serialize()</code></a></p></td>
 
381
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> created with <a class="link" href="GIcon.html#g-icon-serialize" title="g_icon_serialize ()"><code class="function">g_icon_serialize()</code></a></p></td>
382
382
<td class="parameter_annotations"> </td>
383
383
</tr></tbody>
384
384
</table></div>
385
385
</div>
386
386
<div class="refsect3">
387
387
<a name="id-1.4.10.2.11.7.6"></a><h4>Returns</h4>
388
 
<p> a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when deserialization fails. </p>
 
388
<p> a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when deserialization fails. </p>
389
389
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
390
390
</div>
391
391
<p class="since">Since 2.38</p>
433
433
</colgroup>
434
434
<tbody>
435
435
<tr>
436
 
<td class="struct_member_name"><p><a href="../gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GIconIface.g-iface"></a>g_iface</code></em>;</p></td>
 
436
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GIconIface.g-iface"></a>g_iface</code></em>;</p></td>
437
437
<td class="struct_member_description"><p>The parent interface.</p></td>
438
438
<td class="struct_member_annotations"> </td>
439
439
</tr>
456
456
</tr>
457
457
<tr>
458
458
<td class="struct_member_name"><p><em class="structfield"><code><a name="GIconIface.from-tokens"></a>from_tokens</code></em> ()</p></td>
459
 
<td class="struct_member_description"><p>Constructs a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> from tokens. Set the <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> if
 
459
<td class="struct_member_description"><p>Constructs a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> from tokens. Set the <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> if
460
460
the tokens are malformed. Don't implement if the <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> can't be
461
461
serialized (Since 2.20).</p></td>
462
462
<td class="struct_member_annotations"> </td>