1 /* GdkPixbuf library - Io handling. This is an internal header for
2 * GdkPixbuf. You should never use it unless you are doing development for
5 * Copyright (C) 1999 The Free Software Foundation
7 * Authors: Mark Crichton <crichton@gimp.org>
8 * Miguel de Icaza <miguel@gnu.org>
9 * Federico Mena-Quintero <federico@gimp.org>
10 * Jonathan Blandford <jrb@redhat.com>
11 * Michael Fulbright <drmike@redhat.com>
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the
25 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26 * Boston, MA 02111-1307, USA.
29 #ifndef GDK_PIXBUF_IO_H
30 #define GDK_PIXBUF_IO_H
32 #include "gdk-pixbuf/gdk-pixbuf.h"
38 #ifdef GDK_PIXBUF_ENABLE_BACKEND
42 typedef void (* GdkPixbufModuleSizeFunc) (gint *width,
46 typedef void (* GdkPixbufModulePreparedFunc) (GdkPixbuf *pixbuf,
47 GdkPixbufAnimation *anim,
49 typedef void (* GdkPixbufModuleUpdatedFunc) (GdkPixbuf *pixbuf,
56 typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
57 struct _GdkPixbufModulePattern {
58 unsigned char *prefix;
63 typedef struct _GdkPixbufModule GdkPixbufModule;
64 struct _GdkPixbufModule {
68 GdkPixbufFormat *info;
70 GdkPixbuf *(* load) (FILE *f,
72 GdkPixbuf *(* load_xpm_data) (const char **data);
74 /* Incremental loading */
76 gpointer (* begin_load) (GdkPixbufModuleSizeFunc size_func,
77 GdkPixbufModulePreparedFunc prepare_func,
78 GdkPixbufModuleUpdatedFunc update_func,
81 gboolean (* stop_load) (gpointer context,
83 gboolean (* load_increment) (gpointer context,
88 /* Animation loading */
89 GdkPixbufAnimation *(* load_animation) (FILE *f,
92 gboolean (* save) (FILE *f,
98 void (*_reserved1) (void);
99 void (*_reserved2) (void);
100 void (*_reserved3) (void);
101 void (*_reserved4) (void);
102 void (*_reserved5) (void);
103 void (*_reserved6) (void);
107 typedef void (* GdkPixbufModuleFillVtableFunc) (GdkPixbufModule *module);
108 typedef void (* GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info);
110 /* key/value pairs that can be attached by the pixbuf loader */
112 gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf,
116 typedef enum /*< skip >*/
118 GDK_PIXBUF_FORMAT_WRITABLE = 1 << 0
119 } GdkPixbufFormatFlags;
121 struct _GdkPixbufFormat {
123 GdkPixbufModulePattern *signature;
132 #endif /* GDK_PIXBUF_ENABLE_BACKEND */
136 #endif /* GDK_PIXBUF_IO_H */