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
35 #include <gdk-pixbuf/gdk-pixbuf-core.h>
36 #include <gdk-pixbuf/gdk-pixbuf-animation.h>
40 typedef struct _GdkPixbufFormat GdkPixbufFormat;
42 GSList *gdk_pixbuf_get_formats (void);
43 gchar *gdk_pixbuf_format_get_name (GdkPixbufFormat *format);
44 gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format);
45 gchar **gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format);
46 gchar **gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format);
47 gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format);
48 gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format);
49 gboolean gdk_pixbuf_format_is_disabled (GdkPixbufFormat *format);
50 void gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format,
52 gchar *gdk_pixbuf_format_get_license (GdkPixbufFormat *format);
54 GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename,
58 #ifdef GDK_PIXBUF_ENABLE_BACKEND
62 typedef void (* GdkPixbufModuleSizeFunc) (gint *width,
66 typedef void (* GdkPixbufModulePreparedFunc) (GdkPixbuf *pixbuf,
67 GdkPixbufAnimation *anim,
69 typedef void (* GdkPixbufModuleUpdatedFunc) (GdkPixbuf *pixbuf,
76 typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
77 struct _GdkPixbufModulePattern {
83 typedef struct _GdkPixbufModule GdkPixbufModule;
84 struct _GdkPixbufModule {
88 GdkPixbufFormat *info;
90 GdkPixbuf *(* load) (FILE *f,
92 GdkPixbuf *(* load_xpm_data) (const char **data);
94 /* Incremental loading */
96 gpointer (* begin_load) (GdkPixbufModuleSizeFunc size_func,
97 GdkPixbufModulePreparedFunc prepare_func,
98 GdkPixbufModuleUpdatedFunc update_func,
101 gboolean (* stop_load) (gpointer context,
103 gboolean (* load_increment) (gpointer context,
108 /* Animation loading */
109 GdkPixbufAnimation *(* load_animation) (FILE *f,
113 gboolean (* save) (FILE *f,
116 gchar **param_values,
119 gboolean (*save_to_callback) (GdkPixbufSaveFunc save_func,
123 gchar **option_values,
127 void (*_reserved1) (void);
128 void (*_reserved2) (void);
129 void (*_reserved3) (void);
130 void (*_reserved4) (void);
131 void (*_reserved5) (void);
135 typedef void (* GdkPixbufModuleFillVtableFunc) (GdkPixbufModule *module);
136 typedef void (* GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info);
138 /* key/value pairs that can be attached by the pixbuf loader */
140 gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf,
144 typedef enum /*< skip >*/
146 GDK_PIXBUF_FORMAT_WRITABLE = 1 << 0,
147 GDK_PIXBUF_FORMAT_SCALABLE = 1 << 1,
148 GDK_PIXBUF_FORMAT_THREADSAFE = 1 << 2
149 } GdkPixbufFormatFlags;
151 struct _GdkPixbufFormat {
153 GdkPixbufModulePattern *signature;
164 #endif /* GDK_PIXBUF_ENABLE_BACKEND */
168 #endif /* GDK_PIXBUF_IO_H */