// Generated by gtkmmproc -- DO NOT MODIFY!


#include <cluttermm/animator.h>
#include <cluttermm/private/animator_p.h>

/*
 * Copyright (c) 2011  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 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, see <http://www.gnu.org/licenses/>.
 */

#include <clutter/clutter.h>

namespace Clutter
{

} // namespace Clutter


namespace
{
} // anonymous namespace

// static
GType Glib::Value<Clutter::Interpolation>::value_type()
{
  return clutter_interpolation_get_type();
}


namespace Glib
{

Glib::RefPtr<Clutter::Animator> wrap(ClutterAnimator* object, bool take_copy)
{
  return Glib::RefPtr<Clutter::Animator>( dynamic_cast<Clutter::Animator*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Clutter
{


/* The *_Class implementation: */

const Glib::Class& Animator_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &Animator_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(clutter_animator_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:
  Scriptable::add_interface(get_type());

  }

  return *this;
}


void Animator_Class::class_init_function(void* g_class, void* class_data)
{
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* Animator_Class::wrap_new(GObject* object)
{
  return new Animator((ClutterAnimator*)object);
}


/* The implementation: */

ClutterAnimator* Animator::gobj_copy()
{
  reference();
  return gobj();
}

Animator::Animator(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{

}

Animator::Animator(ClutterAnimator* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


Animator::~Animator()
{}


Animator::CppClassType Animator::animator_class_; // initialize static member

GType Animator::get_type()
{
  return animator_class_.init().get_type();
}


GType Animator::get_base_type()
{
  return clutter_animator_get_type();
}


Animator::Animator()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Glib::Object(Glib::ConstructParams(animator_class_.init()))
{
  

}

Glib::RefPtr<Animator> Animator::create()
{
  return Glib::RefPtr<Animator>( new Animator() );
}
Glib::RefPtr<Animator> Animator::set_key(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name, guint mode, double progress, const Glib::ValueBase& value)
{

  Glib::RefPtr<Animator> retvalue = Glib::wrap(clutter_animator_set_key(gobj(), Glib::unwrap(object), property_name.c_str(), mode, progress, (value).gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;

}

Glib::RefPtr<const Animator> Animator::set_key(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name, guint mode, double progress, const Glib::ValueBase& value) const
{
  return const_cast<Animator*>(this)->set_key(object, property_name, mode, progress, value);
}

void Animator::remove_key(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name, double progress)
{
clutter_animator_remove_key(gobj(), Glib::unwrap(object), property_name.c_str(), progress); 
}

Glib::RefPtr<Timeline> Animator::start()
{

  Glib::RefPtr<Timeline> retvalue = Glib::wrap(clutter_animator_start(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;

}

Glib::RefPtr<const Timeline> Animator::start() const
{
  return const_cast<Animator*>(this)->start();
}

bool Animator::compute_value(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name, double progress, Glib::ValueBase& value)
{
  return clutter_animator_compute_value(gobj(), Glib::unwrap(object), property_name.c_str(), progress, (value).gobj());
}

void Animator::set_timeline(const Glib::RefPtr<Timeline>& timeline)
{
clutter_animator_set_timeline(gobj(), Glib::unwrap(timeline)); 
}

Glib::RefPtr<Timeline> Animator::get_timeline()
{

  Glib::RefPtr<Timeline> retvalue = Glib::wrap(clutter_animator_get_timeline(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;

}

Glib::RefPtr<const Timeline> Animator::get_timeline() const
{
  return const_cast<Animator*>(this)->get_timeline();
}

void Animator::set_duration(guint duration)
{
clutter_animator_set_duration(gobj(), duration); 
}

guint Animator::get_duration() const
{
  return clutter_animator_get_duration(const_cast<ClutterAnimator*>(gobj()));
}

void Animator::property_set_ease_in(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name, bool ease_in)
{
clutter_animator_property_set_ease_in(gobj(), Glib::unwrap(object), property_name.c_str(), static_cast<int>(ease_in)); 
}

bool Animator::property_get_ease_in(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name)
{
  return clutter_animator_property_get_ease_in(gobj(), Glib::unwrap(object), property_name.c_str());
}

void Animator::property_set_interpolation(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name, Interpolation interpolation)
{
clutter_animator_property_set_interpolation(gobj(), Glib::unwrap(object), property_name.c_str(), ((ClutterInterpolation)(interpolation))); 
}

Interpolation Animator::property_get_interpolation(const Glib::RefPtr<Glib::Object>& object, const Glib::ustring& property_name)
{
  return ((Interpolation)(clutter_animator_property_get_interpolation(gobj(), Glib::unwrap(object), property_name.c_str())));
}


#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<guint> Animator::property_duration() 
{
  return Glib::PropertyProxy<guint>(this, "duration");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<guint> Animator::property_duration() const
{
  return Glib::PropertyProxy_ReadOnly<guint>(this, "duration");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy< Glib::RefPtr<Timeline> > Animator::property_timeline() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Timeline> >(this, "timeline");
}
#endif //GLIBMM_PROPERTIES_ENABLED

#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Timeline> > Animator::property_timeline() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Timeline> >(this, "timeline");
}
#endif //GLIBMM_PROPERTIES_ENABLED


} // namespace Clutter


