summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-png.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2000-01-05 23:06:13 +0000
committerJonathan Blandford <jrb@src.gnome.org>2000-01-05 23:06:13 +0000
commit8f48c4b3cd6cf0643a7a1703de0f2c886a749228 (patch)
treed780b88df6408d21e976083b57d35f3ce32f7c34 /gdk-pixbuf/io-png.c
parentcc76a598ba1069e68a7afce20423d5ddd4f7ecb2 (diff)
downloadgtk+-8f48c4b3cd6cf0643a7a1703de0f2c886a749228.tar.gz
Change the order of the update func to make it more compatible with the
2000-01-05 Jonathan Blandford <jrb@redhat.com> * gdk-pixbuf/gdk-pixbuf-io.h: Change the order of the update func to make it more compatible with the rest of GTK. Added animation framework for progressive loading. * gdk-pixbuf/io-bmp.c (image_begin_load): Modified to handle new system. * gdk-pixbuf/io-ico.c (image_begin_load): ditto * gdk-pixbuf/io-png.c (image_begin_load): ditto * gdk-pixbuf/io-ras.c (image_begin_load): ditto * gdk-pixbuf/io-jpeg.c (image_begin_load): ditto * gdk-pixbuf/io-pnm.c (image_begin_load): ditto * gdk-pixbuf/io-tiff.c (image_begin_load): ditto * gdk-pixbuf/io-gif.c (image_begin_load): ditto
Diffstat (limited to 'gdk-pixbuf/io-png.c')
-rw-r--r--gdk-pixbuf/io-png.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 75e456144a..84a2a0acb6 100644
--- a/gdk-pixbuf/io-png.c
+++ b/gdk-pixbuf/io-png.c
@@ -276,6 +276,8 @@ struct _LoadContext {
gpointer
image_begin_load (ModulePreparedNotifyFunc prepare_func,
ModuleUpdatedNotifyFunc update_func,
+ ModuleFrameDoneNotifyFunc frame_done_func,
+ ModuleAnimationDoneNotifyFunc anim_done_func,
gpointer user_data)
{
LoadContext* lc;
@@ -367,34 +369,38 @@ image_load_increment(gpointer context, guchar *buf, guint size)
if (pass_diff == 0) {
/* start and end row were in the same pass */
- (lc->update_func)(lc->pixbuf, lc->notify_user_data, 0,
+ (lc->update_func)(lc->pixbuf, 0,
lc->first_row_seen_in_chunk,
lc->pixbuf->art_pixbuf->width,
(lc->last_row_seen_in_chunk -
- lc->first_row_seen_in_chunk) + 1);
+ lc->first_row_seen_in_chunk) + 1,
+ lc->notify_user_data);
} else if (pass_diff == 1) {
/* We have from the first row seen to
the end of the image (max row
seen), then from the top of the
image to the last row seen */
/* first row to end */
- (lc->update_func)(lc->pixbuf, lc->notify_user_data, 0,
+ (lc->update_func)(lc->pixbuf, 0,
lc->first_row_seen_in_chunk,
lc->pixbuf->art_pixbuf->width,
(lc->max_row_seen_in_chunk -
- lc->first_row_seen_in_chunk) + 1);
+ lc->first_row_seen_in_chunk) + 1,
+ lc->notify_user_data);
/* top to last row */
- (lc->update_func)(lc->pixbuf, lc->notify_user_data,
+ (lc->update_func)(lc->pixbuf,
0, 0,
lc->pixbuf->art_pixbuf->width,
- lc->last_row_seen_in_chunk + 1);
+ lc->last_row_seen_in_chunk + 1,
+ lc->notify_user_data);
} else {
/* We made at least one entire pass, so update the
whole image */
- (lc->update_func)(lc->pixbuf, lc->notify_user_data,
+ (lc->update_func)(lc->pixbuf,
0, 0,
lc->pixbuf->art_pixbuf->width,
- lc->max_row_seen_in_chunk + 1);
+ lc->max_row_seen_in_chunk + 1,
+ lc->notify_user_data);
}
}