+/* -*- mode: C; c-file-style: "linux" -*- */
/* GdkPixbuf library - Wireless Bitmap image loader
*
* Copyright (C) 2000 Red Hat, Inc.
/* Progressive loading */
struct wbmp_progressive_state {
- ModulePreparedNotifyFunc prepared_func;
- ModuleUpdatedNotifyFunc updated_func;
+ GdkPixbufModulePreparedFunc prepared_func;
+ GdkPixbufModuleUpdatedFunc updated_func;
gpointer user_data;
- gboolean need_type : 1;
- gboolean need_header : 1;
- gboolean need_width : 1;
- gboolean need_height : 1;
- gboolean needmore : 1;
- gboolean call_progressive_updates : 1;
+ guint need_type : 1;
+ guint need_header : 1;
+ guint need_width : 1;
+ guint need_height : 1;
+ guint needmore : 1;
+ guint call_progressive_updates : 1;
guchar last_buf[16]; /* Just needs to be big enough to hold the largest datum requestable via 'getin' */
guint last_len;
};
static gpointer
-gdk_pixbuf__wbmp_image_begin_load(ModuleSizeFunc size_func,
- ModulePreparedNotifyFunc prepared_func,
- ModuleUpdatedNotifyFunc updated_func,
+gdk_pixbuf__wbmp_image_begin_load(GdkPixbufModuleSizeFunc size_func,
+ GdkPixbufModulePreparedFunc prepared_func,
+ GdkPixbufModuleUpdatedFunc updated_func,
gpointer user_data,
GError **error);
*/
static gpointer
-gdk_pixbuf__wbmp_image_begin_load(ModuleSizeFunc size_func,
- ModulePreparedNotifyFunc prepared_func,
- ModuleUpdatedNotifyFunc updated_func,
+gdk_pixbuf__wbmp_image_begin_load(GdkPixbufModuleSizeFunc size_func,
+ GdkPixbufModulePreparedFunc prepared_func,
+ GdkPixbufModuleUpdatedFunc updated_func,
gpointer user_data,
GError **error)
{
get_mbi(struct wbmp_progressive_state *context, const guchar **buf, guint *buf_size, int *val)
{
guchar intbuf[16];
- int i, n;
+ int n;
gboolean rv;
*val = 0;
}
void
-gdk_pixbuf__wbmp_fill_vtable (GdkPixbufModule *module)
+MODULE_ENTRY (wbmp, fill_vtable) (GdkPixbufModule *module)
{
- module->begin_load = gdk_pixbuf__wbmp_image_begin_load;
- module->stop_load = gdk_pixbuf__wbmp_image_stop_load;
- module->load_increment = gdk_pixbuf__wbmp_image_load_increment;
+ module->begin_load = gdk_pixbuf__wbmp_image_begin_load;
+ module->stop_load = gdk_pixbuf__wbmp_image_stop_load;
+ module->load_increment = gdk_pixbuf__wbmp_image_load_increment;
+}
+
+void
+MODULE_ENTRY (wbmp, fill_info) (GdkPixbufFormat *info)
+{
+ static GdkPixbufModulePattern signature[] = {
+ { " ", "z", 1 },
+ { NULL, NULL, 0 }
+ };
+ static gchar * mime_types[] = {
+ "image/vnd.wap.wbmp",
+ NULL
+ };
+ static gchar * extensions[] = {
+ "wbmp",
+ NULL
+ };
+
+ info->name = "wbmp";
+ info->signature = signature;
+ info->description = N_("The WBMP image format");
+ info->mime_types = mime_types;
+ info->extensions = extensions;
+ info->flags = GDK_PIXBUF_FORMAT_THREADSAFE;
+ info->license = "LGPL";
}