Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Animations: GDK-PixBuf Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="gdk-pixbuf-Utilities.html" title="Utilities">
<link rel="next" href="GdkPixbufLoader.html" title="GdkPixbufLoader">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdk-pixbuf-Animations.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#gdk-pixbuf-Animations.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#gdk-pixbuf-Animations.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdk-pixbuf-Utilities.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GdkPixbufLoader.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdk-pixbuf-Animations"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk-pixbuf-Animations.top_of_page"></a>Animations</span></h2>
<p>Animations — Animated images.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-file" title="gdk_pixbuf_animation_new_from_file ()">gdk_pixbuf_animation_new_from_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-resource" title="gdk_pixbuf_animation_new_from_resource ()">gdk_pixbuf_animation_new_from_resource</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-stream" title="gdk_pixbuf_animation_new_from_stream ()">gdk_pixbuf_animation_new_from_stream</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-stream-async" title="gdk_pixbuf_animation_new_from_stream_async ()">gdk_pixbuf_animation_new_from_stream_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-stream-finish" title="gdk_pixbuf_animation_new_from_stream_finish ()">gdk_pixbuf_animation_new_from_stream_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-ref" title="gdk_pixbuf_animation_ref ()">gdk_pixbuf_animation_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-unref" title="gdk_pixbuf_animation_unref ()">gdk_pixbuf_animation_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="returnvalue">GdkPixbufAnimationIter</span></a> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="returnvalue">GdkPixbufSimpleAnim</span></a> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim--loop" title="The “loop” property">loop</a></td>
<td class="property_flags">Read / Write</td>
</tr></tbody>
</table></div>
</div>
<a name="GdkPixbufAnimation"></a><a name="GdkPixbufAnimationIter"></a><a name="GdkPixbufSimpleAnim"></a><div class="refsect1">
<a name="gdk-pixbuf-Animations.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation-struct" title="struct GdkPixbufAnimation">GdkPixbufAnimation</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter-struct" title="struct GdkPixbufAnimationIter">GdkPixbufAnimationIter</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim-struct" title="GdkPixbufSimpleAnim">GdkPixbufSimpleAnim</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">├──</span> GdkPixbufAnimation
    <span class="lineart">│</span>   <span class="lineart">╰──</span> GdkPixbufSimpleAnim
    <span class="lineart">╰──</span> GdkPixbufAnimationIter
