forked from AuroraMiddleware/gtk
6e3522ab2c
2000-01-01 Federico Mena Quintero <federico@helixcode.com> * gdk-pixbuf/gdk-pixbuf.h (GdkPixbufAnimation): Added reference counting to animations. A web browser may want to share a single copy of an animated GIF if it appears multiple times in a web page, for example. * gdk-pixbuf/gdk-pixbuf-animation.c: New file. Moved the animation functions here. (gdk_pixbuf_animation_new_from_file): Prettified. Return a NULL animation if the loader does not support multiframe loading and the single-frame load returned NULL. Check that the filename is not NULL. Updated inline documentation. (gdk_pixbuf_animation_ref): New function. (gdk_pixbuf_animation_unref): New function. Removed gdk_pixbuf_animation_destroy() in favor of reference counting. * gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Prettified. Made ref_count assertion more paranoid. Check that the filename is not NULL. (gdk_pixbuf_get_module): Use guchar * and guint for buffer and size, respectively. (gdk_pixbuf_new_from_xpm_data): Changed the "data" argument to const char **. * gdk-pixbuf/io-gif.c (image_load_animation): Create the animation with a reference count of 1. * gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_SOURCES): Added gdk-pixbuf-animation.c. * doc/tmpl/animation.sgml: Populated. It is still missing a description of the overlay modes. * doc/gdk-pixbuf-sections.txt: Added the animation section. Moved the canvas item section to the end, as it will be moved later to gnome-libs. * doc/gdk-pixbuf.sgml: Added the animation section. * doc/Makefile.am (tmpl_sources): Added tmpl/animation.sgml.
87 lines
1.9 KiB
Plaintext
87 lines
1.9 KiB
Plaintext
<!-- ##### SECTION Title ##### -->
|
|
Animations
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
Animations as multi-frame structures.
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
<para>
|
|
The GdkPixbuf 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.
|
|
</para>
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
<para>
|
|
#GdkPixbufLoader
|
|
</para>
|
|
|
|
|
|
<!-- ##### ENUM GdkPixbufFrameAction ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@GDK_PIXBUF_FRAME_RETAIN:
|
|
@GDK_PIXBUF_FRAME_DISPOSE:
|
|
@GDK_PIXBUF_FRAME_REVERT:
|
|
|
|
<!-- ##### STRUCT GdkPixbufFrame ##### -->
|
|
<para>
|
|
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.
|
|
</para>
|
|
|
|
@pixbuf: The frame's image contents.
|
|
@x_offset: X offset of the frame inside the animation's bounding box.
|
|
@y_offset: Y offset of the frame inside the animation's bounding box.
|
|
@delay_time: Duration of the frame in milliseconds.
|
|
@action: Overlay mode.
|
|
|
|
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
|
|
<para>
|
|
This structure describes an animation, which is represented as a
|
|
list of #GdkPixbufFrame structures.
|
|
</para>
|
|
|
|
@ref_count: Reference count.
|
|
@n_frames: Number of frames in the animation.
|
|
@frames: List of #GdkPixbufFrame structures.
|
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_animation_new_from_file ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@filename:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_animation_ref ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@animation:
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_animation_unref ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@animation:
|
|
|
|
|
|
<!--
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
|
End:
|
|
-->
|