/* Copyright (C) 2007 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 <cluttermm/alpha.h>
#include <cluttermm/actor.h>

_DEFS(cluttermm,clutter)
_PINCLUDE(glibmm/private/object_p.h)


namespace Clutter
{

class Behaviour : public Glib::Object
{
  _CLASS_GOBJECT(Behaviour, ClutterBehaviour, CLUTTER_BEHAVIOUR, Glib::Object, GObject)

protected:
  _CTOR_DEFAULT()

public:
  //There is no create() because this is an abstract base class.
  //_WRAP_CREATE()

  _WRAP_METHOD(void apply(const Glib::RefPtr<Actor>& actor), clutter_behaviour_apply)
  _WRAP_METHOD(void remove(const Glib::RefPtr<Actor>& actor), clutter_behaviour_remove)
  _WRAP_METHOD(void remove_all(), clutter_behaviour_remove_all)
  _WRAP_METHOD(bool is_applied(const Glib::RefPtr<Actor>& actor), clutter_behaviour_is_applied)

  std::vector<Glib::RefPtr<Actor> >       get_actors();
  std::vector<Glib::RefPtr<Actor const> > get_actors() const;

  _WRAP_METHOD(int get_n_actors() const, clutter_behaviour_get_n_actors)

  _WRAP_METHOD(Glib::RefPtr<Actor> get_nth_actor(int index), clutter_behaviour_get_nth_actor)
  _WRAP_METHOD(Glib::RefPtr<const Actor> get_nth_actor(int index) const, clutter_behaviour_get_nth_actor, constversion)

  _WRAP_METHOD(Glib::RefPtr<Alpha> get_alpha(), clutter_behaviour_get_alpha)
  _WRAP_METHOD(Glib::RefPtr<const Alpha> get_alpha() const, clutter_behaviour_get_alpha, constversion)

  _WRAP_METHOD(void set_alpha(const Glib::RefPtr<Alpha>& alpha), clutter_behaviour_set_alpha)

  // TODO: does this need the 'behaviour' argument, or could that be
  // approximated with an Object-oriented 'this' pointer?
  /** For instance,
   * void on_foreach(const Glib::RefPtr<Behaviour>& behaviour, const Glib::RefPtr<Actor>& actor)
   */
  typedef sigc::slot<void, const Glib::RefPtr<Behaviour>&, const Glib::RefPtr<Actor>&> SlotForEach;

  void actors_foreach(const SlotForEach& slot);
  _IGNORE(clutter_behaviour_actors_foreach)


_CONVERSION(`ClutterActor*',`const Glib::RefPtr<Actor>&',`Glib::wrap($3)')
  _WRAP_SIGNAL(void applied(const Glib::RefPtr<Actor>& actor), "applied")
  _WRAP_SIGNAL(void removed(const Glib::RefPtr<Actor>& actor), "removed")



protected:
  _WRAP_VFUNC(void alpha_notify(double alpha_value), alpha_notify)
};

} // namespace Clutter
// vim:ts=2,sw=2
