From d4984ede33a905d92c4969ca34a78d37cec3bff3 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Fri, 17 Dec 1999 21:42:47 +0000 Subject: moved the file here. It seems natural to put this function here, as that's 1999-12-17 Jonathan Blandford * 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. --- gdk-pixbuf/gdk-pixbuf-loader.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gdk-pixbuf/gdk-pixbuf-loader.c') 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; @@ -380,6 +381,30 @@ gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader) return priv->pixbuf; } +/** + * 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. -- cgit v1.2.1