animatable: Allow passing a NULL animation
authorEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 31 Jul 2010 09:40:21 +0000 (10:40 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 31 Jul 2010 09:56:09 +0000 (10:56 +0100)
commitc23b28396866cfcffa64e16d3d55075be04e0d4e
treec5b3b73fcf18e561da8ee4874307eed3fd102d77
parentc65c0f08d8ea6532f873b09d45033a7e546e05be
animatable: Allow passing a NULL animation

The Animatable interface was created specifically for the Animation
class. It turns out that it might be fairly useful to others - such as
ClutterAnimator and ClutterState.

The newly-added API in this cycle for querying and accessing custom
properties should not require that we pass a ClutterAnimation to the
implementations: the Animatable itself should be enough.

This is necessary to allow language bindings to wrap
clutter_actor_animate() correctly and do type validation and
demarshalling between native values and GValues; an Animation instance
is not available until the animate() call returns, and validation must
be performed before that happens.

There is nothing we can do about the animate_property() virtual
function - but in that case we might want to be able to access the
animation from an Animatable implementation to get the Interval for
the property, just like ClutterActor does in order to animate
ClutterActorMeta objects.
clutter/clutter-actor.c
clutter/clutter-animatable.c
clutter/clutter-animatable.h
clutter/clutter-animation.c