9799750c03
In order to chain up animations using clutter_actor_animate() and friends you have to use an idle handler that guarantees that the main loop spins at least once after the animation pointer has been detached from the actor. This has several drawbacks, first and foremost the fact that the slice of the main loop for the idle handler might be starved by other operations, like redrawing. This inevitably leads to tricks with priorities and the like, contributing to the overall complexity. Instead, we should guarantee that the animation instance created by clutter_actor_animate() is valid for the ::completed signal until it reaches its default handler; after that, the animation is detached from the actor and destroyed. This means that it's possible to create a new animation after the first is complete by simply using g_signal_connect_after(). This unfortunately makes it impossible to keep a reference to the animation pointer attached to the actor by using g_object_ref(); a way to "fix" this would be to have a clutter_animation_attach() and a clutter_animation_detach() pair of methods that allow attaching any animation to an actor. This might overcomplicate what it is the simple animation API, though, so it's currently not implemented and left for future versions. The test-easing interactive demo has been modified to show how the animation queuing works by adding a command line switch that recenters the animated actor once the first animation has ended. |
||
---|---|---|
.. | ||
Makefile.am | ||
test-actor-clone.c | ||
test-actors.c | ||
test-animation.c | ||
test-behave.c | ||
test-binding-pool.c | ||
test-clip.c | ||
test-clutter-cairo-flowers.c | ||
test-cogl-multitexture.c | ||
test-cogl-offscreen.c | ||
test-cogl-primitives.c | ||
test-cogl-tex-convert.c | ||
test-cogl-tex-foreign.c | ||
test-cogl-tex-getset.c | ||
test-cogl-tex-polygon.c | ||
test-cogl-tex-tile.c | ||
test-cogl-vertex-buffer.c | ||
test-depth.c | ||
test-devices.c | ||
test-easing.c | ||
test-entry.c | ||
test-events.c | ||
test-fbo.c | ||
test-fullscreen.c | ||
test-grab.c | ||
test-layout.c | ||
test-main.c | ||
test-model.c | ||
test-multistage.c | ||
test-offscreen.c | ||
test-paint-wrapper.c | ||
test-perspective.c | ||
test-pixmap.c | ||
test-project.c | ||
test-random-text.c | ||
test-rotate.c | ||
test-scale.c | ||
test-score.c | ||
test-script.c | ||
test-shader.c | ||
test-stage-read-pixels.c | ||
test-text-field.c | ||
test-text.c | ||
test-texture-async.c | ||
test-texture-quality.c | ||
test-textures.c | ||
test-threads.c | ||
test-unproject.c | ||
test-viewport.c | ||
wrapper.sh |