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 #if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
30 #error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
33 #ifndef GDK_PIXBUF_IO_H
34 #define GDK_PIXBUF_IO_H
39 #include <gdk-pixbuf/gdk-pixbuf-core.h>
40 #include <gdk-pixbuf/gdk-pixbuf-animation.h>
44 typedef struct _GdkPixbufFormat GdkPixbufFormat;
46 GSList *gdk_pixbuf_get_formats (void);
47 gchar *gdk_pixbuf_format_get_name (GdkPixbufFormat *format);
48 gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format);
49 gchar **gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format);
50 gchar **gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format);
51 gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format);
52 gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format);
53 gboolean gdk_pixbuf_format_is_disabled (GdkPixbufFormat *format);
54 void gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format,
56 gchar *gdk_pixbuf_format_get_license (GdkPixbufFormat *format);
58 GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename,
62 #ifdef GDK_PIXBUF_ENABLE_BACKEND
66 typedef void (* GdkPixbufModuleSizeFunc) (gint *width,
70 typedef void (* GdkPixbufModulePreparedFunc) (GdkPixbuf *pixbuf,
71 GdkPixbufAnimation *anim,
73 typedef void (* GdkPixbufModuleUpdatedFunc) (GdkPixbuf *pixbuf,
80 typedef struct _GdkPixbufModulePattern GdkPixbufModulePattern;
81 struct _GdkPixbufModulePattern {
87 typedef struct _GdkPixbufModule GdkPixbufModule;
88 struct _GdkPixbufModule {
92 GdkPixbufFormat *info;
94 GdkPixbuf *(* load) (FILE *f,
96 GdkPixbuf *(* load_xpm_data) (const char **data);
98 /* Incremental loading */
100 gpointer (* begin_load) (GdkPixbufModuleSizeFunc size_func,
101 GdkPixbufModulePreparedFunc prepare_func,
102 GdkPixbufModuleUpdatedFunc update_func,
105 gboolean (* stop_load) (gpointer context,
107 gboolean (* load_increment) (gpointer context,
112 /* Animation loading */
113 GdkPixbufAnimation *(* load_animation) (FILE *f,
117 gboolean (* save) (FILE *f,
120 gchar **param_values,
123 gboolean (*save_to_callback) (GdkPixbufSaveFunc save_func,
127 gchar **option_values,
131 void (*_reserved1) (void);
132 void (*_reserved2) (void);
133 void (*_reserved3) (void);
134 void (*_reserved4) (void);
135 void (*_reserved5) (void);
139 typedef void (* GdkPixbufModuleFillVtableFunc) (GdkPixbufModule *module);
140 typedef void (* GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info);
142 /* key/value pairs that can be attached by the pixbuf loader */
144 gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf,
148 typedef enum /*< skip >*/
150 GDK_PIXBUF_FORMAT_WRITABLE = 1 << 0,
151 GDK_PIXBUF_FORMAT_SCALABLE = 1 << 1,
152 GDK_PIXBUF_FORMAT_THREADSAFE = 1 << 2
153 } GdkPixbufFormatFlags;
155 struct _GdkPixbufFormat {
157 GdkPixbufModulePattern *signature;
168 #endif /* GDK_PIXBUF_ENABLE_BACKEND */
172 #endif /* GDK_PIXBUF_IO_H */