~ubuntu-branches/ubuntu/precise/gdk-pixbuf/precise

« back to all changes in this revision

Viewing changes to docs/reference/gdk-pixbuf/html/gdk-pixbuf-Animations.html

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2011-09-02 12:05:31 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: package-import@ubuntu.com-20110902120531-m8ps135i9wx0wu9c
Tags: 2.24.0-1
New upstream bug fix release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
<span class="returnvalue">int</span>                 <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-width" title="gdk_pixbuf_animation_get_width ()">gdk_pixbuf_animation_get_width</a>      (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);
53
53
<span class="returnvalue">int</span>                 <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-height" title="gdk_pixbuf_animation_get_height ()">gdk_pixbuf_animation_get_height</a>     (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);
54
54
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="returnvalue">GdkPixbufAnimationIter</span></a> * <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-iter" title="gdk_pixbuf_animation_get_iter ()">gdk_pixbuf_animation_get_iter</a>  (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>,
55
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *start_time</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="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-is-static-image" title="gdk_pixbuf_animation_is_static_image ()">gdk_pixbuf_animation_is_static_image</a>
 
55
                                                         <em class="parameter"><code>const <span class="type">GTimeVal</span> *start_time</code></em>);
 
56
<span class="returnvalue">gboolean</span>            <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-is-static-image" title="gdk_pixbuf_animation_is_static_image ()">gdk_pixbuf_animation_is_static_image</a>
57
57
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);
58
58
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *         <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-static-image" title="gdk_pixbuf_animation_get_static_image ()">gdk_pixbuf_animation_get_static_image</a>
59
59
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);
60
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-advance" title="gdk_pixbuf_animation_iter_advance ()">gdk_pixbuf_animation_iter_advance</a>   (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>,
61
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *current_time</code></em>);
 
60
<span class="returnvalue">gboolean</span>            <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-advance" title="gdk_pixbuf_animation_iter_advance ()">gdk_pixbuf_animation_iter_advance</a>   (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>,
 
61
                                                         <em class="parameter"><code>const <span class="type">GTimeVal</span> *current_time</code></em>);
62
62
<span class="returnvalue">int</span>                 <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-get-delay-time" title="gdk_pixbuf_animation_iter_get_delay_time ()">gdk_pixbuf_animation_iter_get_delay_time</a>
63
63
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</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="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-on-currently-loading-frame" title="gdk_pixbuf_animation_iter_on_currently_loading_frame ()">gdk_pixbuf_animation_iter_on_currently_loading_frame</a>
 
64
<span class="returnvalue">gboolean</span>            <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-on-currently-loading-frame" title="gdk_pixbuf_animation_iter_on_currently_loading_frame ()">gdk_pixbuf_animation_iter_on_currently_loading_frame</a>
65
65
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>);
66
66
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *         <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-get-pixbuf" title="gdk_pixbuf_animation_iter_get_pixbuf ()">gdk_pixbuf_animation_iter_get_pixbuf</a>
67
67
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>);
68
68
 
69
69
                    <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim-struct" title="GdkPixbufSimpleAnim">GdkPixbufSimpleAnim</a>;
70
 
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="returnvalue">GdkPixbufSimpleAnim</span></a> * <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-simple-anim-new" title="gdk_pixbuf_simple_anim_new ()">gdk_pixbuf_simple_anim_new</a>        (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
71
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
72
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> rate</code></em>);
 
70
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="returnvalue">GdkPixbufSimpleAnim</span></a> * <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-simple-anim-new" title="gdk_pixbuf_simple_anim_new ()">gdk_pixbuf_simple_anim_new</a>        (<em class="parameter"><code><span class="type">gint</span> width</code></em>,
 
71
                                                         <em class="parameter"><code><span class="type">gint</span> height</code></em>,
 
72
                                                         <em class="parameter"><code><span class="type">gfloat</span> rate</code></em>);
73
73
<span class="returnvalue">void</span>                <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-simple-anim-add-frame" title="gdk_pixbuf_simple_anim_add_frame ()">gdk_pixbuf_simple_anim_add_frame</a>    (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>,
74
74
                                                         <em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
75
75
<span class="returnvalue">void</span>                <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-simple-anim-set-loop" title="gdk_pixbuf_simple_anim_set_loop ()">gdk_pixbuf_simple_anim_set_loop</a>     (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>,
76
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> loop</code></em>);
77
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-simple-anim-get-loop" title="gdk_pixbuf_simple_anim_get_loop ()">gdk_pixbuf_simple_anim_get_loop</a>     (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>);
 
76
                                                         <em class="parameter"><code><span class="type">gboolean</span> loop</code></em>);
 
