Duplicate the existing ease-in/interpolation mode for the property when
removing, replacing the first key for a property or adding a new first
key for a property.
When inserting or modifying keys of a running animator the internal
iterators per property could go out of sync. Reinitializing the
iterators if the timeline is running avoids this.
We should explain what a "key frame" is for ClutterAnimator, possibly
with some sort of visual cue.
This allows me to demonstrate my poor skills at using Inkscape, as well
as my overall bad taste for graphics design.
It would be useful to be able to share the Timeline across different
animator instances, or with different animation constructs. Also this
allows sharing definitions of Timelines in ClutterScript.
The arguments for remove_key() can be NULL, but there is an extraneous
assertion that fails if they are. The pre-conditions should match the
documentation, in this case.
A bogus ClutterInterpolation argument had been carried from
clutter_animator_set_interpolation to clutter_animator_get_interpolation
in copy and paste.
GLib 2.24 (but starting from the 2.23.2 unstable release) added a new
macro for collecting GValues from a va_list.
The newly added G_VALUE_COLLECT_INIT() macro should be used in place
of initializing the GValue and calling G_VALUE_COLLECT(), and improves
the collection performances by avoiding multiple checks, free and
initialization calls.
Do not de-reference a void*; use a temporary variable -- after
checking the contents of the pointer. This actually simplifies
the readability and avoids pulling a Lisp with the parentheses.
The whole point of having the Animator class is that the developer can
describe a complex animation using ClutterScript. Hence, ClutterAnimator
should hook into the Script machinery and parse a specific description
format for its keys.
When asking a key for its target value we also ask the developer to pass
in an initialized GValue - but we don't make it easy to know the type of
the GValue. A developer has to ask the GObject class for the GParamSpec
and then initialize the GValue, instead.
Since we know the type of the GValue we should provide a getter for it.
We should also allow developers to throw at us GValue with compatible and
transformable types.
Finally, all the accessors should be constified.
ClutterAnimator is a class for managing the animation of multiple
properties of multiple actors over time with keyframing of values.
The Animator class is meant to be used to effectively describe
animations using the ClutterScript definition format, and to construct
complex implicit animations from the ground up.
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>