summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-gdkpixbufloader.xml
blob: f45fa3e9635727227d099a19ac9b053e801299de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gdkpixbufloader">
  <refnamediv>
    <refname>gtk.gdk.PixbufLoader</refname>
    <refpurpose>an object providing application-driven progressive image
loading</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.gdk.PixbufLoader</classname></ooclass>
      <ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gdkpixbufloader">gtk.gdk.PixbufLoader</link></methodname>
	<methodparam><parameter
		       role="keyword">image_type</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkpixbufloader--write">write</link></methodname>
	<methodparam><parameter role="keyword">buf</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">count</parameter>
	  <initializer>-1</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkpixbufloader--get-pixbuf">get_pixbuf</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkpixbufloader--get-animation">get_animation</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gdkpixbufloader--close">close</link></methodname>
      </methodsynopsis>
 <methodsynopsis language="python">
	<methodname><link linkend="method-gdkpixbufloader--set-size">set_size</link></methodname>
	<methodparam><parameter
		       role="keyword">width</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">height</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gdkpixbufloader--get-format">get_format</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
   </classsynopsis>

    <programlisting>
<emphasis role="bold">Functions</emphasis>

<methodsynopsis language="python">
	<methodname><link linkend="function-gdk--pixbuf-loader-new-with-mime-type">gtk.gdk.pixbuf_loader_new_with_mime_type</link></methodname>
	<methodparam><parameter role="keyword">mime_type</parameter></methodparam>
      </methodsynopsis></programlisting>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gdkpixbufloader">gtk.gdk.PixbufLoader</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Signal Prototypes</title>

    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gdkpixbufloader--area-prepared">area-prepared</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>pixbufloader</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gdkpixbufloader--area-updated">area-updated</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>pixbufloader</parameter></methodparam>
            <methodparam><parameter>x</parameter></methodparam>
            <methodparam><parameter>y</parameter></methodparam>
            <methodparam><parameter>width</parameter></methodparam>
            <methodparam><parameter>height</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gdkpixbufloader--closed">closed</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>pixbufloader</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gdkpixbufloader--size-prepared">size-prepared</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>pixbufloader</parameter></methodparam>
            <methodparam><parameter>width</parameter></methodparam>
            <methodparam><parameter>height</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-gdkpixbufloader"><classname>gtk.gdk.PixbufLoader</classname></link> 
provides a way for applications to drive the process of loading an image, by
letting them send the image data directly to the loader instead of having
the loader read the data from a file. Applications can use this instead of
the <link
linkend="function-gdk--pixbuf-new-from-file"><function>gtk.gdk.pixbuf_new_from_file</function></link> function 
or the <link
linkend="constructor-gdkpixbufanimation"><function>gtk.gdk.PixbufAnimation</function></link> 
constructor when they need to parse image data in small chunks. For example,
it should be used when reading an image from a (potentially) slow network
connection, or when loading an extremely large file.</para>

    <para>To use <link
linkend="class-gdkpixbufloader"><classname>gtk.gdk.PixbufLoader</classname></link> 
to load an image, just create a new one, and call the <link
linkend="method-gdkpixbufloader--write"><methodname>write</methodname>()</link> 
method to send the data to it. When done, the <link
linkend="method-gdkpixbufloader--close"><methodname>close</methodname>()</link> 
method should be called to end the stream and finalize everything. The
loader will emit two important signals throughout the process. The first,
"area-prepared", will be called as soon as the image has enough information
to determine the size of the image to be used. The application can call the
<link
linkend="method-gdkpixbufloader--get-pixbuf"><methodname>get_pixbuf</methodname>()</link> 
method to retrieve the pixbuf. No actual image data will be in the pixbuf,
so it can be safely filled with any temporary graphics (or an initial color)
as needed.</para>

    <para>The "area-updated" signal is emitted every time a region is
