1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2 /* GdkPixbuf library - GDIP loader declarations
4 * Copyright (C) 1999 The Free Software Foundation
6 * Authors: Mark Crichton <crichton@gimp.org>
7 * Miguel de Icaza <miguel@gnu.org>
8 * Federico Mena-Quintero <federico@gimp.org>
9 * Havoc Pennington <hp@redhat.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the
23 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 * Boston, MA 02111-1307, USA.
27 #ifndef GDK_PIXBUF_GDIP_H
28 #define GDK_PIXBUF_GDIP_H
30 #include <gdk-pixbuf/gdk-pixbuf-animation.h>
32 typedef struct _GdkPixbufGdipAnim GdkPixbufGdipAnim;
33 typedef struct _GdkPixbufGdipAnimClass GdkPixbufGdipAnimClass;
34 typedef struct _GdkPixbufFrame GdkPixbufFrame;
36 #define GDK_TYPE_PIXBUF_GDIP_ANIM (gdk_pixbuf_gdip_anim_get_type ())
37 #define GDK_PIXBUF_GDIP_ANIM(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_GDIP_ANIM, GdkPixbufGdipAnim))
38 #define GDK_IS_PIXBUF_GDIP_ANIM(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_GDIP_ANIM))
40 #define GDK_PIXBUF_GDIP_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM, GdkPixbufGdipAnimClass))
41 #define GDK_IS_PIXBUF_GDIP_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM))
42 #define GDK_PIXBUF_GDIP_ANIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_GDIP_ANIM, GdkPixbufGdipAnimClass))
44 /* Private part of the GdkPixbufGdipAnim structure */
45 struct _GdkPixbufGdipAnim {
46 GdkPixbufAnimation parent_instance;
48 /* Number of frames */
51 /* Total length of animation */
54 /* List of GdkPixbufFrame structures */
57 /* bounding box size */
64 struct _GdkPixbufGdipAnimClass {
65 GdkPixbufAnimationClass parent_class;
69 GType gdk_pixbuf_gdip_anim_get_type (void) G_GNUC_CONST;
71 typedef struct _GdkPixbufGdipAnimIter GdkPixbufGdipAnimIter;
72 typedef struct _GdkPixbufGdipAnimIterClass GdkPixbufGdipAnimIterClass;
75 #define GDK_TYPE_PIXBUF_GDIP_ANIM_ITER (gdk_pixbuf_gdip_anim_iter_get_type ())
76 #define GDK_PIXBUF_GDIP_ANIM_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER, GdkPixbufGdipAnimIter))
77 #define GDK_IS_PIXBUF_GDIP_ANIM_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER))
79 #define GDK_PIXBUF_GDIP_ANIM_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER, GdkPixbufGdipAnimIterClass))
80 #define GDK_IS_PIXBUF_GDIP_ANIM_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER))
81 #define GDK_PIXBUF_GDIP_ANIM_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_GDIP_ANIM_ITER, GdkPixbufGdipAnimIterClass))
83 struct _GdkPixbufGdipAnimIter {
84 GdkPixbufAnimationIter parent_instance;
86 GdkPixbufGdipAnim *gdip_anim;
89 GTimeVal current_time;
91 /* Time in milliseconds into this run of the animation */
96 gint first_loop_slowness;
99 struct _GdkPixbufGdipAnimIterClass {
100 GdkPixbufAnimationIterClass parent_class;
104 GType gdk_pixbuf_gdip_anim_iter_get_type (void) G_GNUC_CONST;
106 struct _GdkPixbufFrame {
107 /* The pixbuf with this frame's image data */
110 /* Frame duration in ms */
113 /* Sum of preceding delay times */