Commit Graph

3 Commits

Author SHA1 Message Date
Federico Mena Quintero
6e3522ab2c Added reference counting to animations. A web browser may want to share a
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.
2000-01-02 03:59:22 +00:00
Federico Mena Quintero
c6f25c2de8 Fix includes. (gdk_pixbuf_get_from_drawable): Implemented the zillion
1999-12-08  Federico Mena Quintero  <federico@redhat.com>

	* gdk-pixbuf/gdk-pixbuf-drawable.c: Fix includes.
	(gdk_pixbuf_get_from_drawable): Implemented the zillion sanity
	checks and API definition.  The body needs filling in and it needs
	to do the Right Thing(tm) for pixmaps plus the given colormap and
	windows and their own colormaps.

	* gdk-pixbuf/gdk-pixbuf.h: Added prototype for
	gdk_pixbuf_get_from_drawable().  Killed gdk-pixbuf-drawable.h.

	* gdk-pixbuf/Makefile.am: Re-added the gdk-pixbuf-drawable sources.

	* doc/tmpl/from-drawables.sgml: Populated.

	* doc/gdk-pixbuf.sgml: Added the from-drawables section.

	* doc/Makefile.am (tmpl_sources): Added tmpl/from-drawables.sgml.

	* doc/gdk-pixbuf-sections.txt: Added a section for getting pixbufs
	from drawables.
1999-12-08 21:17:53 +00:00
Federico Mena Quintero
e026570571 New file with utility and convenience functions for pixbufs.
1999-12-02  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf-util.c: New file with utility and convenience
	functions for pixbufs.

	* src/Makefile.am (libgdk_pixbuf_la_SOURCES): Added gdk-pixbuf-util.c.

	* doc/gdk-pixbuf-sections.txt: Added section for utility functions.

	* doc/Makefile.am (tmpl_sources): Added tmpl/util.sgml.

	* doc/gdk-pixbuf.sgml: Added the utilities section.

	* doc/tmpl/util.sgml: Documentation for the utility functions.
1999-12-02 17:45:47 +00:00