</pre>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.description"></a><h2>Description</h2>
<p>The GdkPixBuf library provides a simple mechanism to load and
represent animations. An animation is conceptually a series of
frames to be displayed over time. The animation may not be
represented as a series of frames internally; for example, it may
be stored as a sprite and instructions for moving the sprite around
a background. To display an animation you don't need to understand
its representation, however; you just ask GdkPixBuf what should
be displayed at a given point in time.</p>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-pixbuf-animation-new-from-file"></a><h3>gdk_pixbuf_animation_new_from_file ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
gdk_pixbuf_animation_new_from_file (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
                                    <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new animation by loading it from a file. The file format is
detected automatically. If the file's format does not support multi-frame
images, then an animation with a single frame will be created. Possible errors
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="../glib/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domains.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>Name of file to load, in the GLib file name encoding</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-file.returns"></a><h4>Returns</h4>
<p> A newly-created animation with a reference count of 1, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
if any of several error conditions ocurred:  the file could not be opened,
there was no loader for the file's format, there was not enough memory to
allocate the image buffer, or the image file contained invalid data.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-new-from-resource"></a><h3>gdk_pixbuf_animation_new_from_resource ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
gdk_pixbuf_animation_new_from_resource
                               (<em class="parameter"><code>const <span class="type">char</span> *resource_path</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new pixbuf animation by loading an image from an resource.</p>
<p>The file format is detected automatically. If <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned, then
<em class="parameter"><code>error</code></em>
 will be set.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-resource.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>resource_path</p></td>
<td class="parameter_description"><p>the path of the resource file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for an error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-resource.returns"></a><h4>Returns</h4>
<p> A newly-created animation, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if any of several error
conditions occurred: the file could not be opened, the image format is
not supported, there was not enough memory to allocate the image buffer,
the stream contained invalid data, or the operation was cancelled.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-new-from-stream"></a><h3>gdk_pixbuf_animation_new_from_stream ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
gdk_pixbuf_animation_new_from_stream (<em class="parameter"><code><a href="../gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> *stream</code></em>,
                                      <em class="parameter"><code><a href="../gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                      <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new animation by loading it from an input stream.</p>
<p>The file format is detected automatically. If <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned, then
<em class="parameter"><code>error</code></em>
 will be set. The <em class="parameter"><code>cancellable</code></em>
 can be used to abort the operation
from another thread. If the operation was cancelled, the error
<a href="../gio/gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be returned. Other possible errors 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="../gio/gio-GIOError.html#G-IO-ERROR:CAPS"><code class="literal">G_IO_ERROR</code></a> domains.</p>
<p>The stream is not closed.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-stream.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>a <a href="../gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> to load the pixbuf from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> optional <a href="../gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for an error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-stream.returns"></a><h4>Returns</h4>
<p> A newly-created pixbuf, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if any of several error
conditions occurred: the file could not be opened, the image format is
not supported, there was not enough memory to allocate the image buffer,
the stream contained invalid data, or the operation was cancelled.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-new-from-stream-async"></a><h3>gdk_pixbuf_animation_new_from_stream_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_pixbuf_animation_new_from_stream_async
                               (<em class="parameter"><code><a href="../gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> *stream</code></em>,
                                <em class="parameter"><code><a href="../gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                <em class="parameter"><code><a href="../gio/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Creates a new animation by asynchronously loading an image from an input stream.</p>
<p>For more details see <a class="link" href="gdk-pixbuf-File-Loading.html#gdk-pixbuf-new-from-stream" title="gdk_pixbuf_new_from_stream ()"><code class="function">gdk_pixbuf_new_from_stream()</code></a>, which is the synchronous
version of this function.</p>
<p>When the operation is finished, <em class="parameter"><code>callback</code></em>
 will be called in the main thread.
You can then call <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-stream-finish" title="gdk_pixbuf_animation_new_from_stream_finish ()"><code class="function">gdk_pixbuf_animation_new_from_stream_finish()</code></a> to get the
result of the operation.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-stream-async.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>a <a href="../gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> from which to load the animation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> optional <a href="../gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>a <a href="../gio/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> to call when the pixbuf is loaded</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to the callback function</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-new-from-stream-finish"></a><h3>gdk_pixbuf_animation_new_from_stream_finish ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> *
gdk_pixbuf_animation_new_from_stream_finish
                               (<em class="parameter"><code><a href="../gio/GAsyncResult.html#GAsyncResult-struct"><span class="type">GAsyncResult</span></a> *async_result</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finishes an asynchronous pixbuf animation creation operation started with
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-stream-async" title="gdk_pixbuf_animation_new_from_stream_async ()"><code class="function">gdk_pixbuf_animation_new_from_stream_async()</code></a>.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-stream-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>async_result</p></td>
<td class="parameter_description"><p>a <a href="../gio/GAsyncResult.html#GAsyncResult-struct"><span class="type">GAsyncResult</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-new-from-stream-finish.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. Free the returned
object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-ref"></a><h3>gdk_pixbuf_animation_ref ()</h3>
<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>
<div class="warning">
<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.</p>
<p>Use <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>.</p>
</div>
<p>Adds a reference to an animation.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>An animation.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-ref.returns"></a><h4>Returns</h4>
<p> The same as the <em class="parameter"><code>animation</code></em>
argument.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-unref"></a><h3>gdk_pixbuf_animation_unref ()</h3>
<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>
<div class="warning">
<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.</p>
<p>Use <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p>Removes a reference from an animation.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>An animation.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-get-width"></a><h3>gdk_pixbuf_animation_get_width ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
gdk_pixbuf_animation_get_width (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
<p>Queries the width of the bounding box of a pixbuf animation.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-width.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>An animation.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-width.returns"></a><h4>Returns</h4>
<p> Width of the bounding box of the animation.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-get-height"></a><h3>gdk_pixbuf_animation_get_height ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
gdk_pixbuf_animation_get_height (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
<p>Queries the height of the bounding box of a pixbuf animation.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-height.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>An animation.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-height.returns"></a><h4>Returns</h4>
<p> Height of the bounding box of the animation.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-get-iter"></a><h3>gdk_pixbuf_animation_get_iter ()</h3>
<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>,
                               <em class="parameter"><code>const <a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *start_time</code></em>);</pre>
<p>Get an iterator for displaying an animation. The iterator provides
the frames that should be displayed at a given time. It should be
freed after use with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
<p><em class="parameter"><code>start_time</code></em>
 would normally come from <a href="../glib/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a>, and marks
the beginning of animation playback. After creating an iterator, you
should immediately display the pixbuf returned by
<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 timeout (with <a href="../glib/glib-The-Main-Event-Loop.html#g-timeout-add"><code class="function">g_timeout_add()</code></a>) or by some other mechanism ensure
that you'll update the image after
<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
the image is updated, you should reinstall the timeout with the new,
possibly-changed delay time.</p>
<p>As a shortcut, if <em class="parameter"><code>start_time</code></em>
 is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the result of
<a href="../glib/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a> will be used automatically.</p>
<p>To update the image (i.e. possibly change the result of
<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> to a new frame of the animation),
call <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-advance" title="gdk_pixbuf_animation_iter_advance ()"><code class="function">gdk_pixbuf_animation_iter_advance()</code></a>.</p>
<p>If you're using <a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a>, in addition to updating the image
after the delay time, you should also update it whenever you
receive the area_updated signal and
<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
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. In this case, the frame currently being fed into the loader
has received new data, so needs to be refreshed. The delay time for
a frame may also be modified after an area_updated signal, for
example if the delay time for a frame is encoded in the data after
the frame itself. So your timeout should be reinstalled after any
area_updated signal.</p>
<p>A delay time of -1 is possible, indicating "infinite."</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-iter.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>start_time</p></td>
<td class="parameter_description"><p> time when the animation starts playing. </p></td>
<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>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-iter.returns"></a><h4>Returns</h4>
<p> an iterator to move over the animation. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-is-static-image"></a><h3>gdk_pixbuf_animation_is_static_image ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gdk_pixbuf_animation_is_static_image (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
<p>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 out to be a plain, unanimated image, then this function will
return <a href="../glib/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
the image.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-is-static-image.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-is-static-image.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the "animation" was really just an image</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-get-static-image"></a><h3>gdk_pixbuf_animation_get_static_image ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
gdk_pixbuf_animation_get_static_image (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
<p>If an animation is really just a plain image (has only one frame),
this function returns that image. If the animation is an animation,
this function returns a reasonable thing to display as a static
unanimated image, which might be the first frame, or something more
sophisticated. If an animation hasn't loaded any frames yet, this
function will return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-static-image.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-get-static-image.returns"></a><h4>Returns</h4>
<p> unanimated image representing the animation. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-iter-advance"></a><h3>gdk_pixbuf_animation_iter_advance ()</h3>
<pre class="programlisting"><a href="../glib/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>,
                                   <em class="parameter"><code>const <a href="../glib/glib-Date-and-Time-Functions.html#GTimeVal"><span class="type">GTimeVal</span></a> *current_time</code></em>);</pre>
<p>Possibly advances an animation to a new frame. Chooses the frame based
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>.</p>
<p><em class="parameter"><code>current_time</code></em>
 would normally come from <a href="../glib/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a>, and
must be greater than or equal to the 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>, and must increase or remain
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
called. That is, you can't go backward in time; animations only
play forward.</p>
<p>As a shortcut, pass <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the current time and <a href="../glib/glib-Date-and-Time-Functions.html#g-get-current-time"><code class="function">g_get_current_time()</code></a>
will be invoked on your behalf. So you only need to explicitly pass
<em class="parameter"><code>current_time</code></em>
 if you're doing something odd like playing the animation
at double speed.</p>
<p>If this function returns <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, there's no need to update the animation
display, assuming the display had been rendered prior to advancing;
if <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, you need to call <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>
and update the display with the new pixbuf.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-advance.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>current_time</p></td>
<td class="parameter_description"><p> current time. </p></td>
<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>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-advance.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the image may need updating</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-iter-get-delay-time"></a><h3>gdk_pixbuf_animation_iter_get_delay_time ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
gdk_pixbuf_animation_iter_get_delay_time
                               (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>);</pre>
<p>Gets the number of milliseconds the current pixbuf should be displayed,
or -1 if the current pixbuf should be displayed forever. <a href="../glib/glib-The-Main-Event-Loop.html#g-timeout-add"><code class="function">g_timeout_add()</code></a>
conveniently takes a timeout in milliseconds, so you can use a timeout
to schedule the next update.</p>
<p>Note that some formats, like GIF, might clamp the timeout values in the
image file to avoid updates that are just too quick. The minimum timeout
for GIF images is currently 20 milliseconds.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-get-delay-time.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>an animation iterator</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-get-delay-time.returns"></a><h4>Returns</h4>
<p> delay time in milliseconds (thousandths of a second)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-iter-on-currently-loading-frame"></a><h3>gdk_pixbuf_animation_iter_on_currently_loading_frame ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gdk_pixbuf_animation_iter_on_currently_loading_frame
                               (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>);</pre>
<p>Used to determine how to respond to the area_updated signal on
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> when loading an animation. area_updated is emitted
for an area of the frame currently streaming in to the loader. So if
you're on the currently loading frame, you need to redraw the screen for
the updated area.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-on-currently-loading-frame.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-on-currently-loading-frame.returns"></a><h4>Returns</h4>
<p> <a href="../glib/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</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-animation-iter-get-pixbuf"></a><h3>gdk_pixbuf_animation_iter_get_pixbuf ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
gdk_pixbuf_animation_iter_get_pixbuf (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufAnimationIter"><span class="type">GdkPixbufAnimationIter</span></a> *iter</code></em>);</pre>
<p>Gets the current pixbuf which should be displayed; the pixbuf might not
be the same size as the animation itself
(<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-width" title="gdk_pixbuf_animation_get_width ()"><code class="function">gdk_pixbuf_animation_get_width()</code></a>, <a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-get-height" title="gdk_pixbuf_animation_get_height ()"><code class="function">gdk_pixbuf_animation_get_height()</code></a>).
This pixbuf should be displayed for
<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. The caller
of this function does not own a reference to the returned pixbuf;
the returned pixbuf will become invalid when the iterator advances
to the next frame, which may happen anytime you call
<a class="link" href="gdk-pixbuf-Animations.html#gdk-pixbuf-animation-iter-advance" title="gdk_pixbuf_animation_iter_advance ()"><code class="function">gdk_pixbuf_animation_iter_advance()</code></a>. Copy the pixbuf to keep it
(don't just add a reference), as it may get recycled as you advance
the iterator.</p>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-get-pixbuf.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>an animation iterator</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-animation-iter-get-pixbuf.returns"></a><h4>Returns</h4>
<p> the pixbuf to be displayed. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-simple-anim-new"></a><h3>gdk_pixbuf_simple_anim_new ()</h3>
<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="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
                            <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                            <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> rate</code></em>);</pre>
<p>Creates a new, empty animation.</p>
<div class="refsect3">
<a name="gdk-pixbuf-simple-anim-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>the width of the animation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>the height of the animation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rate</p></td>
<td class="parameter_description"><p>the speed of the animation, in frames per second</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-simple-anim-new.returns"></a><h4>Returns</h4>
<p> a newly allocated <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> </p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-simple-anim-add-frame"></a><h3>gdk_pixbuf_simple_anim_add_frame ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_pixbuf_simple_anim_add_frame (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a> *animation</code></em>,
                                  <em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
<p>Adds a new frame to <em class="parameter"><code>animation</code></em>
. The <em class="parameter"><code>pixbuf</code></em>
 must
have the dimensions specified when the animation 
was constructed.</p>
<div class="refsect3">
<a name="gdk-pixbuf-simple-anim-add-frame.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pixbuf</p></td>
<td class="parameter_description"><p>the pixbuf to add </p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-simple-anim-set-loop"></a><h3>gdk_pixbuf_simple_anim_set_loop ()</h3>
<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>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> loop</code></em>);</pre>
<p>Sets whether <em class="parameter"><code>animation</code></em>
 should loop indefinitely when it reaches the end.</p>
<div class="refsect3">
<a name="gdk-pixbuf-simple-anim-set-loop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>loop</p></td>
<td class="parameter_description"><p>whether to loop the animation</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-simple-anim-get-loop"></a><h3>gdk_pixbuf_simple_anim_get_loop ()</h3>
<pre class="programlisting"><a href="../glib/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>
<p>Gets whether <em class="parameter"><code>animation</code></em>
 should loop indefinitely when it reaches the end.</p>
<div class="refsect3">
<a name="gdk-pixbuf-simple-anim-get-loop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>animation</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Animations.html#GdkPixbufSimpleAnim"><span class="type">GdkPixbufSimpleAnim</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pixbuf-simple-anim-get-loop.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the animation loops forever, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: 2.18</p>
</div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkPixbufAnimation-struct"></a><h3>struct GdkPixbufAnimation</h3>
<pre class="programlisting">struct GdkPixbufAnimation;</pre>
<p>An opaque struct representing an animation.</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkPixbufAnimationIter-struct"></a><h3>struct GdkPixbufAnimationIter</h3>
<pre class="programlisting">struct GdkPixbufAnimationIter;</pre>
<p>An opaque struct representing an iterator which points to a
certain position in an animation.</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkPixbufSimpleAnim-struct"></a><h3>GdkPixbufSimpleAnim</h3>
<pre class="programlisting">typedef struct _GdkPixbufSimpleAnim GdkPixbufSimpleAnim;</pre>
<p>An opaque struct representing a simple animation.</p>
</div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GdkPixbufSimpleAnim--loop"></a><h3>The <code class="literal">“loop”</code> property</h3>
<pre class="programlisting">  “loop”                     <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether the animation should loop when it reaches the end.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: 2.18</p>
</div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Animations.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a>.</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>