Gdk::PixbufAnimationIter Class Reference
An iterator which points to a certain position in a PixbufAnimation. More...Inherits Glib::Object.
Public Member Functions | |
virtual | ~PixbufAnimationIter () |
GdkPixbufAnimationIter* | gobj () |
Provides access to the underlying C GObject. | |
const GdkPixbufAnimationIter* | gobj () const |
Provides access to the underlying C GObject. | |
GdkPixbufAnimationIter* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
Protected Member Functions | |
int | get_delay_time () const |
Gets the number of milliseconds the current pixbuf should be displayed, or -1 if the current pixbuf should be displayed forever. | |
Glib::RefPtr< Gdk::Pixbuf > | get_pixbuf () |
Gets the current pixbuf which should be displayed; the pixbuf will be the same size as the animation itself (get_width(), get_height()). | |
Glib::RefPtr< const Gdk::Pixbuf > | get_pixbuf () const |
Gets the current pixbuf which should be displayed; the pixbuf will be the same size as the animation itself (get_width(), get_height()). | |
bool | on_currently_loading_frame () const |
Used to determine how to respond to the area_updated signal on Gdk::PixbufLoader when loading an animation. | |
bool | advance (const Glib::TimeVal& current_time) |
bool | advance () |
Possibly advances an animation to a new frame. | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr < Gdk::PixbufAnimationIter > | wrap (GdkPixbufAnimationIter* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Detailed Description
An iterator which points to a certain position in a PixbufAnimation.Constructor& Destructor Documentation
virtual Gdk::PixbufAnimationIter::~PixbufAnimationIter | ( | ) | [virtual] |
Member Function Documentation
bool Gdk::PixbufAnimationIter::advance | ( | ) | [protected] |
Possibly advances an animation to a new frame.
Chooses the frame based on the start time passed to Gdk::PixbufAnimation::get_iter().
If this function returns false, there's no need to update the animation display, assuming the display had been rendered prior to advancing; if true, you need to call get_pixbuf() and update the display with the new pixbuf.
- Returns:
- true if the image may need updating.
bool Gdk::PixbufAnimationIter::advance | ( | const Glib::TimeVal & | current_time | ) | [protected] |
int Gdk::PixbufAnimationIter::get_delay_time | ( | ) | const [protected] |
Gets the number of milliseconds the current pixbuf should be displayed, or -1 if the current pixbuf should be displayed forever.
Glib::timeout_add() conveniently takes a timeout in milliseconds, so you can use a timeout to schedule the next update.
- Returns:
- Delay time in milliseconds (thousandths of a second).
Glib::RefPtr<const Gdk::Pixbuf> Gdk::PixbufAnimationIter::get_pixbuf | ( | ) | const [protected] |
Gets the current pixbuf which should be displayed; the pixbuf will be the same size as the animation itself (get_width(), get_height()).
This pixbuf should be displayed for get_delay_time() milliseconds. The caller of this function does not own a reference to the returned pixbuf; the returned pixbuf will become invalid when the iterator advances to the next frame, which may happen anytime you call advance(). Copy the pixbuf to keep it (don't just add a reference), as it may get recycled as you advance the iterator.
- Returns:
- The pixbuf to be displayed.
Glib::RefPtr<Gdk::Pixbuf> Gdk::PixbufAnimationIter::get_pixbuf | ( | ) | [protected] |
Gets the current pixbuf which should be displayed; the pixbuf will be the same size as the animation itself (get_width(), get_height()).
This pixbuf should be displayed for get_delay_time() milliseconds. The caller of this function does not own a reference to the returned pixbuf; the returned pixbuf will become invalid when the iterator advances to the next frame, which may happen anytime you call advance(). Copy the pixbuf to keep it (don't just add a reference), as it may get recycled as you advance the iterator.
- Returns:
- The pixbuf to be displayed.
const GdkPixbufAnimationIter* Gdk::PixbufAnimationIter::gobj | ( | ) | const [inline] |
GdkPixbufAnimationIter* Gdk::PixbufAnimationIter::gobj | ( | ) | [inline] |
GdkPixbufAnimationIter* Gdk::PixbufAnimationIter::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Gdk::PixbufAnimationIter::on_currently_loading_frame | ( | ) | const [protected] |
Used to determine how to respond to the area_updated signal on Gdk::PixbufLoader when loading an animation.
area_updated is emitted for an area of the frame currently streaming in to the loader. So if you're on the currently loading frame, you need to redraw the screen for the updated area.
- Returns:
true
if the frame we're on is partially loaded, or the last frame.
Friends And Related Function Documentation
Glib::RefPtr< Gdk::PixbufAnimationIter > wrap | ( | GdkPixbufAnimationIter * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
- Parameters:
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns:
- A C++ instance that wraps this C instance.
The documentation for this class was generated from the following file:
- gdkmm/pixbufanimationiter.h