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.75.2">
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.14 (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" title=
"GLoadableIcon">
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" title=
"Synopsis">
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 <a class=
"link" href=
"GLoadableIcon.html#GLoadableIconIface" title=
"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=
"/usr/share/gtk-doc/html/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=
"/usr/share/gtk-doc/html/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=
"/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class=
"type">GError
</span></a> **error
</code></em>);
67 <div class=
"refsect1" title=
"Object Hierarchy">
68 <a name=
"GLoadableIcon.object-hierarchy"></a><h2>Object Hierarchy
</h2>
69 <pre class=
"synopsis">
74 <div class=
"refsect1" title=
"Prerequisites">
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=
"/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject
</a>.
</p>
80 <div class=
"refsect1" title=
"Known Implementations">
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" title=
"Description">
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" title=
"Details">
94 <a name=
"GLoadableIcon.details"></a><h2>Details
</h2>
95 <div class=
"refsect2" title=
"GLoadableIcon">
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" title=
"GLoadableIconIface">
105 <a name=
"GLoadableIconIface"></a><h3>GLoadableIconIface
</h3>
106 <pre class=
"programlisting">typedef struct {
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,
125 } GLoadableIconIface;
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=
"/usr/share/gtk-doc/html/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.
139 <td><p><span class=
"term"><em class=
"structfield"><code><a name=
"GLoadableIconIface.load"></a>load
</code></em> ()
</span></p></td>
144 <td><p><span class=
"term"><em class=
"structfield"><code><a name=
"GLoadableIconIface.load-async"></a>load_async
</code></em> ()
</span></p></td>
145 <td>Loads an icon asynchronously.
149 <td><p><span class=
"term"><em class=
"structfield"><code><a name=
"GLoadableIconIface.load-finish"></a>load_finish
</code></em> ()
</span></p></td>
150 <td>Finishes an asynchronous icon load.
157 <div class=
"refsect2" title=
"g_loadable_icon_load ()">
158 <a name=
"g-loadable-icon-load"></a><h3>g_loadable_icon_load ()
</h3>
159 <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>,
160 <em class=
"parameter"><code><span class=
"type">int
</span> size
</code></em>,
161 <em class=
"parameter"><code><span class=
"type">char
</span> **type
</code></em>,
162 <em class=
"parameter"><code><a class=
"link" href=
"GCancellable.html" title=
"GCancellable"><span class=
"type">GCancellable
</span></a> *cancellable
</code></em>,
163 <em class=
"parameter"><code><a href=
"/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class=
"type">GError
</span></a> **error
</code></em>);
</pre>
165 Loads a loadable icon. For the asynchronous version of this function,
166 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>.
168 <div class=
"variablelist"><table border=
"0">
169 <col align=
"left" valign=
"top">
172 <td><p><span class=
"term"><em class=
"parameter"><code>icon
</code></em> :
</span></p></td>
173 <td>a
<a class=
"link" href=
"GLoadableIcon.html" title=
"GLoadableIcon"><span class=
"type">GLoadableIcon
</span></a>.
177 <td><p><span class=
"term"><em class=
"parameter"><code>size
</code></em> :
</span></p></td>
182 <td><p><span class=
"term"><em class=
"parameter"><code>type
</code></em> :
</span></p></td>
183 <td>a location to store the type of the loaded icon,
<a href=
"/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class=
"literal">NULL
</code></a> to ignore.
187 <td><p><span class=
"term"><em class=
"parameter"><code>cancellable
</code></em> :
</span></p></td>
188 <td>optional
<a class=
"link" href=
"GCancellable.html" title=
"GCancellable"><span class=
"type">GCancellable
</span></a> object,
<a href=
"/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class=
"literal">NULL
</code></a> to ignore.
192 <td><p><span class=
"term"><em class=
"parameter"><code>error
</code></em> :
</span></p></td>
193 <td>a
<a href=
"/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class=
"type">GError
</span></a> location to store the error occuring, or
<a href=
"/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class=
"literal">NULL
</code></a> to
198 <td><p><span class=
"term"><span class=
"emphasis"><em>Returns
</em></span> :
</span></p></td>
199 <td> a
<a class=
"link" href=
"GInputStream.html" title=
"GInputStream"><span class=
"type">GInputStream
</span></a> to read the icon from.
206 <div class=
"refsect2" title=
"g_loadable_icon_load_async ()">
207 <a name=
"g-loadable-icon-load-async"></a><h3>g_loadable_icon_load_async ()
</h3>
208 <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>,
209 <em class=
"parameter"><code><span class=
"type">int
</span> size
</code></em>,
210 <em class=
"parameter"><code><a class=
"link" href=
"GCancellable.html" title=
"GCancellable"><span class=
"type">GCancellable
</span></a> *cancellable
</code></em>,
211 <em class=
"parameter"><code><a class=
"link" href=
"GAsyncResult.html#GAsyncReadyCallback" title=
"GAsyncReadyCallback ()"><span class=
"type">GAsyncReadyCallback
</span></a> callback
</code></em>,
212 <em class=
"parameter"><code><a href=
"/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class=
"type">gpointer
</span></a> user_data
</code></em>);
</pre>
214 Loads an icon asynchronously. To finish this function, see
215 <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
216 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>.
218 <div class=
"variablelist"><table border=
"0">
219 <col align=
"left" valign=
"top">
222 <td><p><span class=
"term"><em class=
"parameter"><code>icon
</code></em> :
</span></p></td>
223 <td>a
<a class=
"link" href=
"GLoadableIcon.html" title=
"GLoadableIcon"><span class=
"type">GLoadableIcon
</span></a>.
227 <td><p><span class=
"term"><em class=
"parameter"><code>size
</code></em> :
</span></p></td>
232 <td><p><span class=
"term"><em class=
"parameter"><code>cancellable
</code></em> :
</span></p></td>
233 <td>optional
<a class=
"link" href=
"GCancellable.html" title=
"GCancellable"><span class=
"type">GCancellable
</span></a> object,
<a href=
"/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class=
"literal">NULL
</code></a> to ignore.
237 <td><p><span class=
"term"><em class=
"parameter"><code>callback
</code></em> :
</span></p></td>
238 <td>a
<a class=
"link" href=
"GAsyncResult.html#GAsyncReadyCallback" title=
"GAsyncReadyCallback ()"><span class=
"type">GAsyncReadyCallback
</span></a> to call when the request is satisfied
242 <td><p><span class=
"term"><em class=
"parameter"><code>user_data
</code></em> :
</span></p></td>
243 <td>the data to pass to callback function
250 <div class=
"refsect2" title=
"g_loadable_icon_load_finish ()">
251 <a name=
"g-loadable-icon-load-finish"></a><h3>g_loadable_icon_load_finish ()
</h3>
252 <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>,
253 <em class=
"parameter"><code><a class=
"link" href=
"GAsyncResult.html" title=
"GAsyncResult"><span class=
"type">GAsyncResult
</span></a> *res
</code></em>,
254 <em class=
"parameter"><code><span class=
"type">char
</span> **type
</code></em>,
255 <em class=
"parameter"><code><a href=
"/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class=
"type">GError
</span></a> **error
</code></em>);
</pre>
257 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>.
259 <div class=
"variablelist"><table border=
"0">
260 <col align=
"left" valign=
"top">
263 <td><p><span class=
"term"><em class=
"parameter"><code>icon
</code></em> :
</span></p></td>
264 <td>a
<a class=
"link" href=
"GLoadableIcon.html" title=
"GLoadableIcon"><span class=
"type">GLoadableIcon
</span></a>.
268 <td><p><span class=
"term"><em class=
"parameter"><code>res
</code></em> :
</span></p></td>
269 <td>a
<a class=
"link" href=
"GAsyncResult.html" title=
"GAsyncResult"><span class=
"type">GAsyncResult
</span></a>.
273 <td><p><span class=
"term"><em class=
"parameter"><code>type
</code></em> :
</span></p></td>
274 <td>a location to store the type of the loaded icon,
<a href=
"/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class=
"literal">NULL
</code></a> to ignore.
278 <td><p><span class=
"term"><em class=
"parameter"><code>error
</code></em> :
</span></p></td>
279 <td>a
<a href=
"/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class=
"type">GError
</span></a> location to store the error occuring, or
<a href=
"/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class=
"literal">NULL
</code></a> to
284 <td><p><span class=
"term"><span class=
"emphasis"><em>Returns
</em></span> :
</span></p></td>
285 <td> a
<a class=
"link" href=
"GInputStream.html" title=
"GInputStream"><span class=
"type">GInputStream
</span></a> to read the icon from.
292 <div class=
"refsect1" title=
"See Also">
293 <a name=
"GLoadableIcon.see-also"></a><h2>See Also
</h2>
294 <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>
299 Generated by GTK-Doc V1.14
</div>