updated. This way you can update a partially completed image. Note that you
do not know anything about the completeness of an image from the area
updated. For example, in an interlaced image, you need to make several
passes before the image is done loading.</para>

    <refsect2>
      <title>Loading an Animation</title>

      <para>Loading an animation is almost as easy as loading an image. Once
the first "area-prepared" signal has been emitted, you can call the <link
linkend="method-gdkpixbufloader--get-animation"><methodname>get_animation</methodname>()</link>
method to get the <link
linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link>
object and the <link
linkend="method-gdkpixbufanimation--get-iter"><methodname>gtk.gdk.PixbufAnimation.get_iter</methodname>()</link>
method to get an <link
linkend="class-gdkpixbufanimationiter"><classname>gtk.gdk.PixbufAnimationIter</classname></link>
for displaying it.</para>

    </refsect2>

  </refsect1>

  <refsect1 id="constructor-gdkpixbufloader">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.gdk.PixbufLoader</methodname>
	<methodparam><parameter role="keyword">image_type</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">image_type</parameter>&nbsp;:</term>
	<listitem><simpara>the name of the image format or
<literal>None</literal></simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>A new <link
linkend="class-gdkpixbufloader"><classname>gtk.gdk.PixbufLoader</classname></link> 
object.</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gdkpixbufloader"><classname>gtk.gdk.PixbufLoader</classname></link>
object. If <parameter>image_type</parameter> is not specified or is
<literal>None</literal> the image type will be automatically deduced from
the image data. If <parameter>image_type</parameter> is specified the <link
linkend="class-gdkpixbufloader"><classname>gtk.gdk.PixbufLoader</classname></link>
attempts to parse the image data as if it were an image of the specified
type. Identifying the image type is useful if you want an error if the image
isn't the expected type, for loading image formats that can't be reliably
identified by looking at the data, or if the user manually forces a specific
type.</para>

    <para>This constructor raises the GError exception if an error occurs
trying to load the module for <parameter>image_type</parameter>.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gdkpixbufloader--write">
      <title>gtk.gdk.PixbufLoader.write</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>write</methodname>
	  <methodparam><parameter
			 role="keyword">buf</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">count</parameter>
	  <initializer>-1</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">buf</parameter>&nbsp;:</term>
	  <listitem><simpara>a string containing some portion of the image
data.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">count</parameter>&nbsp;:</term>
	  <listitem><simpara>the length of <parameter>buf</parameter> in
bytes.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the write was
successful.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>write</methodname>() method causes the pixbuf
loader to parse the bytes of an image contained in the string specified by
<parameter>buf</parameter>. If <parameter>count</parameter> is specified and
is in the range (0, len(buf)) only <parameter>count</parameter> bytes of
<parameter>buf</parameter> are used. This method returns
<literal>True</literal> if the image data was loaded successfully. If an
error occurred this method raises the GError exception and will not accept
further writes. The loader may or may not be closed depending on the
error.</para>

    </refsect2>

    <refsect2 id="method-gdkpixbufloader--get-pixbuf">
      <title>gtk.gdk.PixbufLoader.get_pixbuf</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_pixbuf</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link> that
the loader is creating, or <literal>None</literal> if not enough data has
been read to determine how to create the image buffer.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_pixbuf</methodname>() method returns the
<link linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>
that a pixbuf loader is currently creating. In general it only makes sense
to call this method after the "area-prepared" signal has been emitted by
the loader which means that enough data has been read to know the size of
the image that will be allocated. If the loader has not received enough data
via the <link
linkend="method-gdkpixbufloader--write"><methodname>write</methodname>()</link> 
method, this method returns <literal>None</literal>. The same pixbuf will be
returned in all future calls to this method. Also, if the loader is an
animation, it will return the "static image" of the animation (see the <link
linkend="method-gdkpixbufanimation--get-static-image"><methodname>gtk.gdk.PixbufAnimation.get_static_image</methodname>()</link> 
method).</para>

    </refsect2>

    <refsect2 id="method-gdkpixbufloader--get-animation">
      <title>gtk.gdk.PixbufLoader.get_animation</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_animation</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link> 
