## ClutterAnimatable

ClutterAnimatable — Interface for animatable classes

## Synopsis

                        ClutterAnimatable;
                        ClutterAnimatableIface;
    gboolean            clutter_animatable_animate_property (ClutterAnimatable *animatable,
                                                             ClutterAnimation *animation,
                                                             const gchar *property_name,
                                                             const GValue *initial_value,
                                                             const GValue *final_value,
                                                             gdouble progress,
                                                             GValue *value);

## Object Hierarchy

      GInterface
       +----ClutterAnimatable

## Description

ClutterAnimatable is an interface that allows a GObject class to control how a ClutterAnimation will animate a property.

Each ClutterAnimatable should implement the `animate_property()` virtual function of the interface to compute the animation state between two values of an interval depending on a progress factor, expressed as a floating point value.

If a ClutterAnimatable is animated by a ClutterAnimation instance, the ClutterAnimation will call `clutter_animatable_animate_property()` passing the name of the currently animated property; the initial and final values of the animation interval; the progress factor. The ClutterAnimatable implementation should return the computed value for the animated property.

ClutterAnimatable is available since Clutter 1.0

## Details

### ClutterAnimatable

    typedef struct _ClutterAnimatable ClutterAnimatable;

### ClutterAnimatableIface

    typedef struct {
      gboolean (* animate_property) (ClutterAnimatable *animatable,
                                     ClutterAnimation  *animation,
                                     const gchar       *property_name,
                                     const GValue      *initial_value,
                                     const GValue      *final_value,
                                     gdouble            progress,
                                     GValue            *value);
    } ClutterAnimatableIface;

Base interface for GObjects that can be animated by a a ClutterAnimation.

`animate_property` () | virtual function for animating a property

Since 1.0

### clutter_animatable_animate_property ()

    gboolean            clutter_animatable_animate_property (ClutterAnimatable *animatable,
                                                             ClutterAnimation *animation,
                                                             const gchar *property_name,
                                                             const GValue *initial_value,
                                                             const GValue *final_value,
                                                             gdouble progress,
                                                             GValue *value);

Calls the `animate_property()` virtual function for `animatable`.

The `initial_value` and `final_value` GValues must contain the same type; `value` must have been initialized to the same type of `initial_value` and `final_value`.

All implementation of the ClutterAnimatable interface must implement this function.

`animatable` : | a ClutterAnimatable
`animation` : | a ClutterAnimation
`property_name` : | the name of the animated property
`initial_value` : | the initial value of the animation interval
`final_value` : | the final value of the animation interval
`progress` : | the progress factor
`value` : | return location for the animation value
Returns : | `TRUE` if the value has been validated and can be applied to the ClutterAnimatable, and `FALSE` otherwise

Since 1.0