1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GLoadableIcon</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="icons.html" title="Icons">
9 <link rel="prev" href="GFileIcon.html" title="GFileIcon">
10 <link rel="next" href="GThemedIcon.html" title="GThemedIcon">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="GFileIcon.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="icons.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GIO Reference Manual</th>
21 <td><a accesskey="n" href="GThemedIcon.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GLoadableIcon.synopsis" class="shortcut">Top</a>
26 <a href="#GLoadableIcon.description" class="shortcut">Description</a>
28 <a href="#GLoadableIcon.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#GLoadableIcon.prerequisites" class="shortcut">Prerequisites</a>
32 <a href="#GLoadableIcon.implementations" class="shortcut">Known Implementations</a>
35 <div class="refentry">
36 <a name="GLoadableIcon"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
39 <h2><span class="refentrytitle"><a name="GLoadableIcon.top_of_page"></a>GLoadableIcon</span></h2>
40 <p>GLoadableIcon — Loadable Icons</p>
42 <td valign="top" align="right"></td>
44 <div class="refsynopsisdiv">
45 <a name="GLoadableIcon.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">
47 #include <gio/gio.h>
49 <a class="link" href="GLoadableIcon.html#GLoadableIcon-struct" title="GLoadableIcon">GLoadableIcon</a>;
50 struct <a class="link" href="GLoadableIcon.html#GLoadableIconIface" title="struct GLoadableIconIface">GLoadableIconIface</a>;
51 <a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> * <a class="link" href="GLoadableIcon.html#g-loadable-icon-load" title="g_loadable_icon_load ()">g_loadable_icon_load</a> (<em class="parameter"><code><a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a> *icon</code></em>,
52 <em class="parameter"><code><span class="type">int</span> size</code></em>,
53 <em class="parameter"><code><span class="type">char</span> **type</code></em>,
54 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</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>);
56 <span class="returnvalue">void</span> <a class="link" href="GLoadableIcon.html#g-loadable-icon-load-async" title="g_loadable_icon_load_async ()">g_loadable_icon_load_async</a> (<em class="parameter"><code><a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a> *icon</code></em>,
57 <em class="parameter"><code><span class="type">int</span> size</code></em>,
58 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
59 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
60 <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
61 <a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> * <a class="link" href="GLoadableIcon.html#g-loadable-icon-load-finish" title="g_loadable_icon_load_finish ()">g_loadable_icon_load_finish</a> (<em class="parameter"><code><a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a> *icon</code></em>,
62 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
63 <em class="parameter"><code><span class="type">char</span> **type</code></em>,
64 <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
67 <div class="refsect1">
68 <a name="GLoadableIcon.object-hierarchy"></a><h2>Object Hierarchy</h2>
69 <pre class="synopsis">
74 <div class="refsect1">
75 <a name="GLoadableIcon.prerequisites"></a><h2>Prerequisites</h2>
77 GLoadableIcon requires
78 <a class="link" href="GIcon.html" title="GIcon">GIcon</a> and <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
80 <div class="refsect1">
81 <a name="GLoadableIcon.implementations"></a><h2>Known Implementations</h2>
83 GLoadableIcon is implemented by
84 <a class="link" href="GFileIcon.html" title="GFileIcon">GFileIcon</a>.</p>
86 <div class="refsect1">
87 <a name="GLoadableIcon.description"></a><h2>Description</h2>
89 Extends the <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> interface and adds the ability to
90 load icons from streams.
93 <div class="refsect1">
94 <a name="GLoadableIcon.details"></a><h2>Details</h2>
95 <div class="refsect2">
96 <a name="GLoadableIcon-struct"></a><h3>GLoadableIcon</h3>
97 <pre class="programlisting">typedef struct _GLoadableIcon GLoadableIcon;</pre>
99 Generic type for all kinds of icons that can be loaded
104 <div class="refsect2">
105 <a name="GLoadableIconIface"></a><h3>struct GLoadableIconIface</h3>
106 <pre class="programlisting">struct GLoadableIconIface {
107 GTypeInterface g_iface;
111 GInputStream * (* load) (GLoadableIcon *icon,
114 GCancellable *cancellable,
116 void (* load_async) (GLoadableIcon *icon,
118 GCancellable *cancellable,
119 GAsyncReadyCallback callback,
121 GInputStream * (* load_finish) (GLoadableIcon *icon,
128 Interface for icons that can be loaded as a stream.
130 <div class="variablelist"><table border="0">
131 <col align="left" valign="top">
134 <td><p><span class="term"><a href="./../gobject/gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GLoadableIconIface.g-iface"></a>g_iface</code></em>;</span></p></td>
135 <td>The parent interface.</td>
138 <td><p><span class="term"><em class="structfield"><code><a name="GLoadableIconIface.load"></a>load</code></em> ()</span></p></td>
139 <td>Loads an icon.</td>
142 <td><p><span class="term"><em class="structfield"><code><a name="GLoadableIconIface.load-async"></a>load_async</code></em> ()</span></p></td>
143 <td>Loads an icon asynchronously.</td>
146 <td><p><span class="term"><em class="structfield"><code><a name="GLoadableIconIface.load-finish"></a>load_finish</code></em> ()</span></p></td>
147 <td>Finishes an asynchronous icon load.</td>
153 <div class="refsect2">
154 <a name="g-loadable-icon-load"></a><h3>g_loadable_icon_load ()</h3>
155 <pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> * g_loadable_icon_load (<em class="parameter"><code><a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a> *icon</code></em>,
156 <em class="parameter"><code><span class="type">int</span> size</code></em>,
157 <em class="parameter"><code><span class="type">char</span> **type</code></em>,
158 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
159 <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
161 Loads a loadable icon. For the asynchronous version of this function,
162 see <a class="link" href="GLoadableIcon.html#g-loadable-icon-load-async" title="g_loadable_icon_load_async ()"><code class="function">g_loadable_icon_load_async()</code></a>.
164 <div class="variablelist"><table border="0">
165 <col align="left" valign="top">
168 <td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
169 <td>a <a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>.</td>
172 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
176 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
177 <td>a location to store the type of the
178 loaded icon, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <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>
182 <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
183 <td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
187 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
188 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
192 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
193 <td>a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> to read the icon from. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
200 <div class="refsect2">
201 <a name="g-loadable-icon-load-async"></a><h3>g_loadable_icon_load_async ()</h3>
202 <pre class="programlisting"><span class="returnvalue">void</span> g_loadable_icon_load_async (<em class="parameter"><code><a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a> *icon</code></em>,
203 <em class="parameter"><code><span class="type">int</span> size</code></em>,
204 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
205 <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
206 <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
208 Loads an icon asynchronously. To finish this function, see
209 <a class="link" href="GLoadableIcon.html#g-loadable-icon-load-finish" title="g_loadable_icon_load_finish ()"><code class="function">g_loadable_icon_load_finish()</code></a>. For the synchronous, blocking
210 version of this function, see <a class="link" href="GLoadableIcon.html#g-loadable-icon-load" title="g_loadable_icon_load ()"><code class="function">g_loadable_icon_load()</code></a>.
212 <div class="variablelist"><table border="0">
213 <col align="left" valign="top">
216 <td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
217 <td>a <a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>.</td>
220 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
224 <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
225 <td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
229 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
230 <td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the
231 request is satisfied. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
235 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
236 <td>the data to pass to callback function. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
243 <div class="refsect2">
244 <a name="g-loadable-icon-load-finish"></a><h3>g_loadable_icon_load_finish ()</h3>
245 <pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> * g_loadable_icon_load_finish (<em class="parameter"><code><a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a> *icon</code></em>,
246 <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
247 <em class="parameter"><code><span class="type">char</span> **type</code></em>,
248 <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
250 Finishes an asynchronous icon load started in <a class="link" href="GLoadableIcon.html#g-loadable-icon-load-async" title="g_loadable_icon_load_async ()"><code class="function">g_loadable_icon_load_async()</code></a>.
252 <div class="variablelist"><table border="0">
253 <col align="left" valign="top">
256 <td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
257 <td>a <a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>.</td>
260 <td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td>
261 <td>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</td>
264 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
265 <td>a location to store the type of the loaded icon, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
268 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
269 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
273 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
274 <td>a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> to read the icon from. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
281 <div class="refsect1">
282 <a name="GLoadableIcon.see-also"></a><h2>See Also</h2>
283 <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>, <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>
288 Generated by GTK-Doc V1.18</div>