2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _GDKMM_PIXBUFANIMATIONITER_H
4
#define _GDKMM_PIXBUFANIMATIONITER_H
9
/* $Id: pixbufanimationiter.hg,v 1.2 2004/04/12 11:04:05 murrayc Exp $ */
11
/* pixbufanimationiter.h
13
* Copyright (C) 1998-2002 The gtkmm Development Team
15
* This library is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU Lesser General Public
17
* License as published by the Free Software Foundation; either
18
* version 2.1 of the License, or (at your option) any later version.
20
* This library is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
* Lesser General Public License for more details.
25
* You should have received a copy of the GNU Lesser General Public
26
* License along with this library; if not, write to the Free
27
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30
#include <glibmm/object.h>
31
#include <gdkmm/pixbuf.h>
32
#include <gdk-pixbuf/gdk-pixbuf.h>
35
#ifndef DOXYGEN_SHOULD_SKIP_THIS
36
typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
37
typedef struct _GdkPixbufAnimationIterClass GdkPixbufAnimationIterClass;
38
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
42
{ class PixbufAnimationIter_Class; } // namespace Gdk
47
/** An iterator which points to a certain position in a PixbufAnimation.
50
class PixbufAnimationIter : public Glib::Object
53
#ifndef DOXYGEN_SHOULD_SKIP_THIS
56
typedef PixbufAnimationIter CppObjectType;
57
typedef PixbufAnimationIter_Class CppClassType;
58
typedef GdkPixbufAnimationIter BaseObjectType;
59
typedef GdkPixbufAnimationIterClass BaseClassType;
61
private: friend class PixbufAnimationIter_Class;
62
static CppClassType pixbufanimationiter_class_;
66
PixbufAnimationIter(const PixbufAnimationIter&);
67
PixbufAnimationIter& operator=(const PixbufAnimationIter&);
70
explicit PixbufAnimationIter(const Glib::ConstructParams& construct_params);
71
explicit PixbufAnimationIter(GdkPixbufAnimationIter* castitem);
73
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
76
virtual ~PixbufAnimationIter();
78
#ifndef DOXYGEN_SHOULD_SKIP_THIS
79
static GType get_type() G_GNUC_CONST;
82
static GType get_base_type() G_GNUC_CONST;
85
///Provides access to the underlying C GObject.
86
GdkPixbufAnimationIter* gobj() { return reinterpret_cast<GdkPixbufAnimationIter*>(gobject_); }
88
///Provides access to the underlying C GObject.
89
const GdkPixbufAnimationIter* gobj() const { return reinterpret_cast<GdkPixbufAnimationIter*>(gobject_); }
91
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
92
GdkPixbufAnimationIter* gobj_copy();
98
//A constructor (if any) would go here, protected.
102
/** Gets the number of milliseconds the current pixbuf should be displayed,
103
* or -1 if the current pixbuf should be displayed forever. Glib::signal_timeout.connect()
104
* conveniently takes a timeout in milliseconds, so you can use a timeout
105
* to schedule the next update.
108
* @return Delay time in milliseconds (thousandths of a second).
110
int get_delay_time() const;
113
/** Gets the current pixbuf which should be displayed; the pixbuf will
114
* be the same size as the animation itself
115
* (Gdk::Pixbuf::get_width(), Gdk::Pixbuf:get_height()).
116
* This pixbuf should be displayed for get_delay_time() milliseconds.
117
* The returned pixbuf will become invalid when the iterator advances
118
* to the next frame, which may happen anytime you call
119
* advance(). Copy the pixbuf to keep it, with
120
* Gdk::Pixbuf::copy() as it may get recycled as you advance the iterator.
123
* @return The pixbuf to be displayed.
125
Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
127
/** Gets the current pixbuf which should be displayed; the pixbuf will
128
* be the same size as the animation itself
129
* (Gdk::Pixbuf::get_width(), Gdk::Pixbuf:get_height()).
130
* This pixbuf should be displayed for get_delay_time() milliseconds.
131
* The returned pixbuf will become invalid when the iterator advances
132
* to the next frame, which may happen anytime you call
133
* advance(). Copy the pixbuf to keep it, with
134
* Gdk::Pixbuf::copy() as it may get recycled as you advance the iterator.
137
* @return The pixbuf to be displayed.
139
Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const;
142
/** Used to determine how to respond to the area_updated signal on
143
* Gdk::PixbufLoader when loading an animation. The area_updated signal is emitted
144
* for an area of the frame currently streaming in to the loader. So if
145
* you're on the currently loading frame, you need to redraw the screen for
149
* @return <tt>true</tt> if the frame we're on is partially loaded, or the last frame.
151
bool on_currently_loading_frame() const;
154
/** Possibly advances an animation to a new frame. Chooses the frame based
155
* on the start time passed to Gdk::PixbufAnimation::get_iter().
157
* @a current_time would normally come from Glib::get_current_time(), and
158
* must be greater than or equal to the time passed to
159
* Gdk::PixbufAnimation::get_iter(), and must increase or remain
160
* unchanged each time get_pixbuf() is
161
* called. That is, you can't go backward in time; animations only
164
* If using the method overload that takes no current_time parameter then the
165
* current time will be used. So you only need to explicitly pass
166
* @a current_time if you're doing something odd like playing the animation
169
* If this function returns <tt>false</tt>, there's no need to update the animation
170
* display, assuming the display had been rendered prior to advancing;
171
* if <tt>true</tt>, you need to call get_pixbuf() and update the
172
* display with the new pixbuf.
175
* @param current_time Current time.
176
* @return <tt>true</tt> if the image may need updating.
178
bool advance(const Glib::TimeVal& current_time);
180
/** Possibly advances an animation to a new frame. Chooses the frame based
181
* on the start time passed to Gdk::PixbufAnimation::get_iter().
183
* If this function returns false, there's no need to update the animation
184
* display, assuming the display had been rendered prior to advancing;
185
* if true, you need to call get_pixbuf() and update the
186
* display with the new pixbuf.
190
* @return true if the image may need updating.
198
//C++ methods used to invoke GTK+ virtual functions:
201
//GTK+ Virtual Functions (override these to change behaviour):
203
//Default Signal Handlers::
208
} /* namespace Gdk */
213
/** A Glib::wrap() method for this object.
215
* @param object The C instance.
216
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
217
* @result A C++ instance that wraps this C instance.
219
* @relates Gdk::PixbufAnimationIter
221
Glib::RefPtr<Gdk::PixbufAnimationIter> wrap(GdkPixbufAnimationIter* object, bool take_copy = false);
225
#endif /* _GDKMM_PIXBUFANIMATIONITER_H */