summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-tiff.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-tiff.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-tiff.c')
-rw-r--r--gdk-pixbuf/io-tiff.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c
index d1e97126cd..91272b5da5 100644
--- a/gdk-pixbuf/io-tiff.c
+++ b/gdk-pixbuf/io-tiff.c
@@ -37,7 +37,8 @@
typedef struct _TiffData TiffData;
struct _TiffData
{
- ModulePreparedNotifyFunc func;
+ ModulePreparedNotifyFunc prepare_func;
+ ModuleUpdatedNotifyFunc update_func;
gpointer user_data;
gchar *tempname;
@@ -69,7 +70,7 @@ image_load_real (FILE *f, TiffData *context)
pixbuf = gdk_pixbuf_new (ART_PIX_RGB, TRUE, 8, w, h);
if (context)
- (* context->func) (pixbuf, context->user_data);
+ (* context->prepare_func) (pixbuf, context->user_data);
/* Yes, it needs to be _TIFFMalloc... */
rast = (uint32 *) _TIFFmalloc (num_pixs * sizeof (uint32));
@@ -108,8 +109,10 @@ image_load_real (FILE *f, TiffData *context)
_TIFFfree (rast);
TIFFClose (tiff);
- if (context)
+ if (context) {
gdk_pixbuf_unref (pixbuf);
+ (* context->update_func) (pixbuf, context->user_data, 0, 0, w, h);
+ }
return pixbuf;
}
@@ -132,14 +135,17 @@ image_load (FILE *f)
* the file when it's done. It's not pretty.
*/
+
gpointer
-image_begin_load (ModulePreparedNotifyFunc func, gpointer user_data)
+image_begin_load (ModulePreparedNotifyFunc prepare_func,
+ ModuleUpdatedNotifyFunc update_func,
+ gpointer user_data)
{
TiffData *context;
gint fd;
context = g_new (TiffData, 1);
- context->func = func;
+ context->prepare_func = prepare_func;
context->user_data = user_data;
context->all_okay = TRUE;
context->tempname = g_strdup ("/tmp/gdkpixbuf-tif-tmp.XXXXXX");