that the loader is loading, or <literal>None</literal> if not enough data
has been read to determine the information.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_animation</methodname>() method returns the
<link
linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link> 
that the pixbuf loader is currently creating. In general it only makes sense
to call this method after the "area-prepared" signal has been emitted by the
loader. If the loader doesn't have enough bytes yet (hasn't emitted the
"area-prepared" signal) this method will return
<literal>None</literal>.</para>

    </refsect2>

    <refsect2 id="method-gdkpixbufloader--close">
      <title>gtk.gdk.PixbufLoader.close</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>close</methodname>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if all image data
written so far was successfully passed out via the "area_update"
signal</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>close</methodname>() method informs the pixbuf
loader that no further writes using the <link
linkend="method-gdkpixbufloader--write"><methodname>write</methodname>()</link>
will occur, so that it can free its internal loading structures. Also, the
pixbuf loader tries to parse any data that hasn't yet been parsed and if the
remaining data is partial or corrupt, the GError exception will be
raised.</para>

    </refsect2>

    <refsect2 id="method-gdkpixbufloader--set-size">
      <title>gtk.gdk.PixbufLoader.set_size</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_size</methodname>
	  <methodparam><parameter
		       role="keyword">width</parameter></methodparam>
	  <methodparam><parameter
		       role="keyword">height</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
		       role="keyword">width</parameter>&nbsp;:</term>
	  <listitem><simpara>The desired width for the image being
	  loaded.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
		       role="keyword">height</parameter>&nbsp;:</term>
	  <listitem><simpara>The desired height for the image being
	  loaded.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.4 and above.</para>
      </note>

      <para>The <methodname>set_size</methodname>() method causes the image
to be scaled to the size specified by <parameter>width</parameter> and
<parameter>height</parameter> while it is being loaded. The desired image
size can be determined relative to the original size of the image by calling
the <link
linkend="method-gdkpixbufloader--set-size"><methodname>set_size()</methodname></link>
from a signal handler for the "<link
linkend="signal-gdkpixbufloader--size-prepared">size-prepared</link>"
signal.</para>

      <para>Attempts to set the desired image size are ignored after the
emission of the "<link
linkend="signal-gdkpixbufloader--size-prepared">size-prepared</link>".</para>

    </refsect2>

    <refsect2 id="method-gdkpixbufloader--get-format">
      <title>gtk.gdk.PixbufLoader.get_format</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_format</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a Python dict containing the image format
	  information or <literal>None</literal></simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.4 and above.</para>
      </note>

      <para>The <methodname>get_format</methodname>() method returns the
available information about the format of the currently loading image
file. This method returns None if their is no information available
e.g. before the image has started loading.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Functions</title>

    <refsect2 id="function-gdk--pixbuf-loader-new-with-mime-type">
      <title>gtk.gdk.pixbuf_loader_new_with_mime_type</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.gdk.pixbuf_loader_new_with_mime_type</methodname>
	  <methodparam><parameter
			 role="keyword">mime_type</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">mime_type</parameter>&nbsp;:</term>
	  <listitem><simpara> the mime type to be loaded</simpara></listitem>
	</varlistentry>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new <link
	  linkend="class-gdkpixbufloader"><classname>gtk.gdk.PixbufLoader</classname></link>
	  object.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This function is available in PyGTK 2.4 and above.</para>
      </note>

      <para>The
<function>gtk.gdk.pixbuf_loader_new_with_mime_type</function>() function
creates a new pixbuf loader object that always attempts to parse image data
as if it were an image of the mime type specified by
<parameter>mime_type</parameter>, instead of identifying the type
automatically. Useful if you want an error if the image isn't the expected
mime type, for loading image formats that can't be reliably identified by
looking at the data, or if the user manually forces a specific mime
type.</para>

      <para>This function raises the GError exception if an error occurs