77
<span class="returnvalue">gboolean</span>            <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-simple-anim-get-loop" title="gdk_pixbuf_simple_anim_get_loop ()">gdk_pixbuf_simple_anim_get_loop</a>     (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>);
78
78
</pre>
79
79
</div>
80
80
<div class="refsect1">
81
81
<a name="gdk-pixbuf-Animations.object-hierarchy"></a><h2>Object Hierarchy</h2>
82
82
<pre class="synopsis">
83
 
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
83
  GObject
84
84
   +----GdkPixbufAnimation
85
85
         +----<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim">GdkPixbufSimpleAnim</a>
86
86
</pre>
87
87
<pre class="synopsis">
88
 
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
88
  GObject
89
89
   +----GdkPixbufAnimationIter
90
90
</pre>
91
91
<pre class="synopsis">
92
 
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
92
  GObject
93
93
   +----<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation">GdkPixbufAnimation</a>
94
94
         +----GdkPixbufSimpleAnim
95
95
</pre>
97
97
<div class="refsect1">
98
98
<a name="gdk-pixbuf-Animations.properties"></a><h2>Properties</h2>
99
99
<pre class="synopsis">
100
 
  "<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim--loop" title='The "loop" property'>loop</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
 
100
  "<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim--loop" title='The "loop" property'>loop</a>"                     <span class="type">gboolean</span>              : Read / Write
101
101
</pre>
102
102
</div>
103
103
<div class="refsect1">
139
139
Creates a new animation by loading it from a file.  The file format is
140
140
detected automatically.  If the file's format does not support multi-frame
141
141
images, then an animation with a single frame will be created. Possible errors
142
 
are in 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> and <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.
 
142
are in 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> and <span class="type">G_FILE_ERROR</span> domains.
143
143
</p>
144
144
<div class="variablelist"><table border="0">
145
145
<col align="left" valign="top">
154
154
</tr>
155
155
<tr>
156
156
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
157
 
