This file is indexed.

/usr/share/gtk-doc/html/pygtk/class-gdkpixbufanimation.html is in python-gtk2-doc 2.24.0-4ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.PixbufAnimation</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gdk-class-reference.html" title="The gtk.gdk Class Reference"><link rel="prev" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><link rel="next" href="class-gdkpixbufanimationiter.html" title="gtk.gdk.PixbufAnimationIter"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.gdk.PixbufAnimation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkpixbuf.html">Prev</a> </td><th width="60%" align="center">The gtk.gdk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gdkpixbufanimationiter.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.gdk.PixbufAnimation"><a name="class-gdkpixbufanimation"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.PixbufAnimation</h2><p>gtk.gdk.PixbufAnimation — an object holding an animation</p></div><div class="refsect1" title="Synopsis"><a name="id3073423"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.PixbufAnimation</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gdkpixbufanimation.html#constructor-gdkpixbufanimation" title="Constructor">gtk.gdk.PixbufAnimation</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkpixbufanimation.html#method-gdkpixbufanimation--get-width" title="gtk.gdk.PixbufAnimation.get_width">get_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkpixbufanimation.html#method-gdkpixbufanimation--get-height" title="gtk.gdk.PixbufAnimation.get_height">get_height</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkpixbufanimation.html#method-gdkpixbufanimation--is-static-image" title="gtk.gdk.PixbufAnimation.is_static_image">is_static_image</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkpixbufanimation.html#method-gdkpixbufanimation--get-static-image" title="gtk.gdk.PixbufAnimation.get_static_image">get_static_image</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkpixbufanimation.html#method-gdkpixbufanimation--get-iter" title="gtk.gdk.PixbufAnimation.get_iter">get_iter</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_time</code></strong></span><span class="initializer">=0.0</span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3073588"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
  +-- <a class="link" href="class-gdkpixbufanimation.html" title="gtk.gdk.PixbufAnimation">gtk.gdk.PixbufAnimation</a>
