Commit 2c343c99 authored by Arturo Espinosa's avatar Arturo Espinosa

Make it build - Federico

parent 0eaadbd0
......@@ -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 }
};
......
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment