gtk2/gdk-pixbuf/io-gdip-animation.h
Tor Lillqvist 6d15bbbe1d Import the GDI+ gdk-pixbuf loaders for Windows by Dominic Lachowicz and
2008-03-21  Tor Lillqvist  <tml@novell.com>

	Import the GDI+ gdk-pixbuf loaders for Windows by Dominic
	Lachowicz and Alberto Ruiz into the GTK+ tree, from the
	gdip-pixbuf-loader module.

	* configure.in: Add switch --disable-gdiplus-loaders that disables
	building of the GDI+ loaders.

	When including loaders in the gdk-pixbuf library, either build in
	abll the GDI+ ones or none of them. Use just -DINCLUDE_gdiplus in
	$INCLUDED_LOADER_DEFINE to signal building them in.

	Add Automake conditionals BUILD_GDIPLUS_LOADERS to indicate
	whether the GDI+ loaders should be built and INCLUDE_GDIPLUS to
	indicate whether they should be built-in.
	
	For the rest of the changes, see gdk-pixbuf/ChangeLog.

	In gdk-pixbuf:

	* Makefile.am: Add the bits and pieces for the GDI+ loaders. When
	building GDI+ loaders don't build the traditional ones for the
	same formats. Always build the traditional PNG loader, though, as
	it isn't possible to read and write PNG tEXt chunks through GDI+,
	and GIMP at least needs that functionality in the gdk-pixbuf PNG
	loader. 

	Either build all the GDI+ loaders (except the PNG one) into
	libgdk-pixbuf, or build them all as DLLs. I don't see any reason
	to enable cherry-picking among them whether to build in or not.

	* io-gdip-animation.c
	* io-gdip-animation.h
	* io-gdip-bmp.c
	* io-gdip-emf.c
	* io-gdip-gif.c
	* io-gdip-ico.c
	* io-gdip-jpeg.c
	* io-gdip-native.h
	* io-gdip-png.c
	* io-gdip-propertytags.h
	* io-gdip-tiff.c
	* io-gdip-utils.c
	* io-gdip-utils.h
	* io-gdip-wmf.c: New files. Note that io-gdip-png.c is not
	currently used.

	* gdk-pixbuf-io.c: Add the bits and pieces for built-in GDI+
	loaders.


svn path=/trunk/; revision=19914
2008-03-20 23:24:45 +00:00

118 lines
4.3 KiB
C

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/* GdkPixbuf library - GDIP loader declarations
*
* 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>
* Havoc Pennington <hp@redhat.com>
*
* 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.
*/
#ifndef GDK_PIXBUF_GDIP_H
#define GDK_PIXBUF_GDIP_H
#include <gdk-pixbuf/gdk-pixbuf-animation.h>
typedef struct _GdkPixbufGdipAnim GdkPixbufGdipAnim;
typedef struct _GdkPixbufGdipAnimClass GdkPixbufGdipAnimClass;
typedef struct _GdkPixbufFrame GdkPixbufFrame;
#define GDK_TYPE_PIXBUF_GDIP_ANIM (gdk_pixbuf_gdip_anim_get_type ())
#define GDK_PIXBUF_GDIP_ANIM(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_GDIP_ANIM, GdkPixbufGdipAnim))
#define GDK_IS_PIXBUF_GDIP_ANIM(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_GDIP_ANIM))
#define GDK_PIXBUF_GDIP_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM, GdkPixbufGdipAnimClass))
#define GDK_IS_PIXBUF_GDIP_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM))
#define GDK_PIXBUF_GDIP_ANIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_GDIP_ANIM, GdkPixbufGdipAnimClass))
/* Private part of the GdkPixbufGdipAnim structure */
struct _GdkPixbufGdipAnim {
GdkPixbufAnimation parent_instance;
/* Number of frames */
int n_frames;
/* Total length of animation */
int total_time;
/* List of GdkPixbufFrame structures */
GList *frames;
/* bounding box size */
int width, height;
int loop;
gboolean loading;
};
struct _GdkPixbufGdipAnimClass {
GdkPixbufAnimationClass parent_class;
};
GType gdk_pixbuf_gdip_anim_get_type (void) G_GNUC_CONST;
typedef struct _GdkPixbufGdipAnimIter GdkPixbufGdipAnimIter;
typedef struct _GdkPixbufGdipAnimIterClass GdkPixbufGdipAnimIterClass;
#define GDK_TYPE_PIXBUF_GDIP_ANIM_ITER (gdk_pixbuf_gdip_anim_iter_get_type ())
#define GDK_PIXBUF_GDIP_ANIM_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER, GdkPixbufGdipAnimIter))
#define GDK_IS_PIXBUF_GDIP_ANIM_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER))
#define GDK_PIXBUF_GDIP_ANIM_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER, GdkPixbufGdipAnimIterClass))
#define GDK_IS_PIXBUF_GDIP_ANIM_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER))
#define GDK_PIXBUF_GDIP_ANIM_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER, GdkPixbufGdipAnimIterClass))
struct _GdkPixbufGdipAnimIter {
GdkPixbufAnimationIter parent_instance;
GdkPixbufGdipAnim *gdip_anim;
GTimeVal start_time;
GTimeVal current_time;
/* Time in milliseconds into this run of the animation */
gint position;
GList *current_frame;
gint first_loop_slowness;
};
struct _GdkPixbufGdipAnimIterClass {
GdkPixbufAnimationIterClass parent_class;
};
GType gdk_pixbuf_gdip_anim_iter_get_type (void) G_GNUC_CONST;
struct _GdkPixbufFrame {
/* The pixbuf with this frame's image data */
GdkPixbuf *pixbuf;
/* Frame duration in ms */
int delay_time;
/* Sum of preceding delay times */
int elapsed;
};
#endif