diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-10-03 22:39:51 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-10-03 22:39:51 +0000 |
commit | 45f7541f42d696d02464973e74b2684f690a0cdd (patch) | |
tree | 5e36f77bb56a48f9f68fdd84c1c21f682a803108 /gdk-pixbuf/io-ras.c | |
parent | 71277f4075d53cc1eea6e7e4f20c187c79f1172d (diff) | |
download | gdk-pixbuf-45f7541f42d696d02464973e74b2684f690a0cdd.tar.gz |
Support for separately installed loaders. (#77486)
* Makefile.am gdk-pixbuf-animation.c gdk-pixbuf-data.c
gdk-pixbuf-io.c gdk-pixbuf-io.h gdk-pixbuf-loader.c
gdk-pixbuf-loader.h gdk-pixbuf-private.h gdk-pixbuf.h
gdk-pixdata.c io-ani-animation.h io-ani.c io-bmp.c
io-gif-animation.c io-gif-animation.h io-gif.c io-ico.c
io-jpeg.c io-png.c io-pnm.c io-ras.c io-tga.c io-tiff.c
io-wbmp.c io-xbm.c io-xpm.c pixbufloader_ani.def
pixbufloader_bmp.def pixbufloader_gif.def pixbufloader_ico.def
pixbufloader_jpeg.def pixbufloader_png.def
pixbufloader_pnm.def pixbufloader_ras.def pixbufloader_tga.def
pixbufloader_tiff.def pixbufloader_wbmp.def
pixbufloader_xbm.def pixbufloader_xpm.def test-gdk-pixbuf.c
gdk-pixbuf-animation.h queryloaders.c: Support for separately
installed loaders. (#77486)
Diffstat (limited to 'gdk-pixbuf/io-ras.c')
-rw-r--r-- | gdk-pixbuf/io-ras.c | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/gdk-pixbuf/io-ras.c b/gdk-pixbuf/io-ras.c index 13e05f217..fba4b9900 100644 --- a/gdk-pixbuf/io-ras.c +++ b/gdk-pixbuf/io-ras.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-file-style: "linux" -*- */ /* GdkPixbuf library - SUNRAS image loader * * Copyright (C) 1999 The Free Software Foundation @@ -67,8 +68,8 @@ struct rasterfile { /* Progressive loading */ struct ras_progressive_state { - ModulePreparedNotifyFunc prepared_func; - ModuleUpdatedNotifyFunc updated_func; + GdkPixbufModulePreparedFunc prepared_func; + GdkPixbufModuleUpdatedFunc updated_func; gpointer user_data; gint HeaderSize; /* The size of the header-part (incl colormap) */ @@ -94,9 +95,9 @@ struct ras_progressive_state { }; static gpointer -gdk_pixbuf__ras_image_begin_load(ModuleSizeFunc size_func, - ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, +gdk_pixbuf__ras_image_begin_load(GdkPixbufModuleSizeFunc size_func, + GdkPixbufModulePreparedFunc prepared_func, + GdkPixbufModuleUpdatedFunc updated_func, gpointer user_data, GError **error); static gboolean gdk_pixbuf__ras_image_stop_load(gpointer data, GError **error); @@ -217,9 +218,9 @@ static gboolean RAS2State(struct rasterfile *RAS, */ static gpointer -gdk_pixbuf__ras_image_begin_load(ModuleSizeFunc size_func, - ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, +gdk_pixbuf__ras_image_begin_load(GdkPixbufModuleSizeFunc size_func, + GdkPixbufModulePreparedFunc prepared_func, + GdkPixbufModuleUpdatedFunc updated_func, gpointer user_data, GError **error) { @@ -502,10 +503,35 @@ gdk_pixbuf__ras_image_load_increment(gpointer data, } void -gdk_pixbuf__ras_fill_vtable (GdkPixbufModule *module) +MODULE_ENTRY (ras, fill_vtable) (GdkPixbufModule *module) { - module->begin_load = gdk_pixbuf__ras_image_begin_load; - module->stop_load = gdk_pixbuf__ras_image_stop_load; - module->load_increment = gdk_pixbuf__ras_image_load_increment; + module->begin_load = gdk_pixbuf__ras_image_begin_load; + module->stop_load = gdk_pixbuf__ras_image_stop_load; + module->load_increment = gdk_pixbuf__ras_image_load_increment; +} + +void +MODULE_ENTRY (ras, fill_info) (GdkPixbufFormat *info) +{ + static GdkPixbufModulePattern signature[] = { + { "\x59\xa6\x6a\x95", NULL, 100 }, + { NULL, NULL, 0 } + }; + static gchar * mime_types[] = { + "image/x-cmu-raster", + "image/x-sun-raster", + NULL + }; + static gchar * extensions[] = { + "ras", + NULL + }; + + info->name = "ras"; + info->signature = signature; + info->description = N_("The Sun raster image format"); + info->mime_types = mime_types; + info->extensions = extensions; + info->flags = 0; } |