<td>A newly-created animation with a reference count of 1, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
157
<td>A newly-created animation with a reference count of 1, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
158
158
if any of several error conditions ocurred:  the file could not be opened,
159
159
there was no loader for the file's format, there was not enough memory to
160
160
allocate the image buffer, or the image file contained invalid data.</td>
168
168
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> * gdk_pixbuf_animation_ref           (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
169
169
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
170
170
<h3 class="title">Warning</h3>
171
 
<p><code class="literal">gdk_pixbuf_animation_ref</code> has been deprecated since version 2.0 and should not be used in newly-written code. Use <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>.</p>
 
171
<p><code class="literal">gdk_pixbuf_animation_ref</code> has been deprecated since version 2.0 and should not be used in newly-written code. Use <code class="function">g_object_ref()</code>.</p>
172
172
</div>
173
173
<p>
174
174
Adds a reference to an animation.
193
193
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_pixbuf_animation_unref          (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
194
194
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
195
195
<h3 class="title">Warning</h3>
196
 
<p><code class="literal">gdk_pixbuf_animation_unref</code> has been deprecated since version 2.0 and should not be used in newly-written code. Use <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>.</p>
 
196
<p><code class="literal">gdk_pixbuf_animation_unref</code> has been deprecated since version 2.0 and should not be used in newly-written code. Use <code class="function">g_object_unref()</code>.</p>
197
197
</div>
198
198
<p>
199
199
Removes a reference from an animation.
252
252
<div class="refsect2">
253
253
<a name="gdk-pixbuf-animation-get-iter"></a><h3>gdk_pixbuf_animation_get_iter ()</h3>
254
254
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="returnvalue">GdkPixbufAnimationIter</span></a> * gdk_pixbuf_animation_get_iter  (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>,
255
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *start_time</code></em>);</pre>
 
255
                                                         <em class="parameter"><code>const <span class="type">GTimeVal</span> *start_time</code></em>);</pre>
256
256
<p>
257
257
Get an iterator for displaying an animation. The iterator provides
258
258
the frames that should be displayed at a given time.
259
 
It should be freed after use with <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>.
 
259
It should be freed after use with <code class="function">g_object_unref()</code>.
260
260
</p>
261
261
<p>
262
 
<em class="parameter"><code>start_time</code></em> would normally come from <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a>, and
 
262
<em class="parameter"><code>start_time</code></em> would normally come from <code class="function">g_get_current_time()</code>, and
263
263
marks the beginning of animation playback. After creating an
264
264
iterator, you should immediately display the pixbuf returned by
265
265
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-get-pixbuf" title="gdk_pixbuf_animation_iter_get_pixbuf ()"><code class="function">gdk_pixbuf_animation_iter_get_pixbuf()</code></a>. Then, you should install a
266
 
timeout (with <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-timeout-add"><code class="function">g_timeout_add()</code></a>) or by some other mechanism ensure
 
266
timeout (with <code class="function">g_timeout_add()</code>) or by some other mechanism ensure
267
267
that you'll update the image after
268
268
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-get-delay-time" title="gdk_pixbuf_animation_iter_get_delay_time ()"><code class="function">gdk_pixbuf_animation_iter_get_delay_time()</code></a> milliseconds. Each time
269
269
the image is updated, you should reinstall the timeout with the new,
270
270
possibly-changed delay time.
271
271
</p>
272
272
<p>
273
 
As a shortcut, if <em class="parameter"><code>start_time</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the result of
274
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a> will be used automatically.
 
273
As a shortcut, if <em class="parameter"><code>start_time</code></em> is <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>, the result of
 
274
<code class="function">g_get_current_time()</code> will be used automatically.
275
275
</p>
276
276
<p>
277
277
To update the image (i.e. possibly change the result of
283
283
after the delay time, you should also update it whenever you
284
284
receive the area_updated signal and
285
285
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-on-currently-loading-frame" title="gdk_pixbuf_animation_iter_on_currently_loading_frame ()"><code class="function">gdk_pixbuf_animation_iter_on_currently_loading_frame()</code></a> returns
286
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. In this case, the frame currently being fed into the loader
 
286
<code class="literal">TRUE</code>. In this case, the frame currently being fed into the loader
287
287
has received new data, so needs to be refreshed. The delay time for
288
288
a frame may also be modified after an area_updated signal, for
289
289
example if the delay time for a frame is encoded in the data after
316
316
<hr>
317
317
<div class="refsect2">
318
318
<a name="gdk-pixbuf-animation-is-static-image"></a><h3>gdk_pixbuf_animation_is_static_image ()</h3>
319
 
<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_animation_is_static_image
 
319
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gdk_pixbuf_animation_is_static_image
320
320
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
321
321
<p>
322
322
If you load a file with <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> and it turns
323
323
out to be a plain, unanimated image, then this function will return
324
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. Use <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> to retrieve
 
324
<code class="literal">TRUE</code>. Use <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> to retrieve
325
325
the image.
326
326
</p>
327
327
<div class="variablelist"><table border="0">
335
335
<tr>
336
336
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
337
337
<td>
338
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the "animation" was really just an image</td>
 
338
<code class="literal">TRUE</code> if the "animation" was really just an image</td>
339
339
</tr>
340
340
</tbody>
341
341
</table></div>
351
351
this function returns a reasonable thing to display as a static
352
352
unanimated image, which might be the first frame, or something more
353
353
sophisticated. If an animation hasn't loaded any frames yet, this
354
 
function will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
 
354
function will return <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
355
355
</p>
356
356
<div class="variablelist"><table border="0">
357
357
<col align="left" valign="top">
372
372
<hr>
373
373
<div class="refsect2">
374
374
<a name="gdk-pixbuf-animation-iter-advance"></a><h3>gdk_pixbuf_animation_iter_advance ()</h3>
375
 
<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_animation_iter_advance   (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>,
376
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *current_time</code></em>);</pre>
 
375
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gdk_pixbuf_animation_iter_advance   (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>,
 
376
                                                         <em class="parameter"><code>const <span class="type">GTimeVal</span> *current_time</code></em>);</pre>
377
377
<p>
378
378
Possibly advances an animation to a new frame. Chooses the frame based
379
379
on the start time passed to <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>.
380
380
</p>
381
381
<p>
382
 
<em class="parameter"><code>current_time</code></em> would normally come from <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a>, and
 
382
<em class="parameter"><code>current_time</code></em> would normally come from <code class="function">g_get_current_time()</code>, and
383
383
must be greater than or equal to the time passed to
384
384
<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>, and must increase or remain
385
385
unchanged each time <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-get-pixbuf" title="gdk_pixbuf_animation_iter_get_pixbuf ()"><code class="function">gdk_pixbuf_animation_iter_get_pixbuf()</code></a> is
387
387
play forward.
388
388
</p>
389
389
<p>
390
 
As a shortcut, pass <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the current time and <a href="http://library.gnome.org/devel/glib/unstable/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a>
 
390
As a shortcut, pass <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> for the current time and <code class="function">g_get_current_time()</code>
391
391
will be invoked on your behalf. So you only need to explicitly pass
392
392
<em class="parameter"><code>current_time</code></em> if you're doing something odd like playing the animation
393
393
at double speed.
394
394
</p>
395
395
<p>
396
 
If this function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, there's no need to update the animation
 
396
If this function returns <code class="literal">FALSE</code>, there's no need to update the animation
397
397
display, assuming the display had been rendered prior to advancing;
398
 
if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, you need to call <code class="function">gdk_animation_iter_get_pixbuf()</code> and update the
 
398
if <code class="literal">TRUE</code>, you need to call <code class="function">gdk_animation_iter_get_pixbuf()</code> and update the
399
399
display with the new pixbuf.
400
400
</p>
401
401
<div class="variablelist"><table border="0">
413
413
<tr>
414
414
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
415
415
<td>
416
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the image may need updating</td>
 
416
<code class="literal">TRUE</code> if the image may need updating</td>
417
417
</tr>
418
418
</tbody>
419
419
</table></div>
425
425
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>);</pre>
426
426
<p>
427
427
Gets the number of milliseconds the current pixbuf should be displayed,
428
 
or -1 if the current pixbuf should be displayed forever. <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-timeout-add"><code class="function">g_timeout_add()</code></a>
 
428
or -1 if the current pixbuf should be displayed forever. <code class="function">g_timeout_add()</code>
429
429
conveniently takes a timeout in milliseconds, so you can use a timeout
430
430
to schedule the next update.
431
431
</p>
446
446
<hr>
447
447
<div class="refsect2">
448
448
<a name="gdk-pixbuf-animation-iter-on-currently-loading-frame"></a><h3>gdk_pixbuf_animation_iter_on_currently_loading_frame ()</h3>
449
 
<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_animation_iter_on_currently_loading_frame
 
449
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gdk_pixbuf_animation_iter_on_currently_loading_frame
450
450
                                                        (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>);</pre>
451
451
<p>
452
452
Used to determine how to respond to the area_updated signal on
466
466
<tr>
467
467
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
468
468
<td>
469
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the frame we're on is partially loaded, or the last frame</td>
 
469
<code class="literal">TRUE</code> if the frame we're on is partially loaded, or the last frame</td>
470
470
</tr>
471
471
</tbody>
472
472
</table></div>
515
515
<hr>
516
516
<div class="refsect2">
517
517
<a name="gdk-pixbuf-simple-anim-new"></a><h3>gdk_pixbuf_simple_anim_new ()</h3>
518
 
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="returnvalue">GdkPixbufSimpleAnim</span></a> * gdk_pixbuf_simple_anim_new        (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
519
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
520
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> rate</code></em>);</pre>
 
518
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="returnvalue">GdkPixbufSimpleAnim</span></a> * gdk_pixbuf_simple_anim_new        (<em class="parameter"><code><span class="type">gint</span> width</code></em>,
 
519
                                                         <em class="parameter"><code><span class="type">gint</span> height</code></em>,
 
520
                                                         <em class="parameter"><code><span class="type">gfloat</span> rate</code></em>);</pre>
521
521
<p>
522
522
Creates a new, empty animation.
523
523
</p>
575
575
<div class="refsect2">
576
576
<a name="gdk-pixbuf-simple-anim-set-loop"></a><h3>gdk_pixbuf_simple_anim_set_loop ()</h3>
577
577
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_pixbuf_simple_anim_set_loop     (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>,
578
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> loop</code></em>);</pre>
 
578
                                                         <em class="parameter"><code><span class="type">gboolean</span> loop</code></em>);</pre>
579
579
<p>
580
580
Sets whether <em class="parameter"><code>animation</code></em> should loop indefinitely when it reaches the end.
581
581
</p>
598
598
<hr>
599
599
<div class="refsect2">
600
600
<a name="gdk-pixbuf-simple-anim-get-loop"></a><h3>gdk_pixbuf_simple_anim_get_loop ()</h3>
601
 
<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_simple_anim_get_loop     (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>);</pre>
 
601
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gdk_pixbuf_simple_anim_get_loop     (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>);</pre>
602
602
<p>
603
603
Gets whether <em class="parameter"><code>animation</code></em> should loop indefinitely when it reaches the end.
604
604
</p>
613
613
<tr>
614
614
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
615
615
<td>
616
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the animation loops forever, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
 
616
<code class="literal">TRUE</code> if the animation loops forever, <code class="literal">FALSE</code> otherwise</td>
617
617
</tr>
618
618
</tbody>
619
619
</table></div>
624
624
<a name="gdk-pixbuf-Animations.property-details"></a><h2>Property Details</h2>
625
625
<div class="refsect2">
626
626
<a name="GdkPixbufSimpleAnim--loop"></a><h3>The <code class="literal">"loop"</code> property</h3>
627
 
<pre class="programlisting">  "loop"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
 
627
<pre class="programlisting">  "loop"                     <span class="type">gboolean</span>              : Read / Write</pre>
628
628
<p>
629
629
Whether the animation should loop when it reaches the end.
630
630
</p>