</pre></div><div class="refsect1" title="Description"><a name="id3073613"></a><h2>Description</h2><p>A <a class="link" href="class-gdkpixbufanimation.html" title="gtk.gdk.PixbufAnimation"><code class="classname">gtk.gdk.PixbufAnimation</code></a> 
is an object that holds an animation. An animation is conceptually a series
of frames to be displayed over time. Each frame is the same size. 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, you just ask a <a class="link" href="class-gdkpixbufanimationiter.html" title="gtk.gdk.PixbufAnimationIter"><code class="classname">gtk.gdk.PixbufAnimationIter</code></a> 
for the next frame that should be displayed at a given point in time.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gdkpixbufanimation"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.gdk.PixbufAnimation</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filename</code></strong> :</span></p></td><td>the name of the file to
load.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gdkpixbufanimation.html" title="gtk.gdk.PixbufAnimation"><code class="classname">gtk.gdk.PixbufAnimation</code></a>
	object.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gdkpixbufanimation.html" title="gtk.gdk.PixbufAnimation"><code class="classname">gtk.gdk.PixbufAnimation</code></a> 
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.</p><p>This constructor raises the GError exception if any of several
error conditions occurred: 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 class="refsect1" title="Methods"><a name="id3073746"></a><h2>Methods</h2><div class="refsect2" title="gtk.gdk.PixbufAnimation.get_width"><a name="method-gdkpixbufanimation--get-width"></a><h3>gtk.gdk.PixbufAnimation.get_width</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_width</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the width of the bounding box of the
animation.</td></tr></tbody></table><p>The <code class="methodname">get_width</code>() method returns the
width of the bounding box of a pixbuf animation.</p></div><div class="refsect2" title="gtk.gdk.PixbufAnimation.get_height"><a name="method-gdkpixbufanimation--get-height"></a><h3>gtk.gdk.PixbufAnimation.get_height</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_height</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the height of the bounding box of the
animation.</td></tr></tbody></table><p>The <code class="methodname">get_height</code>() method returns the
height of the bounding box of a pixbuf animation.</p></div><div class="refsect2" title="gtk.gdk.PixbufAnimation.is_static_image"><a name="method-gdkpixbufanimation--is-static-image"></a><h3>gtk.gdk.PixbufAnimation.is_static_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_static_image</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the "animation" was
really just an image</td></tr></tbody></table><p>The <code class="methodname">is_static_image</code>() method returns
True if you load a file containing a plain, unanimated image. Use the <a class="link" href="class-gdkpixbufanimation.html#method-gdkpixbufanimation--get-static-image" title="gtk.gdk.PixbufAnimation.get_static_image"><code class="methodname">get_static_image</code>()</a> 
method to retrieve the image.</p></div><div class="refsect2" title="gtk.gdk.PixbufAnimation.get_static_image"><a name="method-gdkpixbufanimation--get-static-image"></a><h3>gtk.gdk.PixbufAnimation.get_static_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_static_image</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the unanimated image representing the
animation</td></tr></tbody></table><p>The <code class="methodname">get_static_image</code>() method returns a
<a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
that represents a static image of the animation. If the animation is really
just a plain image (has only one frame), this method returns that image. If
the animation is an animation, this method 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 method will return <code class="literal">None</code>.</p></div><div class="refsect2" title="gtk.gdk.PixbufAnimation.get_iter"><a name="method-gdkpixbufanimation--get-iter"></a><h3>gtk.gdk.PixbufAnimation.get_iter</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_iter</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start_time</code></strong></span><span class="initializer">=0.0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>start_time</code></strong> :</span></p></td><td>the time when the animation starts
playing</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkpixbufanimationiter.html" title="gtk.gdk.PixbufAnimationIter"><code class="classname">gtk.gdk.PixbufAnimationIter</code></a> 
object</td></tr></tbody></table><p>The <code class="methodname">get_iter</code>() method returns a <a class="link" href="class-gdkpixbufanimationiter.html" title="gtk.gdk.PixbufAnimationIter"><code class="classname">gtk.gdk.PixbufAnimationIter</code></a> 
that is used to access the frames of the animation. The iterator provides
the frames that should be displayed at specific times.
<em class="parameter"><code>start_time</code></em> is the start time specified as a float as
output from the Python time.time() function.
<em class="parameter"><code>start_time</code></em> marks the beginning of the animation
playback. After creating an iterator, you should immediately display the
pixbuf returned by the <a class="link" href="class-gdkpixbufanimationiter.html#method-gdkpixbufanimationiter--get-pixbuf" title="gtk.gdk.PixbufAnimationIter.get_pixbuf"><code class="methodname">gtk.gdk.PixbufAnimationIter.get_pixbuf</code>()</a> 
method. Then, you should install a timeout (with the <PYGTKDOCLINK HREF="function-gobject--timeout-add"><code class="methodname">gobject.timeout_add</code>()</PYGTKDOCLINK>() 
function) or by some other mechanism ensure that you'll update the image
after the number of  milliseconds specified by the <a class="link" href="class-gdkpixbufanimationiter.html#method-gdkpixbufanimationiter--get-delay-time" title="gtk.gdk.PixbufAnimationIter.get_delay_time"><code class="methodname">gtk.gdk.PixbufAnimationIter.get_delay_time</code>()</a> 
method. Each time the image is updated, you should reinstall the timeout
with the new, possibly-changed delay time. As a shortcut, if
<em class="parameter"><code>start_time</code></em> is 0.0 (the default), the current time
will be used.</p><p>To update the image (i.e. possibly change the result of the
<a class="link" href="class-gdkpixbufanimationiter.html#method-gdkpixbufanimationiter--get-pixbuf" title="gtk.gdk.PixbufAnimationIter.get_pixbuf"><code class="methodname">gtk.gdk.PixbufAnimationIter.get_pixbuf</code>()</a> 
method to a new frame of the animation), call the <a class="link" href="class-gdkpixbufanimationiter.html#method-gdkpixbufanimationiter--advance" title="gtk.gdk.PixbufAnimationIter.advance"><code class="methodname">gtk.gdk.PixbufAnimationIter.advance</code>()</a> 
method.</p><p>If you're using a <a class="link" href="class-gdkpixbufloader.html" title="gtk.gdk.PixbufLoader"><code class="classname">gtk.gdk.PixbufLoader</code></a>, 
in addition to updating the image after the delay time, you should also
update it whenever you receive the "area_updated" signal and the <a class="link" href="class-gdkpixbufanimationiter.html#method-gdkpixbufanimationiter--on-currently-loading-frame" title="gtk.gdk.PixbufAnimationIter.on_currently_loading_frame"><code class="methodname">gtk.gdk.PixbufAnimationIter.on_currently_loading_frame</code>()</a> 
method returns <code class="literal">True</code>. 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. A delay time of -1 is possible, indicating
"infinite."</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gdkpixbuf.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gdk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gdkpixbufanimationiter.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.Pixbuf </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.gdk.PixbufAnimationIter</td></tr></table></div></body></html>