]> Pileus Git - ~andy/gtk/blobdiff - gdk-pixbuf/io-tiff.c
Support for separately installed loaders. (#77486)
[~andy/gtk] / gdk-pixbuf / io-tiff.c
index deae12bd77ce21f0a55507f2fad98ef1f7fceffe..a91255b0a2e23f92f8e10dcb0489c6c11befa29e 100644 (file)
@@ -47,8 +47,8 @@
 typedef struct _TiffContext TiffContext;
 struct _TiffContext
 {
-       ModulePreparedNotifyFunc prepare_func;
-       ModuleUpdatedNotifyFunc update_func;
+       GdkPixbufModulePreparedFunc prepare_func;
+       GdkPixbufModuleUpdatedFunc update_func;
        gpointer user_data;
         
         guchar *buffer;
@@ -361,8 +361,9 @@ gdk_pixbuf__tiff_image_load (FILE *f, GError **error)
 /* Progressive loader */
 
 static gpointer
-gdk_pixbuf__tiff_image_begin_load (ModulePreparedNotifyFunc prepare_func,
-                                  ModuleUpdatedNotifyFunc update_func,
+gdk_pixbuf__tiff_image_begin_load (GdkPixbufModuleSizeFunc size_func,
+                                   GdkPixbufModulePreparedFunc prepare_func,
+                                  GdkPixbufModuleUpdatedFunc update_func,
                                   gpointer user_data,
                                    GError **error)
 {
@@ -559,10 +560,36 @@ gdk_pixbuf__tiff_image_load_increment (gpointer data, const guchar *buf,
 }
 
 void
-gdk_pixbuf__tiff_fill_vtable (GdkPixbufModule *module)
+MODULE_ENTRY (tiff, fill_vtable) (GdkPixbufModule *module)
 {
         module->load = gdk_pixbuf__tiff_image_load;
         module->begin_load = gdk_pixbuf__tiff_image_begin_load;
         module->stop_load = gdk_pixbuf__tiff_image_stop_load;
         module->load_increment = gdk_pixbuf__tiff_image_load_increment;
 }
+
+void
+MODULE_ENTRY (tiff, fill_info) (GdkPixbufFormat *info)
+{
+        static GdkPixbufModulePattern signature[] = {
+                { "MM \x2a", "  z ", 100 },
+                { "II\x2a ", "   z", 100 },
+                { NULL, NULL, 0 }
+        };
+       static gchar * mime_types[] = {
+               "image/tiff",
+               NULL
+       };
+       static gchar * extensions[] = {
+               "tiff",
+               "tif",
+               NULL
+       };
+
+       info->name = "tiff";
+        info->signature = signature;
+       info->description = N_("The TIFF image format");
+       info->mime_types = mime_types;
+       info->extensions = extensions;
+       info->flags = 0;
+}