during the loading of the mime type image module.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gdkpixbufloader--area-prepared">
      <title>The "area-prepared" gtk.gdk.PixbufLoader Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>pixbufloader</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>pixbufloader</parameter>&nbsp;:</term>
	  <listitem><simpara>the pixbufloader that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "area-prepared" signal is emitted when sufficient image data
has been received and parsed to determine the size of the image.</para>

    </refsect2>

    <refsect2 id="signal-gdkpixbufloader--area-updated">
      <title>The "area-updated" gtk.gdk.PixbufLoader Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>pixbufloader</parameter></methodparam>
	  <methodparam><parameter>x</parameter></methodparam>
	  <methodparam><parameter>y</parameter></methodparam>
	  <methodparam><parameter>width</parameter></methodparam>
	  <methodparam><parameter>height</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>pixbufloader</parameter>&nbsp;:</term>
	  <listitem><simpara>the pixbufloader that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>x</parameter>&nbsp;:</term>
	  <listitem><simpara>the X coordinate of the
region</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>y</parameter>&nbsp;:</term>
	  <listitem><simpara>the Y coordinate of the
region</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>width</parameter>&nbsp;:</term>
	  <listitem><simpara>the width of the region</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>height</parameter>&nbsp;:</term>
	  <listitem><simpara>the height of the region</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "area-updated" signal is emitted when sufficient image data
has been received and parsed to allow the region specified by
<parameter>x</parameter>, <parameter>y</parameter>,
<parameter>width</parameter> and <parameter>height</parameter> to be
displayed.</para>

    </refsect2>

    <refsect2 id="signal-gdkpixbufloader--closed">
      <title>The "closed" gtk.gdk.PixbufLoader Signal</title>

      <programlisting><methodsynopsis language="python">
          <methodname>callback</methodname>
          <methodparam><parameter>pixbufloader</parameter></methodparam>
          <methodparam><parameter>user_param1</parameter></methodparam>
          <methodparam><parameter>...</parameter></methodparam>
        </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter>pixbufloader</parameter>&nbsp;:</term>
          <listitem><simpara>the pixbufloader that received the
signal</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>...</parameter>&nbsp;:</term>
          <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>The "closed" signal is emitted when the
<parameter>pixbufloader</parameter> is closed by calling the <link
linkend="method-gdkpixbufloader--close"><methodname>close</methodname>()</link>
method.</para>

    </refsect2>

    <refsect2 id="signal-gdkpixbufloader--size-prepared">
      <title>The "size-prepared" gtk.gdk.PixbufLoader Signal</title>

      <programlisting><methodsynopsis language="python">
          <methodname>callback</methodname>
          <methodparam><parameter>pixbufloader</parameter></methodparam>
          <methodparam><parameter>width</parameter></methodparam>
          <methodparam><parameter>height</parameter></methodparam>
          <methodparam><parameter>user_param1</parameter></methodparam>
          <methodparam><parameter>...</parameter></methodparam>
        </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter>pixbufloader</parameter>&nbsp;:</term>
          <listitem><simpara>the pixbufloader that received the
signal</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>width</parameter>&nbsp;:</term>
          <listitem><simpara>the original width of the
          image</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>height</parameter>&nbsp;:</term>
          <listitem><simpara>he original height of the
          image</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>...</parameter>&nbsp;:</term>
          <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
	<para>This signal is available in GTK+ 2.2 and above.</para>
      </note>

      <para>The "size-prepared" signal is emitted when the pixbuf loader has
been fed the initial amount of data that is required to figure out the size
of the image that it will create. Applications can call the <link
linkend="method-gdkpixbufloader--set-size"><methodname>set_size</methodname>()</link>
method in response to this signal to set the desired size of the
image.</para>

    </refsect2>

  </refsect1>

</refentry>