]> Pileus Git - ~andy/gtk/commitdiff
fix .tiff loader.
authorJonathan Blandford <jrb@src.gnome.org>
Thu, 4 Nov 1999 19:22:45 +0000 (19:22 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Thu, 4 Nov 1999 19:22:45 +0000 (19:22 +0000)
add a testcase for the "updated_area"

demos/testpixbuf.c
gdk-pixbuf/io-tiff.c

index 8ccb40c5d29cc1dfe5d6b8925ec3aa0c1e2119c0..800697b48c581a2290fcc1b34d920a6616dc9c1b 100644 (file)
@@ -445,6 +445,14 @@ progressive_prepared_callback(GdkPixbufLoader* loader, gpointer data)
         return;
 }
 
+
+static void
+progressive_updated_callback(GdkPixbufLoader* loader, guint x, guint y, guint width, guint height, gpointer data)
+{
+       g_print ("progressive_updated_callback:\n\t%d\t%d\t%d\t%d\n", x, y, width, height);
+        return;
+}
+
 static int readlen = 1;
 
 int
@@ -516,6 +524,11 @@ main (int argc, char **argv)
                                            GTK_SIGNAL_FUNC(progressive_prepared_callback),
                                            &rgb_window);
 
+                        gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
+                                           "area_updated",
+                                           GTK_SIGNAL_FUNC(progressive_updated_callback),
+                                           &rgb_window);
+
                         timeout = gtk_timeout_add(1000, update_timeout, &rgb_window);
                         
                         file = fopen (argv[1], "r");
index 91272b5da5d84c1331c2ef16b577294ca7200044..0a86c87f5ff91e78f5009b974cf1b1256c2ded37 100644 (file)
@@ -146,6 +146,7 @@ image_begin_load (ModulePreparedNotifyFunc prepare_func,
 
        context = g_new (TiffData, 1);
        context->prepare_func = prepare_func;
+       context->update_func = update_func;
        context->user_data = user_data;
        context->all_okay = TRUE;
        context->tempname = g_strdup ("/tmp/gdkpixbuf-tif-tmp.XXXXXX");