]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/gdk-pixbuf-io.h
Finished initial cut at the object.
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf-io.h
1 /* GdkPixbuf library - Io handling
2  *
3  * Copyright (C) 1999 The Free Software Foundation
4  *
5  * Authors: Mark Crichton <crichton@gimp.org>
6  *          Miguel de Icaza <miguel@gnu.org>
7  *          Federico Mena-Quintero <federico@gimp.org>
8  *          Jonathan Blandford <jrb@redhat.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library; if not, write to the
22  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  */
25 #include <gmodule.h>
26 #include "gdk-pixbuf.h"
27 #include <stdio.h>
28
29 typedef void (* ModulePreparedNotifyFunc) (GdkPixbuf *pixbuf, gpointer user_data);
30
31 typedef struct _ModuleType ModuleType;
32 struct _ModuleType {
33         char *module_name;
34         gboolean (* format_check) (guchar *buffer, int size);
35         GModule *module;
36         GdkPixbuf *(* load) (FILE *f);
37         GdkPixbuf *(* load_xpm_data) (const gchar **data);
38
39         /* Incremental loading */
40         gpointer   (* begin_load)    (ModulePreparedNotifyFunc func, gpointer user_data);
41         void       (* stop_load)     (gpointer context);
42         gboolean   (* load_increment)(gpointer context, guchar *buf, guint size);
43 };
44
45
46 ModuleType *gdk_pixbuf_get_module (gchar *buffer, gint size);
47