Commit e0fee22e authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

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
parent a081fe7d
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 <alexl@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_region):
......
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 <alexl@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_region):
......
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 <alexl@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_region):
......
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 <alexl@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_region):
......
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 <alexl@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_region):
......
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 <alexl@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_region):
......
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 <alexl@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_region):
......
......@@ -119,10 +119,10 @@ create_tags (GtkTextBuffer *buffer)
g_object_set (G_OBJECT (tag), "wrap_mode", GTK_WRAPMODE_NONE, NULL);
tag = gtk_text_buffer_create_tag (buffer, "center");
g_object_set (G_OBJECT (tag), "justify", GTK_JUSTIFY_CENTER, NULL);
g_object_set (G_OBJECT (tag), "justification", GTK_JUSTIFY_CENTER, NULL);
tag = gtk_text_buffer_create_tag (buffer, "right_justify");
g_object_set (G_OBJECT (tag), "justify", GTK_JUSTIFY_RIGHT, NULL);
g_object_set (G_OBJECT (tag), "justification", GTK_JUSTIFY_RIGHT, NULL);
tag = gtk_text_buffer_create_tag (buffer, "wide_margins");
g_object_set (G_OBJECT (tag),
......
......@@ -24,7 +24,7 @@
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gtk/gdk-pixbuf-loader.h>
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
typedef struct {
FILE *imagefile;
......@@ -322,7 +322,7 @@ update_timeout(gpointer data)
if (done) {
gtk_widget_queue_draw(*status->rgbwin);
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader));
gtk_object_destroy (GTK_OBJECT(status->loader));
g_object_destroy (G_OBJECT(status->loader));
fclose (status->imagefile);
g_free (status->buf);
}
......@@ -330,7 +330,6 @@ update_timeout(gpointer data)
return !done;
}
static void
progressive_prepared_callback(GdkPixbufLoader* loader, gpointer data)
{
......@@ -459,15 +458,17 @@ main (int argc, char **argv)
status.rgbwin = &rgb_window;
status.buf = g_malloc (readlen);
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
"area_prepared",
GTK_SIGNAL_FUNC(progressive_prepared_callback),
&rgb_window);
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
"area_updated",
GTK_SIGNAL_FUNC(progressive_updated_callback),
&rgb_window);
g_signal_connect_data(G_OBJECT(pixbuf_loader),
"area_prepared",
GTK_SIGNAL_FUNC(progressive_prepared_callback),
&rgb_window,
NULL, FALSE, FALSE);
g_signal_connect_data(G_OBJECT(pixbuf_loader),
"area_updated",
GTK_SIGNAL_FUNC(progressive_updated_callback),
&rgb_window,
NULL, FALSE, FALSE);
status.imagefile = fopen (argv[1], "r");
......
......@@ -23,7 +23,7 @@
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gtk/gdk-pixbuf-loader.h>
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
#include "test-inline-pixbufs.h"
......@@ -459,8 +459,9 @@ update_timeout(gpointer data)
if (done) {
gtk_widget_queue_draw(*status->rgbwin);
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader));
gtk_object_destroy (GTK_OBJECT(status->loader));
/* ignoring errors, we should not do that. */
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader), NULL);
g_object_unref (G_OBJECT(status->loader));
fclose (status->imagefile);
g_free (status->buf);
}
......@@ -596,15 +597,17 @@ main (int argc, char **argv)
status.rgbwin = &rgb_window;
status.buf = g_malloc (readlen);
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
"area_prepared",
GTK_SIGNAL_FUNC(progressive_prepared_callback),
&rgb_window);
gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
"area_updated",
GTK_SIGNAL_FUNC(progressive_updated_callback),
&rgb_window);
g_signal_connect_data (G_OBJECT(pixbuf_loader),
"area_prepared",
GTK_SIGNAL_FUNC(progressive_prepared_callback),
&rgb_window,
NULL, FALSE, FALSE);
g_signal_connect_data (G_OBJECT(pixbuf_loader),
"area_updated",
GTK_SIGNAL_FUNC(progressive_updated_callback),
&rgb_window,
NULL, FALSE, FALSE);
status.imagefile = fopen (argv[1], "r");
......
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-20 John Harper <jsh@eazel.com>
* io-xbm.c: new pixbuf loader, for X bitmap files. Basically a
......
......@@ -166,7 +166,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
-I$(top_srcdir)/gdk-pixbuf \
-I$(top_builddir)/gdk-pixbuf \
@INCLUDED_LOADER_DEFINE@ \
$(GLIB_CFLAGS)
@GLIB_CFLAGS@
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\""
LDADDS = libgdk_pixbuf-1.3.la $(GLIB_LIBS) $(STATIC_LIB_DEPS)
......@@ -185,6 +185,8 @@ GDK_PIXBUF_LIBS = $(GLIB_LIBS) $(INTLLIBS)
# The GdkPixBuf library
#
BUILT_SOURCES=gdk-pixbuf-marshal.h gdk-pixbuf-marshal.c
libgdk_pixbufincludedir = $(includedir)/gtk-2.0/gdk-pixbuf
libgdk_pixbuf_1_3_la_SOURCES = \
......@@ -193,6 +195,8 @@ libgdk_pixbuf_1_3_la_SOURCES = \
gdk-pixbuf-animation.c \
gdk-pixbuf-data.c \
gdk-pixbuf-io.c \
gdk-pixbuf-loader.c \
gdk-pixbuf-marshal.h \
gdk-pixbuf-scale.c \
gdk-pixbuf-util.c
......@@ -205,6 +209,7 @@ libgdk_pixbuf_1_3_la_DEPENDENCIES = $(builtin_objs)
libgdk_pixbufinclude_HEADERS = \
gdk-pixbuf.h \
gdk-pixbuf-loader.h \
gdk-pixbuf-features.h
noinst_HEADERS = \
......@@ -227,3 +232,15 @@ EXTRA_DIST = \
pixbufloader_wbmp.def \
pixbufloader_xbm.def
gdk-pixbuf-marshal.h: gdk-pixbuf-marshal.list
cd $(srcdir) \
&& glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >> xgen-gmh \
&& (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h) \
&& rm -f xgen-gmh xgen-gmh~
gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.list
cd $(srcdir) \
&& glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >> xgen-gmh \
&& (cmp -s xgen-gmh gdk-pixbuf-marshal.c || cp xgen-gmh gdk-pixbuf-marshal.c) \
&& rm -f xgen-gmh xgen-gmh~
......@@ -50,7 +50,9 @@ gdk_pixbuf_animation_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
g_type_init ();
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkPixbufAnimation",
&object_info, 0);
......@@ -457,6 +459,8 @@ gdk_pixbuf_frame_get_type (void)
if (our_type == 0)
{
g_type_init ();
our_type = g_boxed_type_register_static ("GdkPixbufFrame",
gdk_pixbuf_frame_copy,
gdk_pixbuf_frame_free);
......
......@@ -260,281 +260,173 @@ gdk_pixbuf_load_module (GdkPixbufModule *image_module,
char *module_name;
char *path;
GModule *module;
gpointer load_sym;
gpointer save_sym;
gpointer sym;
char *name;
gboolean retval;
char *dir;
g_return_val_if_fail (image_module->module == NULL, FALSE);
name = image_module->module_name;
module_name = g_strconcat ("pixbufloader-", name, NULL);
path = g_module_build_path (PIXBUF_LIBDIR, module_name);
module = g_module_open (path, G_MODULE_BIND_LAZY);
if (!module) {
/* Debug feature, check in GDK_PIXBUF_MODULEDIR, or working directory */
char *dir = g_getenv ("GDK_PIXBUF_MODULEDIR");
if (!dir)
dir = "";
g_free (path);
path = g_module_build_path (dir, module_name);
/* This would be an exploit in an suid binary using gdk-pixbuf,
* but see http://www.gtk.org/setuid.html or the BugTraq
* archives for why you should report this as a bug against
* setuid apps using this library rather than the library
* itself.
*/
dir = g_getenv ("GDK_PIXBUF_MODULEDIR");
if (dir == NULL || *dir == '\0') {
path = g_module_build_path (PIXBUF_LIBDIR, module_name);
module = g_module_open (path, G_MODULE_BIND_LAZY);
} else {
path = g_module_build_path (dir, module_name);
module = g_module_open (path, G_MODULE_BIND_LAZY);
}
if (!module) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
_("Unable to load image-loading module: %s: %s"),
path, g_module_error ());
g_free (module_name);
g_free (path);
return FALSE;
}
g_free (path);
} else {
if (!module) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
_("Unable to load image-loading module: %s: %s"),
path, g_module_error ());
g_free (module_name);
g_free (path);
return FALSE;
}
g_free (module_name);
image_module->module = module;
if (pixbuf_module_symbol (module, name, "image_load", &load_sym))
image_module->load = load_sym;
if (pixbuf_module_symbol (module, name, "image_load_xpm_data", &load_sym))
image_module->load_xpm_data = load_sym;
if (pixbuf_module_symbol (module, name, "image_begin_load", &load_sym))
image_module->begin_load = load_sym;
if (pixbuf_module_symbol (module, name, "image_stop_load", &load_sym))
image_module->stop_load = load_sym;
if (pixbuf_module_symbol (module, name, "image_load_increment", &load_sym))
image_module->load_increment = load_sym;
if (pixbuf_module_symbol (module, name, "image_load_animation", &load_sym))
image_module->load_animation = load_sym;
image_module->module = module;
if (pixbuf_module_symbol (module, name, "fill_vtable", &sym)) {
ModuleFillVtableFunc func = sym;
(* func) (image_module);
retval = TRUE;
} else {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
_("Image-loading module %s does not export the proper interface; perhaps it's from a different GTK version?"),
path);
retval = FALSE;
}
if (pixbuf_module_symbol (module, name, "image_save", &save_sym))
image_module->save = save_sym;
g_free (path);
return TRUE;
return retval;
}
#else
#define mname(type,fn) gdk_pixbuf__ ## type ## _image_ ##fn
#define m_load(type) extern GdkPixbuf * mname(type,load) (FILE *f, GError **error);
#define m_load_xpm_data(type) extern GdkPixbuf * mname(type,load_xpm_data) (const char **data);
#define m_begin_load(type) \
extern gpointer mname(type,begin_load) (ModulePreparedNotifyFunc prepare_func, \
ModuleUpdatedNotifyFunc update_func, \
ModuleFrameDoneNotifyFunc frame_done_func,\
ModuleAnimationDoneNotifyFunc anim_done_func,\
gpointer user_data,\
GError **error);
#define m_stop_load(type) extern void mname(type,stop_load) (gpointer context);
#define m_load_increment(type) extern gboolean mname(type,load_increment) (gpointer context, const guchar *buf, guint size, GError **error);
#define m_load_animation(type) extern GdkPixbufAnimation * mname(type,load_animation) (FILE *f, GError **error);
#define m_save(type) \
extern gboolean mname(type,save) (FILE *f, \
GdkPixbuf *pixbuf, \
gchar **keys, \
gchar **values, \
GError **error);
/* PNG */
m_load (png);
m_begin_load (png);
m_load_increment (png);
m_stop_load (png);
m_save (png);
/* BMP */
m_load (bmp);
m_begin_load (bmp);
m_load_increment (bmp);
m_stop_load (bmp);
/* WBMP */
m_load (wbmp);
m_begin_load (wbmp);
m_load_increment (wbmp);
m_stop_load (wbmp);
/* GIF */
m_load (gif);
m_begin_load (gif);
m_load_increment (gif);
m_stop_load (gif);
m_load_animation (gif);
/* ICO */
m_load (ico);
m_begin_load (ico);
m_load_increment (ico);
m_stop_load (ico);
/* JPEG */
m_load (jpeg);
m_begin_load (jpeg);
m_load_increment (jpeg);
m_stop_load (jpeg);
m_save (jpeg);
/* PNM */
m_load (pnm);
m_begin_load (pnm);
m_load_increment (pnm);
m_stop_load (pnm);
/* RAS */
m_load (ras);
m_begin_load (ras);
m_load_increment (ras);
m_stop_load (ras);
/* TIFF */
m_load (tiff);
m_begin_load (tiff);
m_load_increment (tiff);
m_stop_load (tiff);
/* XPM */
m_load (xpm);
m_load_xpm_data (xpm);
/* XBM */
m_load (xbm);
m_begin_load (xbm);
m_load_increment (xbm);
m_stop_load (xbm);
#define m_fill_vtable(type) extern void mname(type,fill_vtable) (GdkPixbufModule *module)
m_fill_vtable (png);
m_fill_vtable (bmp);
m_fill_vtable (wbmp);
m_fill_vtable (gif);
m_fill_vtable (ico);
m_fill_vtable (jpeg);
m_fill_vtable (pnm);
m_fill_vtable (ras);
m_fill_vtable (tiff);
m_fill_vtable (xpm);
m_fill_vtable (xbm);
gboolean
gdk_pixbuf_load_module (GdkPixbufModule *image_module,
GError **error)
{
ModuleFillVtableFunc fill_vtable = NULL;
image_module->module = (void *) 1;
if (FALSE) {
/* Ugly hack so we can use else if unconditionally below ;-) */
}
#ifdef INCLUDE_png
if (strcmp (image_module->module_name, "png") == 0){
image_module->load = mname (png,load);
image_module->begin_load = mname (png,begin_load);
image_module->load_increment = mname (png,load_increment);
image_module->stop_load = mname (png,stop_load);
image_module->save = mname (png,save);
return TRUE;
else if (strcmp (image_module->module_name, "png") == 0){
fill_vtable = mname (png, fill_vtable);
}
#endif
#ifdef INCLUDE_bmp
if (strcmp (image_module->module_name, "bmp") == 0){
image_module->load = mname (bmp,load);
image_module->begin_load = mname (bmp,begin_load);
image_module->load_increment = mname (bmp,load_increment);
image_module->stop_load = mname (bmp,stop_load);
return TRUE;
else if (strcmp (image_module->module_name, "bmp") == 0){
fill_vtable = mname (bmp, fill_vtable);
}
#endif
#ifdef INCLUDE_wbmp
if (strcmp (image_module->module_name, "wbmp") == 0){
image_module->load = mname (wbmp,load);
image_module->begin_load = mname (wbmp,begin_load);
image_module->load_increment = mname (wbmp,load_increment);
image_module->stop_load = mname (wbmp,stop_load);
return TRUE;
else if (strcmp (image_module->module_name, "wbmp") == 0){
fill_vtable = mname (wbmp, fill_vtable);
}
#endif
#ifdef INCLUDE_gif
if (strcmp (image_module->module_name, "gif") == 0){
image_module->load = mname (gif,load);
image_module->begin_load = mname (gif,begin_load);
image_module->load_increment = mname (gif,load_increment);
image_module->stop_load = mname (gif,stop_load);
image_module->load_animation = mname (gif,load_animation);
return TRUE;
else if (strcmp (image_module->module_name, "gif") == 0){
fill_vtable = mname (gif, fill_vtable);
}
#endif
#ifdef INCLUDE_ico
if (strcmp (image_module->module_name, "ico") == 0){
image_module->load = mname (ico,load);
image_module->begin_load = mname (ico,begin_load);
image_module->load_increment = mname (ico,load_increment);
image_module->stop_load = mname (ico,stop_load);
return TRUE;
else if (strcmp (image_module->module_name, "ico") == 0){
fill_vtable = mname (ico, fill_vtable);
}
#endif
#ifdef INCLUDE_jpeg
if (strcmp (image_module->module_name, "jpeg") == 0){
image_module->load = mname (jpeg,load);
image_module->begin_load = mname (jpeg,begin_load);
image_module->load_increment = mname (jpeg,load_increment);
image_module->stop_load = mname (jpeg,stop_load);
image_module->save = mname (jpeg,save);
return TRUE;
else if (strcmp (image_module->module_name, "jpeg") == 0){
fill_vtable = mname (jpeg, fill_vtable);
}
#endif
#ifdef INCLUDE_pnm
if (strcmp (image_module->module_name, "pnm") == 0){
image_module->load = mname (pnm,load);
image_module->begin_load = mname (pnm,begin_load);
image_module->load_increment = mname (pnm,load_increment);
image_module->stop_load = mname (pnm,stop_load);
return TRUE;
else if (strcmp (image_module->module_name, "pnm") == 0){
fill_vtable = mname (pnm, fill_vtable);
}
#endif