2002-10-03 22:39:51 +00:00
|
|
|
|
/* -*- mode: C; c-file-style: "linux" -*- */
|
2000-07-28 00:09:36 +00:00
|
|
|
|
/* GdkPixbuf library - Wireless Bitmap image loader
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2000 Red Hat, Inc.
|
|
|
|
|
*
|
|
|
|
|
* Authors: Elliot Lee <sopwith@redhat.com
|
|
|
|
|
*
|
|
|
|
|
* Based on io-bmp.c
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser 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
|
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser 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.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
Known bugs:
|
|
|
|
|
* Since this is based off the libgd implementation, no extended headers implemented (not required for a WAP client)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
#include <stdio.h>
|
2000-08-01 21:43:56 +00:00
|
|
|
|
#ifdef HAVE_UNISTD_H
|
2000-07-28 00:09:36 +00:00
|
|
|
|
#include <unistd.h>
|
2000-08-01 21:43:56 +00:00
|
|
|
|
#endif
|
2000-07-28 00:09:36 +00:00
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "gdk-pixbuf-private.h"
|
|
|
|
|
#include "gdk-pixbuf-io.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Progressive loading */
|
|
|
|
|
|
|
|
|
|
struct wbmp_progressive_state {
|
2002-10-03 22:39:51 +00:00
|
|
|
|
GdkPixbufModulePreparedFunc prepared_func;
|
|
|
|
|
GdkPixbufModuleUpdatedFunc updated_func;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
gpointer user_data;
|
|
|
|
|
|
2003-05-27 21:21:00 +00:00
|
|
|
|
guint need_type : 1;
|
|
|
|
|
guint need_header : 1;
|
|
|
|
|
guint need_width : 1;
|
|
|
|
|
guint need_height : 1;
|
|
|
|
|
guint needmore : 1;
|
|
|
|
|
guint call_progressive_updates : 1;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
|
|
|
|
|
guchar last_buf[16]; /* Just needs to be big enough to hold the largest datum requestable via 'getin' */
|
|
|
|
|
guint last_len;
|
|
|
|
|
|
|
|
|
|
int type;
|
|
|
|
|
int width, height, curx, cury;
|
|
|
|
|
|
|
|
|
|
GdkPixbuf *pixbuf; /* Our "target" */
|
|
|
|
|
};
|
|
|
|
|
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
static gpointer
|
2002-10-03 22:39:51 +00:00
|
|
|
|
gdk_pixbuf__wbmp_image_begin_load(GdkPixbufModuleSizeFunc size_func,
|
|
|
|
|
GdkPixbufModulePreparedFunc prepared_func,
|
|
|
|
|
GdkPixbufModuleUpdatedFunc updated_func,
|
2001-05-07 15:58:47 +00:00
|
|
|
|
gpointer user_data,
|
2000-10-18 18:42:54 +00:00
|
|
|
|
GError **error);
|
2000-07-28 00:09:36 +00:00
|
|
|
|
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
static gboolean gdk_pixbuf__wbmp_image_stop_load(gpointer data, GError **error);
|
|
|
|
|
static gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data,
|
|
|
|
|
const guchar * buf,
|
|
|
|
|
guint size,
|
|
|
|
|
GError **error);
|
2000-07-28 00:09:36 +00:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* func - called when we have pixmap created (but no image data)
|
|
|
|
|
* user_data - passed as arg 1 to func
|
|
|
|
|
* return context (opaque to user)
|
|
|
|
|
*/
|
|
|
|
|
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
static gpointer
|
2002-10-03 22:39:51 +00:00
|
|
|
|
gdk_pixbuf__wbmp_image_begin_load(GdkPixbufModuleSizeFunc size_func,
|
|
|
|
|
GdkPixbufModulePreparedFunc prepared_func,
|
|
|
|
|
GdkPixbufModuleUpdatedFunc updated_func,
|
2001-05-07 15:58:47 +00:00
|
|
|
|
gpointer user_data,
|
2000-10-18 18:42:54 +00:00
|
|
|
|
GError **error)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
2000-07-28 00:16:17 +00:00
|
|
|
|
struct wbmp_progressive_state *context;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
|
2000-07-28 00:16:17 +00:00
|
|
|
|
context = g_new0(struct wbmp_progressive_state, 1);
|
2000-07-28 00:09:36 +00:00
|
|
|
|
context->prepared_func = prepared_func;
|
|
|
|
|
context->updated_func = updated_func;
|
|
|
|
|
context->user_data = user_data;
|
|
|
|
|
|
|
|
|
|
context->needmore = context->need_type = context->need_header = context->need_width = context->need_height = TRUE;
|
|
|
|
|
context->call_progressive_updates = TRUE;
|
|
|
|
|
context->pixbuf = NULL;
|
|
|
|
|
|
|
|
|
|
return (gpointer) context;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* context - returned from image_begin_load
|
|
|
|
|
*
|
|
|
|
|
* free context, unref gdk_pixbuf
|
|
|
|
|
*/
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
static gboolean gdk_pixbuf__wbmp_image_stop_load(gpointer data,
|
|
|
|
|
GError **error)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
2000-07-28 00:16:17 +00:00
|
|
|
|
struct wbmp_progressive_state *context =
|
|
|
|
|
(struct wbmp_progressive_state *) data;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
/* FIXME this thing needs to report errors if
|
|
|
|
|
* we have unused image data
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail(context != NULL, TRUE);
|
2000-07-28 00:09:36 +00:00
|
|
|
|
if (context->pixbuf)
|
Remove assorted G_OBJECT casts where unnecessary.
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixpuf.c,
io-gif-animation.c, io-gif.c, io-tiff.c, test-loaders.c: Remove
assorted G_OBJECT casts where unnecessary.
* gdk-pixbuf-loader.c: Call g_object_ref and g_object_unref
instead of gdk_pixbuf_animation_ref and gdk_pixbuf_animation_unref
resp.
* gdk-pixbuf-csource.c, io-bmp.c, io-gif-animation.c, io-ico.c,
io-jpeg.c, io-png.c, io-pnm.c, io-ras.c, io-tga.c, io-wbmp.c,
io-xbm.c, io-xpm.c, test-gdk-pixbuf.c: Dito for gdk_pixbuf_ref and
gdk_pixbuf_unref.
* Makefile.am, pixops/Makefile.am: Compile everything with
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
* gdk-pixdata.c: Use g_ascii_strup() instead of g_strup().
* io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp().
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
2001-12-13 21:22:12 +00:00
|
|
|
|
g_object_unref(context->pixbuf);
|
2000-07-28 00:09:36 +00:00
|
|
|
|
|
|
|
|
|
g_free(context);
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
|
|
|
|
|
return TRUE;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
2001-07-18 04:25:04 +00:00
|
|
|
|
getin(struct wbmp_progressive_state *context, const guchar **buf, guint *buf_size, guchar *ptr, int datum_size)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
|
|
|
|
int last_num, buf_num;
|
|
|
|
|
|
|
|
|
|
if((context->last_len + *buf_size) < datum_size)
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
/* We know we can pull it out of there */
|
|
|
|
|
last_num = MIN(datum_size, context->last_len);
|
|
|
|
|
buf_num = MIN(datum_size-last_num, *buf_size);
|
|
|
|
|
memcpy(ptr, context->last_buf, last_num);
|
|
|
|
|
memcpy(ptr+last_num, *buf, buf_num);
|
|
|
|
|
|
|
|
|
|
context->last_len -= last_num;
|
|
|
|
|
if(context->last_len)
|
|
|
|
|
memmove(context->last_buf, context->last_buf+last_num, context->last_len);
|
|
|
|
|
*buf_size -= buf_num;
|
|
|
|
|
*buf += buf_num;
|
2000-07-28 00:16:17 +00:00
|
|
|
|
|
|
|
|
|
return TRUE;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
2000-07-28 00:16:17 +00:00
|
|
|
|
save_rest(struct wbmp_progressive_state *context, const guchar *buf, guint buf_size)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
|
|
|
|
if(buf_size > (sizeof(context->last_buf) - context->last_len))
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
|
|
memcpy(context->last_buf+context->last_len, buf, buf_size);
|
|
|
|
|
context->last_len += buf_size;
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean
|
2001-07-18 04:25:04 +00:00
|
|
|
|
get_mbi(struct wbmp_progressive_state *context, const guchar **buf, guint *buf_size, int *val)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
|
|
|
|
guchar intbuf[16];
|
2006-10-08 05:32:07 +00:00
|
|
|
|
int n;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
gboolean rv;
|
|
|
|
|
|
|
|
|
|
*val = 0;
|
2006-10-08 14:09:39 +00:00
|
|
|
|
n = 0;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
do {
|
|
|
|
|
rv = getin(context, buf, buf_size, intbuf+n, 1);
|
|
|
|
|
if(!rv)
|
|
|
|
|
goto out;
|
|
|
|
|
*val <<= 7;
|
|
|
|
|
*val |= intbuf[n] & 0x7F;
|
|
|
|
|
n++;
|
|
|
|
|
} while(n < sizeof(intbuf) && (intbuf[n-1] & 0x80));
|
|
|
|
|
|
|
|
|
|
out:
|
2000-08-01 00:33:49 +00:00
|
|
|
|
if(!rv || (intbuf[n-1] & 0x80))
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
|
|
|
|
rv = save_rest(context, intbuf, n);
|
|
|
|
|
|
|
|
|
|
if(!rv)
|
|
|
|
|
g_error("Couldn't save_rest of intbuf");
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* context - from image_begin_load
|
|
|
|
|
* buf - new image data
|
|
|
|
|
* size - length of new image data
|
|
|
|
|
*
|
|
|
|
|
* append image data onto inrecrementally built output image
|
|
|
|
|
*/
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
static gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data,
|
|
|
|
|
const guchar * buf,
|
|
|
|
|
guint size, GError **error)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
2000-07-28 00:16:17 +00:00
|
|
|
|
struct wbmp_progressive_state *context =
|
|
|
|
|
(struct wbmp_progressive_state *) data;
|
2000-08-09 02:56:13 +00:00
|
|
|
|
gboolean bv = FALSE;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
if(context->need_type)
|
|
|
|
|
{
|
|
|
|
|
guchar val;
|
|
|
|
|
|
|
|
|
|
bv = getin(context, &buf, &size, &val, 1);
|
|
|
|
|
if(bv)
|
|
|
|
|
{
|
|
|
|
|
context->type = val;
|
|
|
|
|
context->need_type = FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(context->need_header)
|
|
|
|
|
{
|
|
|
|
|
guchar val;
|
|
|
|
|
|
|
|
|
|
bv = getin(context, &buf, &size, &val, 1);
|
|
|
|
|
if(bv)
|
|
|
|
|
{
|
|
|
|
|
/* We skip over the extended header - val is unused */
|
|
|
|
|
if(!(val & 0x80))
|
|
|
|
|
context->need_header = FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(context->need_width)
|
|
|
|
|
{
|
|
|
|
|
bv = get_mbi(context, &buf, &size, &context->width);
|
2002-02-10 21:06:15 +00:00
|
|
|
|
if(bv) {
|
2000-07-28 00:09:36 +00:00
|
|
|
|
context->need_width = FALSE;
|
2002-02-10 21:06:15 +00:00
|
|
|
|
|
|
|
|
|
if (context->width <= 0) {
|
|
|
|
|
g_set_error (error,
|
|
|
|
|
GDK_PIXBUF_ERROR,
|
|
|
|
|
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
|
|
|
|
_("Image has zero width"));
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-28 00:09:36 +00:00
|
|
|
|
}
|
|
|
|
|
else if(context->need_height)
|
|
|
|
|
{
|
|
|
|
|
bv = get_mbi(context, &buf, &size, &context->height);
|
|
|
|
|
if(bv)
|
|
|
|
|
{
|
|
|
|
|
context->need_height = FALSE;
|
2002-02-10 21:06:15 +00:00
|
|
|
|
|
|
|
|
|
if (context->height <= 0) {
|
|
|
|
|
g_set_error (error,
|
|
|
|
|
GDK_PIXBUF_ERROR,
|
|
|
|
|
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
|
|
|
|
_("Image has zero height"));
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
2000-07-28 00:09:36 +00:00
|
|
|
|
context->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, context->width, context->height);
|
2002-02-10 21:06:15 +00:00
|
|
|
|
|
|
|
|
|
if (!context->pixbuf) {
|
|
|
|
|
g_set_error (error,
|
|
|
|
|
GDK_PIXBUF_ERROR,
|
|
|
|
|
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
|
|
|
|
|
_("Not enough memory to load image"));
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
2000-08-01 00:33:49 +00:00
|
|
|
|
|
2000-07-28 00:09:36 +00:00
|
|
|
|
if(context->prepared_func)
|
2001-05-07 15:58:47 +00:00
|
|
|
|
context->prepared_func(context->pixbuf, NULL, context->user_data);
|
2000-07-28 00:09:36 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(context->needmore)
|
|
|
|
|
{
|
|
|
|
|
int first_row;
|
|
|
|
|
first_row = context->cury;
|
|
|
|
|
for( ; context->cury < context->height; context->cury++, context->curx = 0)
|
|
|
|
|
{
|
2000-07-28 00:16:17 +00:00
|
|
|
|
for( ; context->curx < context->width; context->curx += 8)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
|
|
|
|
guchar byte;
|
|
|
|
|
guchar *ptr;
|
|
|
|
|
int xoff;
|
|
|
|
|
bv = getin(context, &buf, &size, &byte, 1);
|
|
|
|
|
if(!bv)
|
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
|
|
ptr = context->pixbuf->pixels + context->pixbuf->rowstride * context->cury + context->curx * 3;
|
2000-08-01 00:33:49 +00:00
|
|
|
|
for(xoff = 7; xoff >= 0; xoff--, ptr += 3)
|
2000-07-28 00:09:36 +00:00
|
|
|
|
{
|
|
|
|
|
guchar pixval;
|
|
|
|
|
|
2002-02-12 23:28:05 +00:00
|
|
|
|
if (context->curx + (7 - xoff) == context->width)
|
|
|
|
|
break;
|
|
|
|
|
|
2000-07-28 00:09:36 +00:00
|
|
|
|
if(byte & (1<<xoff))
|
|
|
|
|
pixval = 0xFF;
|
|
|
|
|
else
|
|
|
|
|
pixval = 0x0;
|
|
|
|
|
|
|
|
|
|
ptr[0] = ptr[1] = ptr[2] = pixval;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
context->needmore = FALSE;
|
|
|
|
|
|
|
|
|
|
out:
|
2002-03-23 21:17:17 +00:00
|
|
|
|
if(context->updated_func)
|
|
|
|
|
context->updated_func(context->pixbuf, 0, first_row, context->width, context->cury - first_row + 1,
|
|
|
|
|
context->user_data);
|
2000-07-28 00:09:36 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
bv = FALSE; /* Nothing left to do, stop feeding me data! */
|
|
|
|
|
|
|
|
|
|
} while(bv);
|
|
|
|
|
|
2002-02-10 21:06:15 +00:00
|
|
|
|
if(size) {
|
|
|
|
|
bv = save_rest(context, buf, size);
|
|
|
|
|
if (!bv) {
|
|
|
|
|
g_set_error (error,
|
|
|
|
|
GDK_PIXBUF_ERROR,
|
|
|
|
|
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
|
|
|
|
_("Couldn't save the rest"));
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return TRUE;
|
2000-07-28 00:09:36 +00:00
|
|
|
|
}
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
|
|
|
|
|
void
|
2002-10-03 22:39:51 +00:00
|
|
|
|
MODULE_ENTRY (wbmp, fill_vtable) (GdkPixbufModule *module)
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
{
|
2002-10-03 22:39:51 +00:00
|
|
|
|
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;
|
Changes to make gdk-pixbuf threadsafe (#157310, #157306, Colin Walters):
2004-11-12 Matthias Clasen <mclasen@redhat.com>
Changes to make gdk-pixbuf threadsafe (#157310, #157306,
Colin Walters):
* gdk-pixbuf-io.h (enum GdkPixbufFormatFlags): Add
GDK_PIXBUF_FORMAT_THREADSAFE to indicate that an image loader
is threadsafe.
* gdk-pixbuf-io.c (get_file_formats, _gdk_pixbuf_load_module):
Use a lock to make initialization of global data structures
threadsafe.
* gdk-pixbuf-private.h:
* gdk-pixbuf-io.c (_gdk_pixbuf_lock, _gdk_pixbuf_unlock):
Auxiliary functions which use another lock to protect
threadunsafe image loaders.
* gdk-pixbuf-io.c (gdk_pixbuf_real_save):
(save_to_callback_with_tmp_file):
(gdk_pixbuf_real_save_to_callback):
(gdk_pixbuf_new_from_xpm_data):
(_gdk_pixbuf_generic_image_load):
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module):
(gdk_pixbuf_loader_close):
(gdk_pixbuf_loader_finalize):
Use _gdk_pixbuf_lock() and _gdk_pixbuf_unlock().
* io-ani.c, io-bmp.c, io-gif.c, io-ico.c:
* io-jpeg.c, io-pcx.c, io-png.c, io-pnm.c:
* io-ras.c, io-tga.c, io-wbmp.c, io-xbm.c:
* io-xpm.c: Mark as threadsafe.
* io-tiff.c: Remove pointless locking, mark as
threadunsafe.
2004-11-12 05:34:31 +00:00
|
|
|
|
info->flags = GDK_PIXBUF_FORMAT_THREADSAFE;
|
2004-07-08 03:56:36 +00:00
|
|
|
|
info->license = "LGPL";
|
Add built marshaller files to support GdkPixbufLoader signals
2001-01-22 Havoc Pennington <hp@redhat.com>
* Makefile.am: Add built marshaller files to support
GdkPixbufLoader signals
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
module location, rather than acting as a fallback, because we are
using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.
* gdk-pixbuf.h: include gdk-pixbuf-loader.h
* gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
from gtk, and add error to close(), because stop_load may do
parsing of the image.
* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file
* io-*.c: make individual operations static, and add fill_vtable
functions which are exported. Fix the collection of type warnings
that surfaced, including a number of functions that didn't
properly take a GError and some that weren't
const-correct. Involved adding error handling for a few loaders.
* gdk-pixbuf-io.h: Add error reporting to stop_load function
* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
a function that fills in the GdkPixbufModule vtable, instead of
looking up all the image functions individually; this means we
can get type safety within modules for the loader functions.
Also it means you don't have to keep the statically compiled and
GModule versions in sync.
* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()
* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()
* gdk-pixbuf.h: nuke gdk_pixbuf_init()
* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
() here
* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
g_type_init() here
2001-01-22 Havoc Pennington <hp@redhat.com>
* demos/testanimation.c: fix to reflect gdk-pixbuf changes
* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes
* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
Remove, move back to gdk-pixbuf
* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
to all the word functions
* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
before doing anything on NULL layout or if we don't have the focus
* gtk/testtext.c (fill_example_buffer): "justification"
* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
to be called "justification" not "justify"
* demos/gtk-demo/textview.c (create_tags): "justification"
* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
|
|
|
|
}
|