1 /* GdkPixbuf library - Io handling. This is an internal header for gdk-pixbuf.
2 * You should never use it unless you are doing developement for gdkpixbuf itself.
4 * Copyright (C) 1999 The Free Software Foundation
6 * Authors: Mark Crichton <crichton@gimp.org>
7 * Miguel de Icaza <miguel@gnu.org>
8 * Federico Mena-Quintero <federico@gimp.org>
9 * Jonathan Blandford <jrb@redhat.com>
10 * Michael Fulbright <drmike@redhat.com>
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the
24 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 * Boston, MA 02111-1307, USA.
28 #ifndef GDK_PIXBUF_IO_H
29 #define GDK_PIXBUF_IO_H
33 #include "gdk-pixbuf.h"
34 #include "gdk-pixbuf-i18n.h"
40 typedef void (* ModulePreparedNotifyFunc) (GdkPixbuf *pixbuf,
41 GdkPixbufAnimation *anim,
43 typedef void (* ModuleUpdatedNotifyFunc) (GdkPixbuf *pixbuf,
50 typedef struct _GdkPixbufModule GdkPixbufModule;
51 struct _GdkPixbufModule {
53 gboolean (* format_check) (guchar *buffer, int size);
55 GdkPixbuf *(* load) (FILE *f,
57 GdkPixbuf *(* load_xpm_data) (const char **data);
59 /* Incremental loading */
61 gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func,
62 ModuleUpdatedNotifyFunc update_func,
65 gboolean (* stop_load) (gpointer context,
67 gboolean (* load_increment) (gpointer context,
72 /* Animation loading */
73 GdkPixbufAnimation *(* load_animation) (FILE *f,
76 gboolean (* save) (FILE *f,
83 typedef void (* ModuleFillVtableFunc) (GdkPixbufModule *module);
85 GdkPixbufModule *_gdk_pixbuf_get_module (guchar *buffer, guint size,
86 const gchar *filename,
88 GdkPixbufModule *_gdk_pixbuf_get_named_module (const char *name,
90 gboolean _gdk_pixbuf_load_module (GdkPixbufModule *image_module,