animation: Allow detaching an animation from an actor
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 10 Sep 2010 10:18:53 +0000 (11:18 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 10 Sep 2010 10:18:53 +0000 (11:18 +0100)
commit71a4db613569cd08572db517a045224161ba67d7
treeec5b6b4d521f87b8d394a94b93185f728c9b41c7
parent3aa2d00c3bf034b478fcc040056c25ef6f46baa0
animation: Allow detaching an animation from an actor

When animating an actor through clutter_actor_animate() and friends we
might want forcibly detach the animation instance from the actor in
order to start a new one - for instance, in response to user
interaction.

Currently, there is no way to do that except in a very convoluted way,
by emitting the ::completed signal and adding a special case in the
signal handlers; this is due to the fact that clutter_actor_animate()
adds more logic than the one added by clutter_animation_set_object(),
so calling set_object(NULL) or unreferencing the animation instance
itself won't be enough.

The right way to approach this is to add a new method to Clutter.Actor
that detaches any eventual Animation currently referencing it.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2051
clutter/clutter-animation.c
clutter/clutter-animation.h
doc/reference/clutter/clutter-sections.txt