Tizen 2.1 base
[platform/upstream/glib2.0.git] / docs / reference / gio / html / GLoadableIcon.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>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">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
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>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GLoadableIcon.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GLoadableIcon.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GLoadableIcon.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GLoadableIcon.prerequisites" class="shortcut">Prerequisites</a>
31                    | 
32                   <a href="#GLoadableIcon.implementations" class="shortcut">Known Implementations</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GLoadableIcon"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GLoadableIcon.top_of_page"></a>GLoadableIcon</span></h2>
40 <p>GLoadableIcon — Loadable Icons</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="GLoadableIcon.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">
47 #include &lt;gio/gio.h&gt;
48
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>);
65 </pre>
66 </div>
67 <div class="refsect1">
68 <a name="GLoadableIcon.object-hierarchy"></a><h2>Object Hierarchy</h2>
69 <pre class="synopsis">
70   GInterface
71    +----GLoadableIcon
72 </pre>
73 </div>
74 <div class="refsect1">
75 <a name="GLoadableIcon.prerequisites"></a><h2>Prerequisites</h2>
76 <p>
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>
79 </div>
80 <div class="refsect1">
81 <a name="GLoadableIcon.implementations"></a><h2>Known Implementations</h2>
82 <p>
83 GLoadableIcon is implemented by
84  <a class="link" href="GFileIcon.html" title="GFileIcon">GFileIcon</a>.</p>
85 </div>
86 <div class="refsect1">
87 <a name="GLoadableIcon.description"></a><h2>Description</h2>
88 <p>
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.
91 </p>
92 </div>
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>
98 <p>
99 Generic type for all kinds of icons that can be loaded
100 as a stream.
101 </p>
102 </div>
103 <hr>
104 <div class="refsect2">
105 <a name="GLoadableIconIface"></a><h3>struct GLoadableIconIface</h3>
106 <pre class="programlisting">struct GLoadableIconIface {
107   GTypeInterface g_iface;
108
109   /* Virtual Table */
110
111   GInputStream * (* load)        (GLoadableIcon       *icon,
112                                   int                  size,
113                                   char               **type,
114                                   GCancellable        *cancellable,
115                                   GError             **error);
116   void           (* load_async)  (GLoadableIcon       *icon,
117                                   int                  size,
118                                   GCancellable        *cancellable,
119                                   GAsyncReadyCallback  callback,
120                                   gpointer             user_data);
121   GInputStream * (* load_finish) (GLoadableIcon       *icon,
122                                   GAsyncResult        *res,
123                                   char               **type,
124                                   GError             **error);
125 };
126 </pre>
127 <p>
128 Interface for icons that can be loaded as a stream.
129 </p>
130 <div class="variablelist"><table border="0">
131 <col align="left" valign="top">
132 <tbody>
133 <tr>
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>
136 </tr>
137 <tr>
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>
140 </tr>
141 <tr>
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>
144 </tr>
145 <tr>
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>
148 </tr>
149 </tbody>
150 </table></div>
151 </div>
152 <hr>
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>
160 <p>
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>.
163 </p>
164 <div class="variablelist"><table border="0">
165 <col align="left" valign="top">
166 <tbody>
167 <tr>
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>
170 </tr>
171 <tr>
172 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
173 <td>an integer.</td>
174 </tr>
175 <tr>
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>
179 </td>
180 </tr>
181 <tr>
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>
184 </td>
185 </tr>
186 <tr>
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
189 ignore.</td>
190 </tr>
191 <tr>
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>
194 </td>
195 </tr>
196 </tbody>
197 </table></div>
198 </div>
199 <hr>
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>
207 <p>
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>.
211 </p>
212 <div class="variablelist"><table border="0">
213 <col align="left" valign="top">
214 <tbody>
215 <tr>
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>
218 </tr>
219 <tr>
220 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
221 <td>an integer.</td>
222 </tr>
223 <tr>
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>
226 </td>
227 </tr>
228 <tr>
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>
232 </td>
233 </tr>
234 <tr>
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>
237 </td>
238 </tr>
239 </tbody>
240 </table></div>
241 </div>
242 <hr>
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>
249 <p>
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>.
251 </p>
252 <div class="variablelist"><table border="0">
253 <col align="left" valign="top">
254 <tbody>
255 <tr>
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>
258 </tr>
259 <tr>
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>
262 </tr>
263 <tr>
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>
266 </tr>
267 <tr>
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
270 ignore.</td>
271 </tr>
272 <tr>
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>
275 </td>
276 </tr>
277 </tbody>
278 </table></div>
279 </div>
280 </div>
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>
284 </div>
285 </div>
286 <div class="footer">
287 <hr>
288           Generated by GTK-Doc V1.18</div>
289 </body>
290 </html>