Description
The gdk-pixbuf library provides a simple mechanism to load and
represent animations, primarily animated GIF files. Animations
are represented as lists of GdkPixbufFrame structures. Each
frame structure contains a GdkPixbuf structure and information
about the frame's overlay mode and duration.
Details
enum GdkPixbufFrameAction
typedef enum {
GDK_PIXBUF_FRAME_RETAIN,
GDK_PIXBUF_FRAME_DISPOSE,
GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction; |
Each animation frame can have several things happen to it when the
next frame is displayed. The GdkPixbufFrameAction determines
this. These are essentially the overlay modes supported by GIF
animations.
struct GdkPixbufFrame
This structure describes a frame in a GdkPixbufAnimation. Each
frame consists of a GdkPixbuf, an offset of the frame within the
animation's bounding box, a duration, and an overlay mode or
action.
struct GdkPixbufAnimation
struct GdkPixbufAnimation; |
This structure describes an animation, which is represented as a
list of GdkPixbufFrame structures.
gdk_pixbuf_animation_new_from_file ()
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 GDK_PIXBUF_ERROR and G_FILE_ERROR domains.
gdk_pixbuf_animation_ref ()
Adds a reference to an animation. Deprecated; use
g_object_ref(). The reference must be released afterwards using
g_object_unref().
gdk_pixbuf_animation_unref ()
Removes a reference from an animation. Deprecated; use g_object_unref().
gdk_pixbuf_animation_get_frames ()
Queries the list of frames of an animation.
gdk_pixbuf_animation_get_width ()
Queries the width of the bounding box of a pixbuf animation.
gdk_pixbuf_animation_get_num_frames ()
Queries the number of frames in a pixbuf animation.
gdk_pixbuf_animation_get_height ()
Queries the height of the bounding box of a pixbuf animation.
gdk_pixbuf_frame_free ()
Frees a GdkPixbufFrame. Don't do this with frames you got from
GdkPixbufAnimation, usually the animation owns those (it doesn't
make a copy before returning the frame).
gdk_pixbuf_frame_get_pixbuf ()
Queries the pixbuf of an animation frame.
gdk_pixbuf_frame_get_action ()
Queries the overlay action of an animation frame.
gdk_pixbuf_frame_get_y_offset ()
Queries the Y offset of an animation frame.
gdk_pixbuf_frame_get_delay_time ()
Queries the delay time in milliseconds of an animation frame.
gdk_pixbuf_frame_get_x_offset ()
Queries the X offset of an animation frame.