gdk-sharp 2.10.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. A base class for animations that are rendered using GLib.Object Method Gdk.PixbufAnimationIter 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 g_object_unref(). A A to move over the animation

would normally come from g_get_current_time() (FIXME: this function isn't bound into C#; this needs a look), and marks the beginning of animation playback. After creating an iterator, you should immediately display the pixbuf returned by . Then, you should install a timeout (with g_timeout_add() (FIXME)) or by some other mechanism ensure that you'll update the image after milliseconds. Each time the image is updated, you should reinstall the timeout with the new, possibly-changed delay time.

As a shortcut, if is , the result of g_get_current_time() will be used automatically.

To update the image (i.e. possibly change the result of gdk_pixbuf_animation_iter_get_pixbuf() to a new frame of the animation), call gdk_pixbuf_animation_iter_advance().

If you're using , in addition to updating the image after the delay time, you should also update it whenever you receive the area_updated signal and returns true. 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 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 signal.

A delay time of -1 is possible, indicating "infinite."

Constructor Internal constructor Pointer to the C object. This is an internal constructor, and should not be used by user code. Constructor Public constructor; 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 and domains. A , the filename to load into this object. Property System.Int32 The width of the animation. A Property Gdk.Pixbuf Gets the image if this animation is actually a static, unanimaged file. A Property System.Int32 The height of the animation. A Property System.Boolean If you load a file with and it turns out to be a plain, unanimated image, then this function will return TRUE. Use to retrieve the image. a Property GLib.GType GType Property. a Returns the native value for . Constructor Internal constructor a This is a constructor used by derivative types of that would have their own GLib.GType assigned to it. This is not typically used by C# code. System.Obsolete(Message=null, IsError=False) Method Gdk.PixbufAnimation To be added a To be added Method System.Void To be added To be added Method Gdk.PixbufAnimation Loads a pixbuf from a resource file. the name of the resource a This loads an animation from a resource in the calling assembly. This is equivalent to using the constructor with a assembly. Constructor Makes a new animation object from a . a Useful for creating an animation from an image file that resides in memory. /* buffer containing an image */ System.Byte[] buffer = new System.Byte[256]; /* create a memory stream to the buffer */ System.IO.MemoryStream memorystream = new System.IO.MemoryStream(buffer); /* create an animation from the stream as if it was a file */ Gdk.PixbufAnimation pba = new Gdk.PixbufAnimation(memorystream); Constructor Constructor for images embedded in an assembly The that contains the image. If the value is , the image will be looked up on the calling assembly. The name given as the resource in the assembly This method is used to construct a from an embedded resource in an assembly. Typically this is used when application developers want to distribute images in a single executable. If the assembly parameter is , the image will be looked up on the calling assembly. For example: Gdk.PixbufAnimation p = new PixbufAnimation (null, "anim.gif"); Compile with: mcs -resource:anim.gif sample.cs