34
31
<h2><span class="refentrytitle"><a name="GdkPixbufLoader.top_of_page"></a>GdkPixbufLoader</span></h2>
35
32
<p>GdkPixbufLoader — Application-driven progressive image loading.</p>
37
<td valign="top" align="right"></td>
34
<td class="gallery_image" valign="top" align="right"></td>
38
35
</tr></table></div>
39
<div class="refsynopsisdiv">
40
<a name="GdkPixbufLoader.synopsis"></a><h2>Synopsis</h2>
41
<pre class="synopsis">
42
#include <gdk-pixbuf/gdk-pixbuf.h>
44
struct <a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-struct" title="struct GdkPixbufLoader">GdkPixbufLoader</a>;
45
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> * <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-new" title="gdk_pixbuf_loader_new ()">gdk_pixbuf_loader_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
46
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> * <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-new-with-type" title="gdk_pixbuf_loader_new_with_type ()">gdk_pixbuf_loader_new_with_type</a> (<em class="parameter"><code>const <span class="type">char</span> *image_type</code></em>,
47
<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>);
48
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> * <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-new-with-mime-type" title="gdk_pixbuf_loader_new_with_mime_type ()">gdk_pixbuf_loader_new_with_mime_type</a>
49
(<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
50
<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>);
51
<a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="returnvalue">GdkPixbufFormat</span></a> * <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-format" title="gdk_pixbuf_loader_get_format ()">gdk_pixbuf_loader_get_format</a> (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);
52
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()">gdk_pixbuf_loader_write</a> (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
53
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
54
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> count</code></em>,
55
<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>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write-bytes" title="gdk_pixbuf_loader_write_bytes ()">gdk_pixbuf_loader_write_bytes</a> (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
57
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *buffer</code></em>,
58
<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>);
59
<span class="returnvalue">void</span> <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()">gdk_pixbuf_loader_set_size</a> (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
60
<em class="parameter"><code><span class="type">int</span> width</code></em>,
61
<em class="parameter"><code><span class="type">int</span> height</code></em>);
62
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()">gdk_pixbuf_loader_get_pixbuf</a> (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);
63
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> * <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-animation" title="gdk_pixbuf_loader_get_animation ()">gdk_pixbuf_loader_get_animation</a> (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);
64
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-close" title="gdk_pixbuf_loader_close ()">gdk_pixbuf_loader_close</a> (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
65
<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>);
36
<div class="refsect1">
37
<a name="GdkPixbufLoader.functions"></a><h2>Functions</h2>
38
<div class="informaltable"><table width="100%" border="0">
40
<col width="150px" class="functions_return">
41
<col class="functions_name">
45
<td class="function_type">
46
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> *
48
<td class="function_name">
49
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-new" title="gdk_pixbuf_loader_new ()">gdk_pixbuf_loader_new</a> <span class="c_punctuation">()</span>
53
<td class="function_type">
54
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> *
56
<td class="function_name">
57
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-new-with-type" title="gdk_pixbuf_loader_new_with_type ()">gdk_pixbuf_loader_new_with_type</a> <span class="c_punctuation">()</span>
61
<td class="function_type">
62
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> *
64
<td class="function_name">
65
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-new-with-mime-type" title="gdk_pixbuf_loader_new_with_mime_type ()">gdk_pixbuf_loader_new_with_mime_type</a> <span class="c_punctuation">()</span>
69
<td class="function_type">
70
<a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="returnvalue">GdkPixbufFormat</span></a> *
72
<td class="function_name">
73
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-format" title="gdk_pixbuf_loader_get_format ()">gdk_pixbuf_loader_get_format</a> <span class="c_punctuation">()</span>
77
<td class="function_type">
78
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
80
<td class="function_name">
81
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()">gdk_pixbuf_loader_write</a> <span class="c_punctuation">()</span>
85
<td class="function_type">
86
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
88
<td class="function_name">
89
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write-bytes" title="gdk_pixbuf_loader_write_bytes ()">gdk_pixbuf_loader_write_bytes</a> <span class="c_punctuation">()</span>
93
<td class="function_type">
94
<span class="returnvalue">void</span>
96
<td class="function_name">
97
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()">gdk_pixbuf_loader_set_size</a> <span class="c_punctuation">()</span>
101
<td class="function_type">
102
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
104
<td class="function_name">
105
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()">gdk_pixbuf_loader_get_pixbuf</a> <span class="c_punctuation">()</span>
109
<td class="function_type">
110
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
112
<td class="function_name">
113
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-animation" title="gdk_pixbuf_loader_get_animation ()">gdk_pixbuf_loader_get_animation</a> <span class="c_punctuation">()</span>
117
<td class="function_type">
118
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
120
<td class="function_name">
121
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-close" title="gdk_pixbuf_loader_close ()">gdk_pixbuf_loader_close</a> <span class="c_punctuation">()</span>
127
<div class="refsect1">
128
<a name="GdkPixbufLoader.signals"></a><h2>Signals</h2>
129
<div class="informaltable"><table border="0">
131
<col width="150px" class="signals_return">
132
<col width="300px" class="signals_name">
133
<col width="200px" class="signals_flags">
137
<td class="signal_type"><span class="returnvalue">void</span></td>
138
<td class="signal_name"><a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-prepared" title="The “area-prepared” signal">area-prepared</a></td>
139
<td class="signal_flags"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
142
<td class="signal_type"><span class="returnvalue">void</span></td>
143
<td class="signal_name"><a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-updated" title="The “area-updated” signal">area-updated</a></td>
144
<td class="signal_flags"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
147
<td class="signal_type"><span class="returnvalue">void</span></td>
148
<td class="signal_name"><a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-closed" title="The “closed” signal">closed</a></td>
149
<td class="signal_flags"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
152
<td class="signal_type"><span class="returnvalue">void</span></td>
153
<td class="signal_name"><a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-size-prepared" title="The “size-prepared” signal">size-prepared</a></td>
154
<td class="signal_flags"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
159
<div class="refsect1">
160
<a name="GdkPixbufLoader.other"></a><h2>Types and Values</h2>
161
<div class="informaltable"><table width="100%" border="0">
163
<col width="150px" class="name">
164
<col class="description">
167
<td class="datatype_keyword">struct</td>
168
<td class="function_name"><a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-struct" title="struct GdkPixbufLoader">GdkPixbufLoader</a></td>
68
172
<div class="refsect1">
69
173
<a name="GdkPixbufLoader.object-hierarchy"></a><h2>Object Hierarchy</h2>
70
<pre class="synopsis">
71
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
174
<pre class="screen"> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
175
<span class="lineart">╰──</span> GdkPixbufLoader
75
178
<div class="refsect1">
76
<a name="GdkPixbufLoader.signals"></a><h2>Signals</h2>
77
<pre class="synopsis">
78
"<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-prepared" title='The "area-prepared" signal'>area-prepared</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
79
"<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-updated" title='The "area-updated" signal'>area-updated</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
80
"<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-closed" title='The "closed" signal'>closed</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
81
"<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-size-prepared" title='The "size-prepared" signal'>size-prepared</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
179
<a name="GdkPixbufLoader.includes"></a><h2>Includes</h2>
180
<pre class="synopsis">#include <gdk-pixbuf/gdk-pixbuf.h>
84
183
<div class="refsect1">
85
184
<a name="GdkPixbufLoader.description"></a><h2>Description</h2>
87
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> provides a way for applications to drive the
185
<p><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> provides a way for applications to drive the
88
186
process of loading an image, by letting them send the image data
89
187
directly to the loader instead of having the loader read the data
90
188
from a file. Applications can use this functionality instead of
91
<a class="link" href="gdk-pixbuf-File-Loading.html#gdk-pixbuf-new-from-file" title="gdk_pixbuf_new_from_file ()"><code class="function">gdk_pixbuf_new_from_file()</code></a> or <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-file" title="gdk_pixbuf_animation_new_from_file ()"><code class="function">gdk_pixbuf_animation_new_from_file()</code></a>
189
<a class="link" href="gdk-pixbuf-File-Loading.html#gdk-pixbuf-new-from-file" title="gdk_pixbuf_new_from_file ()"><code class="function">gdk_pixbuf_new_from_file()</code></a> or <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-file" title="gdk_pixbuf_animation_new_from_file ()"><code class="function">gdk_pixbuf_animation_new_from_file()</code></a>
92
190
when they need to parse image data in
93
191
small chunks. For example, it should be used when reading an
94
192
image from a (potentially) slow network connection, or when
95
193
loading an extremely large file.</p>
97
To use <a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> to load an image, just create a new one,
98
and call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a> to send the data to it. When
99
done, <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-close" title="gdk_pixbuf_loader_close ()"><code class="function">gdk_pixbuf_loader_close()</code></a> should be called to end the stream
100
and finalize everything. The loader will emit three important
101
signals throughout the process. The first, "<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-size-prepared" title='The "size-prepared" signal'>size_prepared</a>",
102
will be called as soon as the image has enough information to
194
<p>To use <a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> to load an image, just create a new one, and
195
call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a> to send the data to it. When done,
196
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-close" title="gdk_pixbuf_loader_close ()"><code class="function">gdk_pixbuf_loader_close()</code></a> should be called to end the stream and
197
finalize everything. The loader will emit three important signals
198
throughout the process. The first, <a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-size-prepared" title="The “size-prepared” signal"><span class="type">“size-prepared”</span></a>,
199
will be emitted as soon as the image has enough information to
103
200
determine the size of the image to be used. If you want to scale
104
the image while loading it, you can call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()"><code class="function">gdk_pixbuf_loader_set_size()</code></a>
201
the image while loading it, you can call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()"><code class="function">gdk_pixbuf_loader_set_size()</code></a>
105
202
in response to this signal.</p>
107
The second signal, "<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-prepared" title='The "area-prepared" signal'>area_prepared</a>",
108
will be called as soon as the pixbuf of the desired has been
109
allocated. You can obtain it by calling <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()"><code class="function">gdk_pixbuf_loader_get_pixbuf()</code></a>.
110
If you want to use it, simply ref it.
111
In addition, no actual information will be passed in yet, so the
112
pixbuf can be safely filled with any temporary graphics (or an
113
initial color) as needed. You can also call
114
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()"><code class="function">gdk_pixbuf_loader_get_pixbuf()</code></a> later and get the same pixbuf.</p>
116
The last signal, "<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-updated" title='The "area-updated" signal'>area_updated</a>" gets
117
called every time a region is updated. This way you can update a
118
partially completed image. Note that you do not know anything
119
about the completeness of an image from the area updated. For
120
example, in an interlaced image, you need to make several passes
121
before the image is done loading.</p>
203
<p>The second signal, <a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-prepared" title="The “area-prepared” signal"><span class="type">“area-prepared”</span></a>, will be emitted as
204
soon as the pixbuf of the desired has been allocated. You can obtain it
205
by calling <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()"><code class="function">gdk_pixbuf_loader_get_pixbuf()</code></a>. If you want to use it, simply
206
ref it. In addition, no actual information will be passed in yet, so the
207
pixbuf can be safely filled with any temporary graphics (or an initial
208
color) as needed. You can also call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()"><code class="function">gdk_pixbuf_loader_get_pixbuf()</code></a> later
209
and get the same pixbuf.</p>
210
<p>The last signal, <a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-updated" title="The “area-updated” signal"><span class="type">“area-updated”</span></a>, gets emitted every time
211
a region is updated. This way you can update a partially completed image.
212
Note that you do not know anything about the completeness of an image
213
from the updated area. For example, in an interlaced image, you need to
214
make several passes before the image is done loading.</p>
124
215
<div class="refsect2">
125
<a name="id-1.2.15.6.6.1"></a><h3>Loading an animation</h3>
127
Loading an animation is almost as easy as loading an
128
image. Once the first "<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-prepared" title='The "area-prepared" signal'>area_prepared</a>" signal
129
has been emitted, you can call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-animation" title="gdk_pixbuf_loader_get_animation ()"><code class="function">gdk_pixbuf_loader_get_animation()</code></a>
130
to get the <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> struct and <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-iter" title="gdk_pixbuf_animation_get_iter ()"><code class="function">gdk_pixbuf_animation_get_iter()</code></a>
131
to get an <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> for displaying it.
216
<a name="id-1.2.15.8.6"></a><h3>Loading an animation</h3>
217
<p>Loading an animation is almost as easy as loading an image. Once the first
218
<a class="link" href="GdkPixbufLoader.html#GdkPixbufLoader-area-prepared" title="The “area-prepared” signal"><span class="type">“area-prepared”</span></a> signal has been emitted, you can call
219
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-animation" title="gdk_pixbuf_loader_get_animation ()"><code class="function">gdk_pixbuf_loader_get_animation()</code></a> to get the <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> struct
220
and <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-iter" title="gdk_pixbuf_animation_get_iter ()"><code class="function">gdk_pixbuf_animation_get_iter()</code></a> to get a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> for
135
224
<div class="refsect1">
136
<a name="GdkPixbufLoader.details"></a><h2>Details</h2>
137
<div class="refsect2">
138
<a name="GdkPixbufLoader-struct"></a><h3>struct GdkPixbufLoader</h3>
139
<pre class="programlisting">struct GdkPixbufLoader;</pre>
141
The <span class="structname">GdkPixbufLoader</span> struct contains only private
145
<div class="refsect2">
146
<a name="gdk-pixbuf-loader-new"></a><h3>gdk_pixbuf_loader_new ()</h3>
147
<pre class="programlisting"><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> * gdk_pixbuf_loader_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
149
Creates a new pixbuf loader object.</p>
150
<div class="variablelist"><table border="0" class="variablelist">
152
<col align="left" valign="top">
156
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
157
<td>A newly-created pixbuf loader.</td>
162
<div class="refsect2">
163
<a name="gdk-pixbuf-loader-new-with-type"></a><h3>gdk_pixbuf_loader_new_with_type ()</h3>
164
<pre class="programlisting"><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> * gdk_pixbuf_loader_new_with_type (<em class="parameter"><code>const <span class="type">char</span> *image_type</code></em>,
165
<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>
167
Creates a new pixbuf loader object that always attempts to parse
168
image data as if it were an image of type <em class="parameter"><code>image_type</code></em>, instead of
225
<a name="GdkPixbufLoader.functions_details"></a><h2>Functions</h2>
226
<div class="refsect2">
227
<a name="gdk-pixbuf-loader-new"></a><h3>gdk_pixbuf_loader_new ()</h3>
228
<pre class="programlisting"><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> *
229
gdk_pixbuf_loader_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
230
<p>Creates a new pixbuf loader object.</p>
231
<div class="refsect3">
232
<a name="id-1.2.15.9.2.5"></a><h4>Returns</h4>
233
<p> A newly-created pixbuf loader.</p>
238
<div class="refsect2">
239
<a name="gdk-pixbuf-loader-new-with-type"></a><h3>gdk_pixbuf_loader_new_with_type ()</h3>
240
<pre class="programlisting"><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> *
241
gdk_pixbuf_loader_new_with_type (<em class="parameter"><code>const <span class="type">char</span> *image_type</code></em>,
242
<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>
243
<p>Creates a new pixbuf loader object that always attempts to parse
244
image data as if it were an image of type <em class="parameter"><code>image_type</code></em>
169
246
identifying the type automatically. Useful if you want an error if
170
247
the image isn't the expected type, for loading image formats
171
248
that can't be reliably identified by looking at the data, or if
172
249
the user manually forces a specific type.</p>
174
The list of supported image formats depends on what image loaders
250
<p>The list of supported image formats depends on what image loaders
175
251
are installed, but typically "png", "jpeg", "gif", "tiff" and
176
252
"xpm" are among the supported formats. To obtain the full list of
177
supported image formats, call <a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-format-get-name" title="gdk_pixbuf_format_get_name ()"><code class="function">gdk_pixbuf_format_get_name()</code></a> on each
178
of the <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a> structs returned by <a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-get-formats" title="gdk_pixbuf_get_formats ()"><code class="function">gdk_pixbuf_get_formats()</code></a>.</p>
179
<div class="variablelist"><table border="0" class="variablelist">
253
supported image formats, call <a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-format-get-name" title="gdk_pixbuf_format_get_name ()"><code class="function">gdk_pixbuf_format_get_name()</code></a> on each
254
of the <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a> structs returned by <a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-get-formats" title="gdk_pixbuf_get_formats ()"><code class="function">gdk_pixbuf_get_formats()</code></a>.</p>
255
<div class="refsect3">
256
<a name="id-1.2.15.9.3.6"></a><h4>Parameters</h4>
257
<div class="informaltable"><table width="100%" border="0">
181
<col align="left" valign="top">
259
<col width="150px" class="parameters_name">
260
<col class="parameters_description">
261
<col width="200px" class="parameters_annotations">
186
<td><p><span class="term"><em class="parameter"><code>image_type</code></em> :</span></p></td>
187
<td>name of the image format to be loaded with the image</td>
190
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
191
<td>return location for an allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
195
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
196
<td>A newly-created pixbuf loader.</td>
265
<td class="parameter_name"><p>image_type</p></td>
266
<td class="parameter_description"><p>name of the image format to be loaded with the image</p></td>
267
<td class="parameter_annotations"> </td>
270
<td class="parameter_name"><p>error</p></td>
271
<td class="parameter_description"><p> return location for an allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors. </p></td>
272
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
277
<div class="refsect3">
278
<a name="id-1.2.15.9.3.7"></a><h4>Returns</h4>
279
<p> A newly-created pixbuf loader.</p>
202
284
<div class="refsect2">
203
<a name="gdk-pixbuf-loader-new-with-mime-type"></a><h3>gdk_pixbuf_loader_new_with_mime_type ()</h3>
204
<pre class="programlisting"><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> * gdk_pixbuf_loader_new_with_mime_type
205
(<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
206
<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>
208
Creates a new pixbuf loader object that always attempts to parse
209
image data as if it were an image of mime type <em class="parameter"><code>mime_type</code></em>, instead of
285
<a name="gdk-pixbuf-loader-new-with-mime-type"></a><h3>gdk_pixbuf_loader_new_with_mime_type ()</h3>
286
<pre class="programlisting"><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="returnvalue">GdkPixbufLoader</span></a> *
287
gdk_pixbuf_loader_new_with_mime_type (<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
288
<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>
289
<p>Creates a new pixbuf loader object that always attempts to parse
290
image data as if it were an image of mime type <em class="parameter"><code>mime_type</code></em>
210
292
identifying the type automatically. Useful if you want an error if
211
293
the image isn't the expected mime type, for loading image formats
212
294
that can't be reliably identified by looking at the data, or if
213
295
the user manually forces a specific mime type.</p>
215
The list of supported mime types depends on what image loaders
296
<p>The list of supported mime types depends on what image loaders
216
297
are installed, but typically "image/png", "image/jpeg", "image/gif",
217
298
"image/tiff" and "image/x-xpixmap" are among the supported mime types.
218
299
To obtain the full list of supported mime types, call
219
<a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-format-get-mime-types" title="gdk_pixbuf_format_get_mime_types ()"><code class="function">gdk_pixbuf_format_get_mime_types()</code></a> on each of the <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a>
220
structs returned by <a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-get-formats" title="gdk_pixbuf_get_formats ()"><code class="function">gdk_pixbuf_get_formats()</code></a>.</p>
221
<div class="variablelist"><table border="0" class="variablelist">
300
<a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-format-get-mime-types" title="gdk_pixbuf_format_get_mime_types ()"><code class="function">gdk_pixbuf_format_get_mime_types()</code></a> on each of the <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a>
301
structs returned by <a class="link" href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-get-formats" title="gdk_pixbuf_get_formats ()"><code class="function">gdk_pixbuf_get_formats()</code></a>.</p>
302
<div class="refsect3">
303
<a name="id-1.2.15.9.4.6"></a><h4>Parameters</h4>
304
<div class="informaltable"><table width="100%" border="0">
223
<col align="left" valign="top">
306
<col width="150px" class="parameters_name">
307
<col class="parameters_description">
308
<col width="200px" class="parameters_annotations">
228
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
229
<td>the mime type to be loaded</td>
232
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
233
<td>return location for an allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
237
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
238
<td>A newly-created pixbuf loader.</td>
312
<td class="parameter_name"><p>mime_type</p></td>
313
<td class="parameter_description"><p>the mime type to be loaded </p></td>
314
<td class="parameter_annotations"> </td>
317
<td class="parameter_name"><p>error</p></td>
318
<td class="parameter_description"><p> return location for an allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors. </p></td>
319
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
324
<div class="refsect3">
325
<a name="id-1.2.15.9.4.7"></a><h4>Returns</h4>
326
<p> A newly-created pixbuf loader.</p>
242
329
<p class="since">Since 2.4</p>
245
332
<div class="refsect2">
246
<a name="gdk-pixbuf-loader-get-format"></a><h3>gdk_pixbuf_loader_get_format ()</h3>
247
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="returnvalue">GdkPixbufFormat</span></a> * gdk_pixbuf_loader_get_format (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);</pre>
249
Obtains the available information about the format of the
333
<a name="gdk-pixbuf-loader-get-format"></a><h3>gdk_pixbuf_loader_get_format ()</h3>
334
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="returnvalue">GdkPixbufFormat</span></a> *
335
gdk_pixbuf_loader_get_format (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);</pre>
336
<p>Obtains the available information about the format of the
250
337
currently loading image file.</p>
251
<div class="variablelist"><table border="0" class="variablelist">
338
<div class="refsect3">
339
<a name="id-1.2.15.9.5.5"></a><h4>Parameters</h4>
340
<div class="informaltable"><table width="100%" border="0">
253
<col align="left" valign="top">
342
<col width="150px" class="parameters_name">
343
<col class="parameters_description">
344
<col width="200px" class="parameters_annotations">
258
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
259
<td>A pixbuf loader.</td>
262
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
263
<td>A <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The return
264
value is owned by GdkPixbuf and should not be freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
347
<td class="parameter_name"><p>loader</p></td>
348
<td class="parameter_description"><p>A pixbuf loader.</p></td>
349
<td class="parameter_annotations"> </td>
353
<div class="refsect3">
354
<a name="id-1.2.15.9.5.6"></a><h4>Returns</h4>
355
<p> A <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The return
356
value is owned by GdkPixbuf and should not be freed. </p>
357
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
269
359
<p class="since">Since 2.2</p>
272
362
<div class="refsect2">
273
<a name="gdk-pixbuf-loader-write"></a><h3>gdk_pixbuf_loader_write ()</h3>
274
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gdk_pixbuf_loader_write (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
275
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
276
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> count</code></em>,
277
<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>
279
This will cause a pixbuf loader to parse the next <em class="parameter"><code>count</code></em> bytes of
363
<a name="gdk-pixbuf-loader-write"></a><h3>gdk_pixbuf_loader_write ()</h3>
364
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
365
gdk_pixbuf_loader_write (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
366
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
367
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> count</code></em>,
368
<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>
369
<p>This will cause a pixbuf loader to parse the next <em class="parameter"><code>count</code></em>
280
371
an image. It will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the data was loaded successfully,
281
372
and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if an error occurred. In the latter case, the loader
282
373
will be closed, and will not accept further writes. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is
283
returned, <em class="parameter"><code>error</code></em> will be set to an error from the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a>
374
returned, <em class="parameter"><code>error</code></em>
375
will be set to an error from the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a>
284
376
or <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domains.</p>
285
<div class="variablelist"><table border="0" class="variablelist">
377
<div class="refsect3">
378
<a name="id-1.2.15.9.6.5"></a><h4>Parameters</h4>
379
<div class="informaltable"><table width="100%" border="0">
287
<col align="left" valign="top">
381
<col width="150px" class="parameters_name">
382
<col class="parameters_description">
383
<col width="200px" class="parameters_annotations">
292
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
293
<td>A pixbuf loader.</td>
296
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
297
<td>Pointer to image data. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=count]</span>
301
<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
302
<td>Length of the <em class="parameter"><code>buf</code></em> buffer in bytes.</td>
305
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
306
<td>return location for errors</td>
309
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
311
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the write was successful, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the loader
312
cannot parse the buffer.</td>
387
<td class="parameter_name"><p>loader</p></td>
388
<td class="parameter_description"><p>A pixbuf loader.</p></td>
389
<td class="parameter_annotations"> </td>
392
<td class="parameter_name"><p>buf</p></td>
393
<td class="parameter_description"><p> Pointer to image data. </p></td>
394
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=count]</span></td>
397
<td class="parameter_name"><p>count</p></td>
398
<td class="parameter_description"><p>Length of the <em class="parameter"><code>buf</code></em>
399
buffer in bytes.</p></td>
400
<td class="parameter_annotations"> </td>
403
<td class="parameter_name"><p>error</p></td>
404
<td class="parameter_description"><p>return location for errors</p></td>
405
<td class="parameter_annotations"> </td>
410
<div class="refsect3">
411
<a name="id-1.2.15.9.6.6"></a><h4>Returns</h4>
412
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the write was successful, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the loader
413
cannot parse the buffer.</p>
318
418
<div class="refsect2">
319
<a name="gdk-pixbuf-loader-write-bytes"></a><h3>gdk_pixbuf_loader_write_bytes ()</h3>
320
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gdk_pixbuf_loader_write_bytes (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
321
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *buffer</code></em>,
322
<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>
324
This will cause a pixbuf loader to parse a buffer inside a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a>
419
<a name="gdk-pixbuf-loader-write-bytes"></a><h3>gdk_pixbuf_loader_write_bytes ()</h3>
420
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
421
gdk_pixbuf_loader_write_bytes (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
422
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> *buffer</code></em>,
423
<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>
424
<p>This will cause a pixbuf loader to parse a buffer inside a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a>
325
425
for an image. It will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the data was loaded successfully,
326
426
and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if an error occurred. In the latter case, the loader
327
427
will be closed, and will not accept further writes. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is
328
returned, <em class="parameter"><code>error</code></em> will be set to an error from the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a>
428
returned, <em class="parameter"><code>error</code></em>
429
will be set to an error from the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a>
329
430
or <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domains.</p>
331
See also: <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a></p>
332
<div class="variablelist"><table border="0" class="variablelist">
431
<p>See also: <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a></p>
432
<div class="refsect3">
433
<a name="id-1.2.15.9.7.6"></a><h4>Parameters</h4>
434
<div class="informaltable"><table width="100%" border="0">
334
<col align="left" valign="top">
436
<col width="150px" class="parameters_name">
437
<col class="parameters_description">
438
<col width="200px" class="parameters_annotations">
339
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
340
<td>A pixbuf loader.</td>
343
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
344
<td>The image data as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a>
348
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
349
<td>return location for errors</td>
352
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
354
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the write was successful, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the loader
355
cannot parse the buffer.</td>
442
<td class="parameter_name"><p>loader</p></td>
443
<td class="parameter_description"><p>A pixbuf loader.</p></td>
444
<td class="parameter_annotations"> </td>
447
<td class="parameter_name"><p>buffer</p></td>
448
<td class="parameter_description"><p>The image data as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a></p></td>
449
<td class="parameter_annotations"> </td>
452
<td class="parameter_name"><p>error</p></td>
453
<td class="parameter_description"><p>return location for errors</p></td>
454
<td class="parameter_annotations"> </td>
459
<div class="refsect3">
460
<a name="id-1.2.15.9.7.7"></a><h4>Returns</h4>
461
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the write was successful, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the loader
462
cannot parse the buffer.</p>
359
465
<p class="since">Since 2.30</p>
362
468
<div class="refsect2">
363
<a name="gdk-pixbuf-loader-set-size"></a><h3>gdk_pixbuf_loader_set_size ()</h3>
364
<pre class="programlisting"><span class="returnvalue">void</span> gdk_pixbuf_loader_set_size (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
365
<em class="parameter"><code><span class="type">int</span> width</code></em>,
366
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
368
Causes the image to be scaled while it is loaded. The desired
469
<a name="gdk-pixbuf-loader-set-size"></a><h3>gdk_pixbuf_loader_set_size ()</h3>
470
<pre class="programlisting"><span class="returnvalue">void</span>
471
gdk_pixbuf_loader_set_size (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
472
<em class="parameter"><code><span class="type">int</span> width</code></em>,
473
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
474
<p>Causes the image to be scaled while it is loaded. The desired
369
475
image size can be determined relative to the original size of
370
the image by calling <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()"><code class="function">gdk_pixbuf_loader_set_size()</code></a> from a
476
the image by calling <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()"><code class="function">gdk_pixbuf_loader_set_size()</code></a> from a
371
477
signal handler for the ::size-prepared signal.</p>
373
Attempts to set the desired image size are ignored after the
478
<p>Attempts to set the desired image size are ignored after the
374
479
emission of the ::size-prepared signal.</p>
375
<div class="variablelist"><table border="0" class="variablelist">
480
<div class="refsect3">
481
<a name="id-1.2.15.9.8.6"></a><h4>Parameters</h4>
482
<div class="informaltable"><table width="100%" border="0">
377
<col align="left" valign="top">
484
<col width="150px" class="parameters_name">
485
<col class="parameters_description">
486
<col width="200px" class="parameters_annotations">
382
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
383
<td>A pixbuf loader.</td>
386
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
387
<td>The desired width of the image being loaded.</td>
390
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
391
<td>The desired height of the image being loaded.</td>
490
<td class="parameter_name"><p>loader</p></td>
491
<td class="parameter_description"><p>A pixbuf loader.</p></td>
492
<td class="parameter_annotations"> </td>
495
<td class="parameter_name"><p>width</p></td>
496
<td class="parameter_description"><p>The desired width of the image being loaded.</p></td>
497
<td class="parameter_annotations"> </td>
500
<td class="parameter_name"><p>height</p></td>
501
<td class="parameter_description"><p>The desired height of the image being loaded.</p></td>
502
<td class="parameter_annotations"> </td>
395
507
<p class="since">Since 2.2</p>
398
510
<div class="refsect2">
399
<a name="gdk-pixbuf-loader-get-pixbuf"></a><h3>gdk_pixbuf_loader_get_pixbuf ()</h3>
400
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_loader_get_pixbuf (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);</pre>
402
Queries the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> that a pixbuf loader is currently creating.
511
<a name="gdk-pixbuf-loader-get-pixbuf"></a><h3>gdk_pixbuf_loader_get_pixbuf ()</h3>
512
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
513
gdk_pixbuf_loader_get_pixbuf (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);</pre>
514
<p>Queries the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> that a pixbuf loader is currently creating.
403
515
In general it only makes sense to call this function after the
404
516
"area-prepared" signal has been emitted by the loader; this means
405
517
that enough data has been read to know the size of the image that
406
518
will be allocated. If the loader has not received enough data via
407
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a>, then this function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The
519
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a>, then this function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The
408
520
returned pixbuf will be the same in all future calls to the loader,
409
521
so simply calling <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> should be sufficient to continue
410
522
using it. Additionally, if the loader is an animation, it will
411
523
return the "static image" of the animation
412
(see <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-static-image" title="gdk_pixbuf_animation_get_static_image ()"><code class="function">gdk_pixbuf_animation_get_static_image()</code></a>).</p>
413
<div class="variablelist"><table border="0" class="variablelist">
524
(see <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-static-image" title="gdk_pixbuf_animation_get_static_image ()"><code class="function">gdk_pixbuf_animation_get_static_image()</code></a>).</p>
525
<div class="refsect3">
526
<a name="id-1.2.15.9.9.5"></a><h4>Parameters</h4>
527
<div class="informaltable"><table width="100%" border="0">
415
<col align="left" valign="top">
529
<col width="150px" class="parameters_name">
530
<col class="parameters_description">
531
<col width="200px" class="parameters_annotations">
420
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
421
<td>A pixbuf loader.</td>
424
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
425
<td>The <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> that the loader is creating, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not
426
enough data has been read to determine how to create the image buffer. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
534
<td class="parameter_name"><p>loader</p></td>
535
<td class="parameter_description"><p>A pixbuf loader.</p></td>
536
<td class="parameter_annotations"> </td>
540
<div class="refsect3">
541
<a name="id-1.2.15.9.9.6"></a><h4>Returns</h4>
542
<p> The <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> that the loader is creating, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not
543
enough data has been read to determine how to create the image buffer. </p>
544
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
433
548
<div class="refsect2">
434
<a name="gdk-pixbuf-loader-get-animation"></a><h3>gdk_pixbuf_loader_get_animation ()</h3>
435
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> * gdk_pixbuf_loader_get_animation (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);</pre>
437
Queries the <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> that a pixbuf loader is currently creating.
549
<a name="gdk-pixbuf-loader-get-animation"></a><h3>gdk_pixbuf_loader_get_animation ()</h3>
550
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
551
gdk_pixbuf_loader_get_animation (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>);</pre>
552
<p>Queries the <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> that a pixbuf loader is currently creating.
438
553
In general it only makes sense to call this function after the "area-prepared"
439
554
signal has been emitted by the loader. If the loader doesn't have enough
440
555
bytes yet (hasn't emitted the "area-prepared" signal) this function will
441
556
return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
442
<div class="variablelist"><table border="0" class="variablelist">
557
<div class="refsect3">
558
<a name="id-1.2.15.9.10.5"></a><h4>Parameters</h4>
559
<div class="informaltable"><table width="100%" border="0">
444
<col align="left" valign="top">
561
<col width="150px" class="parameters_name">
562
<col class="parameters_description">
563
<col width="200px" class="parameters_annotations">
449
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
450
<td>A pixbuf loader</td>
453
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
454
<td>The <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> that the loader is loading, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
455
not enough data has been read to determine the information. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
566
<td class="parameter_name"><p>loader</p></td>
567
<td class="parameter_description"><p>A pixbuf loader</p></td>
568
<td class="parameter_annotations"> </td>
572
<div class="refsect3">
573
<a name="id-1.2.15.9.10.6"></a><h4>Returns</h4>
574
<p> The <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> that the loader is loading, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
575
not enough data has been read to determine the information. </p>
576
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
462
580
<div class="refsect2">
463
<a name="gdk-pixbuf-loader-close"></a><h3>gdk_pixbuf_loader_close ()</h3>
464
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gdk_pixbuf_loader_close (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
465
<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>
467
Informs a pixbuf loader that no further writes with
468
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a> will occur, so that it can free its
581
<a name="gdk-pixbuf-loader-close"></a><h3>gdk_pixbuf_loader_close ()</h3>
582
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
583
gdk_pixbuf_loader_close (<em class="parameter"><code><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader</code></em>,
584
<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>
585
<p>Informs a pixbuf loader that no further writes with
586
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-write" title="gdk_pixbuf_loader_write ()"><code class="function">gdk_pixbuf_loader_write()</code></a> will occur, so that it can free its
469
587
internal loading structures. Also, tries to parse any data that
470
588
hasn't yet been parsed; if the remaining data is partial or
471
589
corrupt, an error will be returned. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned, <em class="parameter"><code>error</code></em>
472
591
will be set to an error from the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a>
473
592
domains. If you're just cancelling a load rather than expecting it
474
to be finished, passing <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for <em class="parameter"><code>error</code></em> to ignore it is
593
to be finished, passing <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for <em class="parameter"><code>error</code></em>
477
Remember that this does not unref the loader, so if you plan not to
596
<p>Remember that this does not unref the loader, so if you plan not to
478
597
use it anymore, please <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> it.</p>
479
<div class="variablelist"><table border="0" class="variablelist">
598
<div class="refsect3">
599
<a name="id-1.2.15.9.11.6"></a><h4>Parameters</h4>
600
<div class="informaltable"><table width="100%" border="0">
481
<col align="left" valign="top">
602
<col width="150px" class="parameters_name">
603
<col class="parameters_description">
604
<col width="200px" class="parameters_annotations">
486
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
487
<td>A pixbuf loader.</td>
490
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
491
<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
495
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
497
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if all image data written so far was successfully
498
passed out via the update_area signal</td>
608
<td class="parameter_name"><p>loader</p></td>
609
<td class="parameter_description"><p>A pixbuf loader.</p></td>
610
<td class="parameter_annotations"> </td>
613
<td class="parameter_name"><p>error</p></td>
614
<td class="parameter_description"><p> return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors. </p></td>
615
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
620
<div class="refsect3">
621
<a name="id-1.2.15.9.11.7"></a><h4>Returns</h4>
622
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if all image data written so far was successfully
623
passed out via the update_area signal</p>
628
<div class="refsect1">
629
<a name="GdkPixbufLoader.other_details"></a><h2>Types and Values</h2>
630
<div class="refsect2">
631
<a name="GdkPixbufLoader-struct"></a><h3>struct GdkPixbufLoader</h3>
632
<pre class="programlisting">struct GdkPixbufLoader;</pre>
633
<p>The <structname>GdkPixbufLoader</structname> struct contains only private
504
637
<div class="refsect1">
505
638
<a name="GdkPixbufLoader.signal-details"></a><h2>Signal Details</h2>
506
639
<div class="refsect2">
507
<a name="GdkPixbufLoader-area-prepared"></a><h3>The <code class="literal">"area-prepared"</code> signal</h3>
508
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
509
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
511
This signal is emitted when the pixbuf loader has allocated the
640
<a name="GdkPixbufLoader-area-prepared"></a><h3>The <code class="literal">“area-prepared”</code> signal</h3>
641
<pre class="programlisting"><span class="returnvalue">void</span>
642
user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
643
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
644
<p>This signal is emitted when the pixbuf loader has allocated the
513
646
pixbuf in the desired size. After this signal is emitted,
515
applications can call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()"><code class="function">gdk_pixbuf_loader_get_pixbuf()</code></a> to fetch
648
applications can call <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-get-pixbuf" title="gdk_pixbuf_loader_get_pixbuf ()"><code class="function">gdk_pixbuf_loader_get_pixbuf()</code></a> to fetch
517
650
the partially-loaded pixbuf.</p>
518
<div class="variablelist"><table border="0" class="variablelist">
651
<div class="refsect3">
652
<a name="id-1.2.15.11.2.5"></a><h4>Parameters</h4>
653
<div class="informaltable"><table width="100%" border="0">
520
<col align="left" valign="top">
655
<col width="150px" class="parameters_name">
656
<col class="parameters_description">
657
<col width="200px" class="parameters_annotations">
525
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
526
<td>the object which received the signal.</td>
661
<td class="parameter_name"><p>loader</p></td>
662
<td class="parameter_description"><p>the object which received the signal.</p></td>
663
<td class="parameter_annotations"> </td>
529
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
530
<td>user data set when the signal handler was connected.</td>
666
<td class="parameter_name"><p>user_data</p></td>
667
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
668
<td class="parameter_annotations"> </td>
673
<p>Flags: <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
536
676
<div class="refsect2">
537
<a name="GdkPixbufLoader-area-updated"></a><h3>The <code class="literal">"area-updated"</code> signal</h3>
538
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
539
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x,
540
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y,
541
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width,
542
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height,
543
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
545
This signal is emitted when a significant area of the image being
677
<a name="GdkPixbufLoader-area-updated"></a><h3>The <code class="literal">“area-updated”</code> signal</h3>
678
<pre class="programlisting"><span class="returnvalue">void</span>
679
user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
680
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x,
681
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y,
682
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width,
683
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height,
684
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
685
<p>This signal is emitted when a significant area of the image being
546
686
loaded has been updated. Normally it means that a complete
547
687
scanline has been read in, but it could be a different area as
548
688
well. Applications can use this signal to know when to repaint
549
689
areas of an image that is being loaded.</p>
550
<div class="variablelist"><table border="0" class="variablelist">
690
<div class="refsect3">
691
<a name="id-1.2.15.11.3.5"></a><h4>Parameters</h4>
692
<div class="informaltable"><table width="100%" border="0">
552
<col align="left" valign="top">
694
<col width="150px" class="parameters_name">
695
<col class="parameters_description">
696
<col width="200px" class="parameters_annotations">
557
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
558
<td>the object which received the signal.</td>
561
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
562
<td>X offset of upper-left corner of the updated area.</td>
565
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
566
<td>Y offset of upper-left corner of the updated area.</td>
569
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
570
<td>Width of updated area.</td>
573
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
574
<td>Height of updated area.</td>
577
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
578
<td>user data set when the signal handler was connected.</td>
700
<td class="parameter_name"><p>loader</p></td>
701
<td class="parameter_description"><p>the object which received the signal.</p></td>
702
<td class="parameter_annotations"> </td>
705
<td class="parameter_name"><p>x</p></td>
706
<td class="parameter_description"><p>X offset of upper-left corner of the updated area.</p></td>
707
<td class="parameter_annotations"> </td>
710
<td class="parameter_name"><p>y</p></td>
711
<td class="parameter_description"><p>Y offset of upper-left corner of the updated area.</p></td>
712
<td class="parameter_annotations"> </td>
715
<td class="parameter_name"><p>width</p></td>
716
<td class="parameter_description"><p>Width of updated area.</p></td>
717
<td class="parameter_annotations"> </td>
720
<td class="parameter_name"><p>height</p></td>
721
<td class="parameter_description"><p>Height of updated area.</p></td>
722
<td class="parameter_annotations"> </td>
725
<td class="parameter_name"><p>user_data</p></td>
726
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
727
<td class="parameter_annotations"> </td>
732
<p>Flags: <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
584
735
<div class="refsect2">
585
<a name="GdkPixbufLoader-closed"></a><h3>The <code class="literal">"closed"</code> signal</h3>
586
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
587
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
589
This signal is emitted when <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-close" title="gdk_pixbuf_loader_close ()"><code class="function">gdk_pixbuf_loader_close()</code></a> is called.
736
<a name="GdkPixbufLoader-closed"></a><h3>The <code class="literal">“closed”</code> signal</h3>
737
<pre class="programlisting"><span class="returnvalue">void</span>
738
user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
739
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
740
<p>This signal is emitted when <a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-close" title="gdk_pixbuf_loader_close ()"><code class="function">gdk_pixbuf_loader_close()</code></a> is called.
590
741
It can be used by different parts of an application to receive
591
742
notification when an image loader is closed by the code that
593
<div class="variablelist"><table border="0" class="variablelist">
744
<div class="refsect3">
745
<a name="id-1.2.15.11.4.5"></a><h4>Parameters</h4>
746
<div class="informaltable"><table width="100%" border="0">
595
<col align="left" valign="top">
748
<col width="150px" class="parameters_name">
749
<col class="parameters_description">
750
<col width="200px" class="parameters_annotations">
600
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
601
<td>the object which received the signal.</td>
754
<td class="parameter_name"><p>loader</p></td>
755
<td class="parameter_description"><p>the object which received the signal.</p></td>
756
<td class="parameter_annotations"> </td>
604
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
605
<td>user data set when the signal handler was connected.</td>
759
<td class="parameter_name"><p>user_data</p></td>
760
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
761
<td class="parameter_annotations"> </td>
766
<p>Flags: <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
611
769
<div class="refsect2">
612
<a name="GdkPixbufLoader-size-prepared"></a><h3>The <code class="literal">"size-prepared"</code> signal</h3>
613
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
614
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width,
615
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height,
616
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
618
This signal is emitted when the pixbuf loader has been fed the
770
<a name="GdkPixbufLoader-size-prepared"></a><h3>The <code class="literal">“size-prepared”</code> signal</h3>
771
<pre class="programlisting"><span class="returnvalue">void</span>
772
user_function (<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> *loader,
773
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width,
774
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height,
775
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
776
<p>This signal is emitted when the pixbuf loader has been fed the
619
777
initial amount of data that is required to figure out the size
620
778
of the image that it will create. Applications can call
622
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()"><code class="function">gdk_pixbuf_loader_set_size()</code></a> in response to this signal to set
780
<a class="link" href="GdkPixbufLoader.html#gdk-pixbuf-loader-set-size" title="gdk_pixbuf_loader_set_size ()"><code class="function">gdk_pixbuf_loader_set_size()</code></a> in response to this signal to set
623
781
the desired size to which the image should be scaled.</p>
624
<div class="variablelist"><table border="0" class="variablelist">
782
<div class="refsect3">
783
<a name="id-1.2.15.11.5.5"></a><h4>Parameters</h4>
784
<div class="informaltable"><table width="100%" border="0">
626
<col align="left" valign="top">
786
<col width="150px" class="parameters_name">
787
<col class="parameters_description">
788
<col width="200px" class="parameters_annotations">
631
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
632
<td>the object which received the signal.</td>
635
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
636
<td>the original width of the image</td>
639
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
640
<td>the original height of the image</td>
643
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
644
<td>user data set when the signal handler was connected.</td>
792
<td class="parameter_name"><p>loader</p></td>
793
<td class="parameter_description"><p>the object which received the signal.</p></td>
794
<td class="parameter_annotations"> </td>
797
<td class="parameter_name"><p>width</p></td>
798
<td class="parameter_description"><p>the original width of the image</p></td>
799
<td class="parameter_annotations"> </td>
802
<td class="parameter_name"><p>height</p></td>
803
<td class="parameter_description"><p>the original height of the image</p></td>
804
<td class="parameter_annotations"> </td>
807
<td class="parameter_name"><p>user_data</p></td>
808
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
809
<td class="parameter_annotations"> </td>
814
<p>Flags: <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
650
817
<div class="refsect1">
651
818
<a name="GdkPixbufLoader.see-also"></a><h2>See Also</h2>
652
gdk_pixbuf_new_from_file(), <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-file" title="gdk_pixbuf_animation_new_from_file ()"><code class="function">gdk_pixbuf_animation_new_from_file()</code></a>
819
<p>gdk_pixbuf_new_from_file(), <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-file" title="gdk_pixbuf_animation_new_from_file ()"><code class="function">gdk_pixbuf_animation_new_from_file()</code></a></p>
655
822
<div class="footer">
657
Generated by GTK-Doc V1.19.1</div>
824
Generated by GTK-Doc V1.20.1</div>
b'\\ No newline at end of file'