1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
/* $Id: pixbufanimationiter.hg,v 1.2 2004/04/12 11:04:05 murrayc Exp $ */
/* pixbufanimationiter.h
*
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* 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.1 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm/object.h>
#include <gdkmm/pixbuf.h>
#include <glibmm/timeval.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
namespace Gdk
{
/** An iterator which points to a certain position in a PixbufAnimation.
*/
class PixbufAnimationIter : public Glib::Object
{
_CLASS_GOBJECT(PixbufAnimationIter, GdkPixbufAnimationIter, GDK_PIXBUF_ANIMATION_ITER, Glib::Object, GObject)
protected:
//A constructor (if any) would go here, protected.
public:
_WRAP_METHOD(int get_delay_time() const, gdk_pixbuf_animation_iter_get_delay_time)
_WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_pixbuf(), gdk_pixbuf_animation_iter_get_pixbuf, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const, gdk_pixbuf_animation_iter_get_pixbuf, refreturn, constversion)
_WRAP_METHOD(bool on_currently_loading_frame() const, gdk_pixbuf_animation_iter_on_currently_loading_frame)
#m4 _CONVERSION(`const Glib::TimeVal&', `const GTimeVal*', static_cast<$2>(&$3))
_WRAP_METHOD(bool advance(const Glib::TimeVal& current_time), gdk_pixbuf_animation_iter_advance)
/** 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.
*
* @newin{2,14}
*
* @return true if the image may need updating.
*/
bool advance();
};
} /* namespace Gdk */
|