2000-01-05 23:06:13 +00:00
|
|
|
|
/* GdkPixbuf library - Io handling. This is an internal header for gdk-pixbuf.
|
|
|
|
|
* You should never use it unless you are doing developement for gdkpixbuf itself.
|
1999-10-26 20:43:39 +00:00
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 1999 The Free Software Foundation
|
|
|
|
|
*
|
|
|
|
|
* Authors: Mark Crichton <crichton@gimp.org>
|
|
|
|
|
* Miguel de Icaza <miguel@gnu.org>
|
|
|
|
|
* Federico Mena-Quintero <federico@gimp.org>
|
|
|
|
|
* Jonathan Blandford <jrb@redhat.com>
|
1999-10-29 19:27:51 +00:00
|
|
|
|
* Michael Fulbright <drmike@redhat.com>
|
1999-10-26 20:43:39 +00:00
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Library General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
|
*/
|
1999-11-02 01:50:06 +00:00
|
|
|
|
|
|
|
|
|
#ifndef GDK_PIXBUF_IO_H
|
|
|
|
|
#define GDK_PIXBUF_IO_H
|
|
|
|
|
|
1999-10-26 20:43:39 +00:00
|
|
|
|
#include <gmodule.h>
|
|
|
|
|
#include <stdio.h>
|
1999-12-02 20:44:43 +00:00
|
|
|
|
#include "gdk-pixbuf.h"
|
1999-10-26 20:43:39 +00:00
|
|
|
|
|
1999-11-02 01:50:06 +00:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
1999-10-27 17:31:07 +00:00
|
|
|
|
|
|
|
|
|
|
1999-10-26 22:04:29 +00:00
|
|
|
|
typedef void (* ModulePreparedNotifyFunc) (GdkPixbuf *pixbuf, gpointer user_data);
|
2000-01-05 23:06:13 +00:00
|
|
|
|
typedef void (* ModuleUpdatedNotifyFunc) (GdkPixbuf *pixbuf,
|
2000-01-02 03:59:22 +00:00
|
|
|
|
guint x, guint y,
|
2000-01-05 23:06:13 +00:00
|
|
|
|
guint width, guint height,
|
|
|
|
|
gpointer user_data);
|
|
|
|
|
/* Needed only for animated images. */
|
2000-01-07 18:29:13 +00:00
|
|
|
|
typedef void (* ModuleFrameDoneNotifyFunc) (GdkPixbufFrame *frame,
|
2000-01-05 23:06:13 +00:00
|
|
|
|
gpointer user_data);
|
|
|
|
|
typedef void (* ModuleAnimationDoneNotifyFunc) (GdkPixbuf *pixbuf,
|
|
|
|
|
gpointer user_data);
|
1999-10-26 22:04:29 +00:00
|
|
|
|
|
1999-10-28 14:46:46 +00:00
|
|
|
|
typedef struct _GdkPixbufModule GdkPixbufModule;
|
|
|
|
|
struct _GdkPixbufModule {
|
1999-10-26 20:43:39 +00:00
|
|
|
|
char *module_name;
|
1999-10-27 17:31:07 +00:00
|
|
|
|
gboolean (* format_check) (guchar *buffer, int size);
|
1999-10-27 19:15:37 +00:00
|
|
|
|
GModule *module;
|
1999-10-26 20:43:39 +00:00
|
|
|
|
GdkPixbuf *(* load) (FILE *f);
|
2000-01-02 03:59:22 +00:00
|
|
|
|
GdkPixbuf *(* load_xpm_data) (const char **data);
|
1999-10-26 22:04:29 +00:00
|
|
|
|
|
|
|
|
|
/* Incremental loading */
|
2000-01-02 03:59:22 +00:00
|
|
|
|
|
|
|
|
|
gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func,
|
|
|
|
|
ModuleUpdatedNotifyFunc update_func,
|
2000-01-05 23:06:13 +00:00
|
|
|
|
ModuleFrameDoneNotifyFunc frame_done_func,
|
|
|
|
|
ModuleAnimationDoneNotifyFunc anim_done_func,
|
2000-01-02 03:59:22 +00:00
|
|
|
|
gpointer user_data);
|
|
|
|
|
void (* stop_load) (gpointer context);
|
|
|
|
|
gboolean (* load_increment) (gpointer context, const guchar *buf, guint size);
|
1999-12-11 00:21:27 +00:00
|
|
|
|
|
|
|
|
|
/* Animation loading */
|
|
|
|
|
GdkPixbufAnimation *(* load_animation) (FILE *f);
|
1999-10-26 20:43:39 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2000-01-02 03:59:22 +00:00
|
|
|
|
GdkPixbufModule *gdk_pixbuf_get_module (guchar *buffer, guint size);
|
|
|
|
|
void gdk_pixbuf_load_module (GdkPixbufModule *image_module);
|
1999-10-26 22:04:29 +00:00
|
|
|
|
|
1999-11-02 01:50:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|