// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _CLUTTERMM_ANIMATION_H
#define _CLUTTERMM_ANIMATION_H


#include <glibmm.h>

/* Copyright (C) 2009 The cluttermm 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 <cluttermm/alpha.h>
#include <cluttermm/actor.h>
#include <cluttermm/interval.h>
#include <cluttermm/timeline.h>
#include <clutter/clutter.h>
 

#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _ClutterAnimation ClutterAnimation;
typedef struct _ClutterAnimationClass ClutterAnimationClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Clutter
{ class Animation_Class; } // namespace Clutter
namespace Clutter
{


class Animation : public Glib::Object
{

  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Animation CppObjectType;
  typedef Animation_Class CppClassType;
  typedef ClutterAnimation BaseObjectType;
  typedef ClutterAnimationClass BaseClassType;

private:  friend class Animation_Class;
  static CppClassType animation_class_;

private:
  // noncopyable
  Animation(const Animation&);
  Animation& operator=(const Animation&);

protected:
  explicit Animation(const Glib::ConstructParams& construct_params);
  explicit Animation(ClutterAnimation* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Animation();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;


  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  ClutterAnimation*       gobj()       { return reinterpret_cast<ClutterAnimation*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const ClutterAnimation* gobj() const { return reinterpret_cast<ClutterAnimation*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  ClutterAnimation* gobj_copy();

private:


protected:
  Animation();

public:
  
  static Glib::RefPtr<Animation> create();


  /** Attaches @a animation to @a object. The Clutter::Animation will take a
   * reference on @a object.
   * 
   * @newin{1,0}
   * @param object A Object.
   */
  void set_object(const Glib::RefPtr<Glib::Object>& object);
  
  /** Retrieves the Object attached to @a animation.
   * 
   * @newin{1,0}
   * @return A Object.
   */
  Glib::RefPtr<Glib::Object> get_object();
  
  /** Retrieves the Object attached to @a animation.
   * 
   * @newin{1,0}
   * @return A Object.
   */
  Glib::RefPtr<const Glib::Object> get_object() const;
  
  /** Sets the animation @a mode of @a animation. The animation @a mode is
   * a logical id, either coming from the Clutter::AnimationMode enumeration
   * or the return value of Clutter::Alpha::register_func().
   * 
   * This function will also set Clutter::Animation:alpha if needed.
   * 
   * @newin{1,0}
   * @param mode An animation mode logical id.
   */
  void set_mode(gulong mode);
  
  /** Retrieves the animation mode of @a animation, as set by
   * set_mode().
   * 
   * @newin{1,0}
   * @return The mode for the animation.
   */
  gulong get_mode() const;

  
  /** Sets the duration of @a animation in milliseconds.
   * 
   * This function will set Clutter::Animation:alpha and
   * Clutter::Animation:timeline if needed.
   * 
   * @newin{1,0}
   * @param msecs The duration in milliseconds.
   */
  void set_duration(guint msecs);
  
  /** Retrieves the duration of @a animation, in milliseconds.
   * 
   * @newin{1,0}
   * @return The duration of the animation.
   */
  guint get_duration() const;
  
  
  /** Sets whether @a animation should loop over itself once finished.
   * 
   * A looping Clutter::Animation will not emit the Clutter::Animation::completed
   * signal when finished.
   * 
   * This function will set Clutter::Animation:alpha and
   * Clutter::Animation:timeline if needed.
   * 
   * @newin{1,0}
   * @param loop <tt>true</tt> if the animation should loop.
   */
  void set_loop(bool loop=true);
  
  /** Retrieves whether @a animation is looping.
   * 
   * @newin{1,0}
   * @return <tt>true</tt> if the animation is looping.
   */
  bool get_loop() const;
  
  /** Sets the Clutter::Timeline used by @a animation.
   * 
   * @newin{1,0}
   * @param timeline A Clutter::Timeline, or <tt>0</tt> to unset the
   * current Clutter::Timeline.
   */
  void set_timeline(const Glib::RefPtr<Timeline>& timeline);
  
  /** Retrieves the Clutter::Timeline used by @a animation
   * 
   * @newin{1,0}
   * @return The timeline used by the animation.
   */
  Glib::RefPtr<Timeline> get_timeline() const;
  
  /** Sets @a alpha as the Clutter::Alpha used by @a animation.
   * 
   * If @a alpha is not <tt>0</tt>, the Clutter::Animation will take ownership
   * of the Clutter::Alpha instance.
   * 
   * @newin{1,0}
   * @param alpha A Clutter::Alpha, or <tt>0</tt> to unset the current Clutter::Alpha.
   */
  void set_alpha(const Glib::RefPtr<Alpha>& alpha);
  
  /** Retrieves the Clutter::Alpha used by @a animation.
   * 
   * @newin{1,0}
   * @return The alpha object used by the animation.
   */
  Glib::RefPtr<Alpha> get_alpha() const;
  
  /** Emits the ::completed signal on @a animation
   * 
   * When using this function with a Clutter::Animation created
   * by the Clutter::Actor::animate() family of functions, @a animation
   * will be unreferenced and it will not be valid anymore,
   * unless Glib::object_ref() was called before calling this function
   * or unless a reference was taken inside a handler for the
   * Clutter::Animation::completed signal
   * 
   * @newin{1,0}
   */
  void completed();
  
  /** Adds a single property with name @a property_name to the
   * animation @a animation.  For more information about animations,
   * see Clutter::Actor::animate().
   * 
   * This method returns the animation primarily to make chained
   * calls convenient in language bindings.
   * 
   * @newin{1,0}
   * @param property_name The property to control.
   * @param final The final value of the property.
   * @return The animation itself.
   */
  Glib::RefPtr<Animation> bind(const std::string& property_name, const Glib::ValueBase& final);
   //TODO: Add templated bind().
   
  
  /** Binds @a interval to the @a property_name of the Object
   * attached to @a animation. The Clutter::Animation will take
   * ownership of the passed Clutter::Interval.  For more information
   * about animations, see Clutter::Actor::animate().
   * 
   * If you need to update the interval instance use
   * clutter_animation_update_property() instead.
   * 
   * @newin{1,0}
   * @param property_name The property to control.
   * @param interval A Clutter::Interval.
   * @return The animation itself.
   */
  void bind_interval(const std::string& property_name, const Glib::RefPtr<Interval>& interval);
  
  /** Changes the @a interval for @a property_name. The Clutter::Animation
   * will take ownership of the passed Clutter::Interval.
   * 
   * @newin{1,0}
   * @param property_name Name of the property.
   * @param interval A Clutter::Interval.
   */
  void update_interval(const std::string& property_name, const Glib::RefPtr<Interval>& interval);
  
  /** Checks whether @a animation is controlling @a property_name.
   * 
   * @newin{1,0}
   * @param property_name Name of the property.
   * @return <tt>true</tt> if the property is animated by the
   * Clutter::Animation, <tt>false</tt> otherwise.
   */
  bool has_property(const std::string& property_name) const;
  
  
  /** Updates the @a final value of the interval for @a property_name
   * 
   * @newin{1,0}
   * @param property_name Name of the property.
   * @param final The final value of the property.
   * @return The animation itself.
   */
  Glib::RefPtr<Animation> update(const std::string& property_name, const Glib::ValueBase& final);
  //TODO: Add templated update().
  
  
  /** Removes @a property_name from the list of animated properties.
   * 
   * @newin{1,0}
   * @param property_name Name of the property.
   */
  void unbind_property(const std::string& property_name);
  
  /** Retrieves the Clutter::Interval associated to @a property_name
   * inside @a animation.
   * 
   * @newin{1,0}
   * @param property_name Name of the property.
   * @return A Clutter::Interval or <tt>0</tt> if no
   * property with the same name was found. The returned interval is
   * owned by the Clutter::Animation and should not be unreferenced.
   */
  Glib::RefPtr<Interval> get_interval(const std::string& property_name) const;

  
  /**
   * @par Prototype:
   * <tt>void on_my_%started()</tt>
   */

  Glib::SignalProxy0< void > signal_started();

  
  /**
   * @par Prototype:
   * <tt>void on_my_%completed()</tt>
   */

  Glib::SignalProxy0< void > signal_completed();

  
  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Object to which the animation applies.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy< Glib::RefPtr<Glib::Object> > property_object() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Object to which the animation applies.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Glib::Object> > property_object() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** The mode of the animation.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<gulong> property_mode() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** The mode of the animation.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<gulong> property_mode() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Duration of the animation, in milliseconds.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<guint> property_duration() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Duration of the animation, in milliseconds.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<guint> property_duration() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the animation should loop.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy<bool> property_loop() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the animation should loop.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly<bool> property_loop() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** The timeline used by the animation.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy< Glib::RefPtr<Timeline> > property_timeline() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** The timeline used by the animation.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Timeline> > property_timeline() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

  #ifdef GLIBMM_PROPERTIES_ENABLED
/** The alpha used by the animation.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy< Glib::RefPtr<Alpha> > property_alpha() ;
#endif //#GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
/** The alpha used by the animation.
   *
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
   * the value of the property changes.
   */
  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Alpha> > property_alpha() const;
#endif //#GLIBMM_PROPERTIES_ENABLED

                               
public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::
  virtual void on_started();
  virtual void on_completed();


};

} // namespace Clutter


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Clutter::Animation
   */
  Glib::RefPtr<Clutter::Animation> wrap(ClutterAnimation* object, bool take_copy = false);
}


#endif /* _CLUTTERMM_ANIMATION_H */

