summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-10-27 19:15:37 +0000
committerArturo Espinosa <unammx@src.gnome.org>1999-10-27 19:15:37 +0000
commit9ee4ff5eeed7adc36c138e79f53f7799eac30a11 (patch)
tree71e6bf9ef8a95ef3486b9dfff077ace37f18f979 /gdk-pixbuf
parent54f017171fefee078ad36a4d2a6c67622c8f57de (diff)
downloadgdk-pixbuf-9ee4ff5eeed7adc36c138e79f53f7799eac30a11.tar.gz
Make it build - Federico
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c14
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.h2
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c23
3 files changed, 22 insertions, 17 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 9c41402cb..bc00617b9 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -136,15 +136,15 @@ pixbuf_check_ppm (guchar *buffer, int size)
#endif
ModuleType file_formats [] = {
- { "png", NULL, pixbuf_check_png, NULL, NULL, NULL, NULL, NULL },
- { "jpeg", NULL, pixbuf_check_jpeg, NULL, NULL, NULL, NULL, NULL },
- { "tiff", NULL, pixbuf_check_tiff, NULL, NULL, NULL, NULL, NULL },
- { "gif", NULL, pixbuf_check_gif, NULL, NULL, NULL, NULL, NULL },
+ { "png", pixbuf_check_png, NULL, NULL, NULL, NULL, NULL, NULL },
+ { "jpeg", pixbuf_check_jpeg, NULL, NULL, NULL, NULL, NULL, NULL },
+ { "tiff", pixbuf_check_tiff, NULL, NULL, NULL, NULL, NULL, NULL },
+ { "gif", pixbuf_check_gif, NULL, NULL, NULL, NULL, NULL, NULL },
#define XPM_FILE_FORMAT_INDEX 4
- { "xpm", NULL, pixbuf_check_xpm, NULL, NULL, NULL, NULL, NULL },
+ { "xpm", pixbuf_check_xpm, NULL, NULL, NULL, NULL, NULL, NULL },
#if 0
- { "bmp", NULL, pixbuf_check_bmp, NULL, NULL, NULL, NULL, NULL },
- { "ppm", NULL, pixbuf_check_ppm, NULL, NULL, NULL, NULL, NULL },
+ { "bmp", pixbuf_check_bmp, NULL, NULL, NULL, NULL, NULL, NULL },
+ { "ppm", pixbuf_check_ppm, NULL, NULL, NULL, NULL, NULL, NULL },
#endif
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL }
};
diff --git a/gdk-pixbuf/gdk-pixbuf-io.h b/gdk-pixbuf/gdk-pixbuf-io.h
index b3da91d64..74520398b 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.h
+++ b/gdk-pixbuf/gdk-pixbuf-io.h
@@ -33,8 +33,8 @@ typedef void (* ModulePreparedNotifyFunc) (GdkPixbuf *pixbuf, gpointer user_data
typedef struct _ModuleType ModuleType;
struct _ModuleType {
char *module_name;
- GModule *module;
gboolean (* format_check) (guchar *buffer, int size);
+ GModule *module;
GdkPixbuf *(* load) (FILE *f);
GdkPixbuf *(* load_xpm_data) (const gchar **data);
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index 09c889224..c1fb1897f 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -165,35 +165,40 @@ gdk_pixbuf_loader_init (GdkPixbufLoader *loader)
}
static void
-gdk_pixbuf_loader_destroy (GtkObject *loader)
+gdk_pixbuf_loader_destroy (GtkObject *object)
{
+ GdkPixbufLoader *loader;
GdkPixbufLoaderPrivate *priv = NULL;
- g_return_if_fail (loader != NULL);
- g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader));
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GDK_IS_PIXBUF_LOADER (object));
- priv = GDK_PIXBUF_LOADER (loader)->private;
+ loader = GDK_PIXBUF_LOADER (object);
+ priv = loader->private;
if (!priv->closed)
- gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (loader));
+ gdk_pixbuf_loader_close (loader);
if (priv->pixbuf)
gdk_pixbuf_unref (priv->pixbuf);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (loader);
+ (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
static void
-gdk_pixbuf_loader_finalize (GtkObject *loader)
+gdk_pixbuf_loader_finalize (GtkObject *object)
{
+ GdkPixbufLoader *loader;
GdkPixbufLoaderPrivate *priv = NULL;
- priv = GDK_PIXBUF_LOADER (loader)->private;
+ loader = GDK_PIXBUF_LOADER (object);
+ priv = loader->private;
+
g_free (priv);
if (GTK_OBJECT_CLASS (parent_class)->finalize)
- (* GTK_OBJECT_CLASS (parent_class)->finalize) (loader);
+ (* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
}
static void