diff options
author | Jonathan Blandford <jrb@redhat.com> | 1999-12-17 21:42:47 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 1999-12-17 21:42:47 +0000 |
commit | d4984ede33a905d92c4969ca34a78d37cec3bff3 (patch) | |
tree | 7aed4114d02c6d0b325ba7f0795f193e42184214 /gdk-pixbuf/gdk-pixbuf-loader.c | |
parent | cd5f174a7ec581b4ac3f0f43b7d8141866e02e51 (diff) | |
download | gtk+-d4984ede33a905d92c4969ca34a78d37cec3bff3.tar.gz |
moved the file here. It seems natural to put this function here, as that's
1999-12-17 Jonathan Blandford <jrb@redhat.com>
* gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_animation_new_from_file):
moved the file here. It seems natural to put this function here,
as that's where the gdk_pixbuf_new_from_file function is, but it's
still a little convoluted. The source files might be played with
in a bit.
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-loader.c')
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-loader.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c index 9628944ea7..e5b81f1ee8 100644 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ b/gdk-pixbuf/gdk-pixbuf-loader.c @@ -56,6 +56,7 @@ static guint pixbuf_loader_signals[LAST_SIGNAL] = { 0 }; typedef struct { GdkPixbuf *pixbuf; + GdkPixbufAnimation *animation; gboolean closed; gchar header_buf[LOADER_HEADER_SIZE]; gint header_buf_offset; @@ -381,6 +382,30 @@ gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader) } /** + * gdk_pixbuf_loader_get_animation: + * @loader: A pixbuf loader + * + * Queries the GdkPixbufAnimation that a pixbuf loader is currently creating. + * In general it only makes sense to call this function afer the "area_prepared" + * signal has been emitted by the loader. + * + * Return value: The GdkPixbufAnimation that the loader is loading, or NULL if + not enough data has been read to determine the information. + **/ +GdkPixbufAnimation * +gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader) +{ + GdkPixbufLoaderPrivate *priv; + + g_return_val_if_fail (loader != NULL, NULL); + g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL); + + priv = loader->private; + + return priv->animation; +} + +/** * gdk_pixbuf_loader_close: * @loader: A pixbuf loader. * |