summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-gif.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>1999-11-04 18:18:07 +0000
committerJonathan Blandford <jrb@src.gnome.org>1999-11-04 18:18:07 +0000
commitd0ed72ee143dd9586ea42a937860c042bdd8fa74 (patch)
tree14f19ca39bb3bdd6c27817493e3f4fe9c25d650e /gdk-pixbuf/io-gif.c
parent567305020d37f24e192ffcec008e857a0da32e19 (diff)
downloadgtk+-d0ed72ee143dd9586ea42a937860c042bdd8fa74.tar.gz
handle the actual update. add a update_func callback. add a update_func
1999-11-04 Jonathan Blandford <jrb@redhat.com> * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_update): handle the actual update. * src/io-png.c (image_begin_load): add a update_func callback. * src/io-gif.c (image_begin_load): add a update_func callback. * src/io-tiff.c (image_begin_load): add a update_func callback.
Diffstat (limited to 'gdk-pixbuf/io-gif.c')
-rw-r--r--gdk-pixbuf/io-gif.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c
index e3dfdb81e6..5282f03bd0 100644
--- a/gdk-pixbuf/io-gif.c
+++ b/gdk-pixbuf/io-gif.c
@@ -121,7 +121,8 @@ struct _GifContext
FILE *file;
/* progressive read, only. */
- ModulePreparedNotifyFunc func;
+ ModulePreparedNotifyFunc prepare_func;
+ ModuleUpdatedNotifyFunc update_func;
gpointer user_data;
guchar *buf;
guint ptr;
@@ -650,8 +651,8 @@ gif_get_lzw (GifContext *context)
context->width,
context->height);
- if (context->func)
- (* context->func) (context->pixbuf, context->user_data);
+ if (context->prepare_func)
+ (* context->prepare_func) (context->pixbuf, context->user_data);
}
dest = gdk_pixbuf_get_pixels (context->pixbuf);
@@ -675,7 +676,7 @@ gif_get_lzw (GifContext *context)
*(temp+2) = context->color_map [2][(guchar) v];
}
- if (context->func && context->frame_interlace)
+ if (context->prepare_func && context->frame_interlace)
gif_fill_in_lines (context, dest, v);
context->draw_xpos++;
@@ -957,7 +958,8 @@ image_load (FILE *file)
context->file = file;
context->pixbuf = NULL;
context->state = GIF_START;
- context->func = NULL;
+ context->prepare_func = NULL;
+ context->update_func = NULL;
gif_main_loop (context);
@@ -965,7 +967,9 @@ image_load (FILE *file)
}
gpointer
-image_begin_load (ModulePreparedNotifyFunc func, gpointer user_data)
+image_begin_load (ModulePreparedNotifyFunc prepare_func,
+ ModuleUpdatedNotifyFunc update_func,
+ gpointer user_data)
{
GifContext *context;
@@ -973,7 +977,7 @@ image_begin_load (ModulePreparedNotifyFunc func, gpointer user_data)
count = 0;
#endif
context = g_new (GifContext, 1);
- context->func = func;
+ context->prepare_func = prepare_func;
context->user_data = user_data;
context->file = NULL;
context->pixbuf = NULL;