]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/gdk-pixbuf-animation.h
Updated Bulgarian translation
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf-animation.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2 /* GdkPixbuf library - Animation support
3  *
4  * Copyright (C) 1999 The Free Software Foundation
5  *
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>
10  *
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.
15  *
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.
20  *
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.
25  */
26
27 #if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
28 #error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
29 #endif
30
31 #ifndef GDK_PIXBUF_ANIMATION_H
32 #define GDK_PIXBUF_ANIMATION_H
33
34 #include <glib-object.h>
35 #include <gdk-pixbuf/gdk-pixbuf-core.h>
36
37 G_BEGIN_DECLS
38
39 /* Animation support */
40
41 typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
42 typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
43
44 #define GDK_TYPE_PIXBUF_ANIMATION              (gdk_pixbuf_animation_get_type ())
45 #define GDK_PIXBUF_ANIMATION(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimation))
46 #define GDK_IS_PIXBUF_ANIMATION(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION))
47
48 #define GDK_TYPE_PIXBUF_ANIMATION_ITER              (gdk_pixbuf_animation_iter_get_type ())
49 #define GDK_PIXBUF_ANIMATION_ITER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter))
50 #define GDK_IS_PIXBUF_ANIMATION_ITER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER))
51
52 GType               gdk_pixbuf_animation_get_type        (void) G_GNUC_CONST;
53
54 #ifdef G_OS_WIN32
55 #define gdk_pixbuf_animation_new_from_file gdk_pixbuf_animation_new_from_file_utf8
56 #endif
57
58 GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file   (const char         *filename,
59                                                           GError            **error);
60
61 #ifndef GDK_PIXBUF_DISABLE_DEPRECATED
62 GdkPixbufAnimation *gdk_pixbuf_animation_ref             (GdkPixbufAnimation *animation);
63 void                gdk_pixbuf_animation_unref           (GdkPixbufAnimation *animation);
64 #endif
65
66 int                 gdk_pixbuf_animation_get_width       (GdkPixbufAnimation *animation);
67 int                 gdk_pixbuf_animation_get_height      (GdkPixbufAnimation *animation);
68 gboolean            gdk_pixbuf_animation_is_static_image  (GdkPixbufAnimation *animation);
69 GdkPixbuf          *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation);
70
71 GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter                        (GdkPixbufAnimation     *animation,
72                                                                               const GTimeVal         *start_time);
73 GType                   gdk_pixbuf_animation_iter_get_type                   (void) G_GNUC_CONST;
74 int                     gdk_pixbuf_animation_iter_get_delay_time             (GdkPixbufAnimationIter *iter);
75 GdkPixbuf              *gdk_pixbuf_animation_iter_get_pixbuf                 (GdkPixbufAnimationIter *iter);
76 gboolean                gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter);
77 gboolean                gdk_pixbuf_animation_iter_advance                    (GdkPixbufAnimationIter *iter,
78                                                                               const GTimeVal         *current_time);
79
80
81 #ifdef GDK_PIXBUF_ENABLE_BACKEND
82
83 \f
84
85 typedef struct _GdkPixbufAnimationClass GdkPixbufAnimationClass;
86
87 #define GDK_PIXBUF_ANIMATION_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass))
88 #define GDK_IS_PIXBUF_ANIMATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION))
89 #define GDK_PIXBUF_ANIMATION_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass))
90
91 /* Private part of the GdkPixbufAnimation structure */
92 struct _GdkPixbufAnimation {
93         GObject parent_instance;
94
95 };
96
97 struct _GdkPixbufAnimationClass {
98         GObjectClass parent_class;
99
100         /*< public >*/
101
102         gboolean                (*is_static_image)  (GdkPixbufAnimation *anim);
103
104         GdkPixbuf*              (*get_static_image) (GdkPixbufAnimation *anim);
105         
106         void                    (*get_size) (GdkPixbufAnimation *anim,
107                                              int                 *width,
108                                              int                 *height);
109         
110         GdkPixbufAnimationIter* (*get_iter) (GdkPixbufAnimation *anim,
111                                              const GTimeVal     *start_time);
112
113 };
114
115 \f
116
117 typedef struct _GdkPixbufAnimationIterClass GdkPixbufAnimationIterClass;
118
119 #define GDK_PIXBUF_ANIMATION_ITER_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass))
120 #define GDK_IS_PIXBUF_ANIMATION_ITER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER))
121 #define GDK_PIXBUF_ANIMATION_ITER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass))
122
123 struct _GdkPixbufAnimationIter {
124         GObject parent_instance;
125
126 };
127
128 struct _GdkPixbufAnimationIterClass {
129         GObjectClass parent_class;
130
131         /*< public >*/
132
133         int        (*get_delay_time)   (GdkPixbufAnimationIter *iter);
134
135         GdkPixbuf* (*get_pixbuf)       (GdkPixbufAnimationIter *iter);
136
137         gboolean   (*on_currently_loading_frame) (GdkPixbufAnimationIter *iter);
138
139         gboolean   (*advance)          (GdkPixbufAnimationIter *iter,
140                                         const GTimeVal         *current_time);
141 };
142       
143
144 GType               gdk_pixbuf_non_anim_get_type (void) G_GNUC_CONST;
145 GdkPixbufAnimation* gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf);
146
147 #endif /* GDK_PIXBUF_ENABLE_BACKEND */
148
149 G_END_DECLS
150
151 #endif /* GDK_PIXBUF_ANIMATION_H */