If the Interval used has a different type than the property we are
animating through a PropertyTransition then we should transform the
interpolated value before applying it, to avoid warnings down the
line.
The compute() method will cache the result, to avoid multiple
allocations and copies; this means, though, that we need to unset the
GValue when destroying the Interval.
Now that the interval can transform the initial and final values to the
type declared when constructing it, there is no need to check for the
value type inside set_initial_value() and set_final_value().
It's possible that GValues passed to a ClutterInterval setter are not
of the same type as the interval - for instance, if they come from
language bindings, or from untrusted sources; we can use the same
transformation functions we already use inside ClutterTransition to
ensure that the ClutterInterval always stores values of the same type
used to create the interval itself.
The ::stopped signal should be emitted at the end of the Timeline, after
the last ::completed signal emission, in order to have a proper
chronological progress of signal emissions:
started → new-frame → [ ... ] → completed → stopped
This way, ::stopped can perform a proper teardown of the state set up
during ::started, without interfering with the potential cyclical
emission of ::completed.
Calling clutter_point_free(clutter_point_zero()) or calling
clutter_rect_free(clutter_rect_zero()) should be safe, exactly like it's
safe to call those functions with a NULL argument.
The implicit animations only apply to properties that are documented as
'animatable'; the explicit animations apply to any property defined
through GObject or ClutterAnimatable.
For 1.x, we still have a duration of 0 msecs, but we have a valid easing
state, so we can change the easing parameters without calling save and
restore.
By checking if the interval is valid inside compute_value() we can catch
the cases where the interval values of a PropertyTransition are set
after the transition has been added to an Animatable instance - i.e. the
following code:
let transition = new Clutter.PropertyTransition();
transition.set_property_name('opacity');
actor.add_transition('opacityAnim', transition);
transition.set_to_value(0);
should be equivalent to:
let transition = new Clutter.PropertyTransition();
transition.set_property_name('opacity');
transition.set_to_value(0);
actor.add_transition('opacityAnim', transition);
instead of emitting a warning.
Once a ClutterPropertyTransition is attached to a ClutterAnimatable, if
no interval is set we can simply use the current state of the property
to define the from and to values. This allows the creation of property
transitions from the current state of the Animatable instance without
excessive verbosity.
ClutterContent implementations may allow repeating their contents when
painting; we should provide the repeat policy on the actor, like we do
for scaling filters and content gravity.
ClutterActor's x-align and y-align properties should be used to control
the alignment of the PangoLayout when painting it within a larger
allocation, and the ClutterText has the x-expand or the y-expand flags
set.
Fixed positions are defined to be initialized at 0,0 whenever
enabled, by setting fixed_position_enabled to true, or by setting
just one of x/y. This normally happens in the defaults, but we need
to make sure it also happens if a fixed position was once set but
then disabled. We do this by always resetting it back to 0,0 when
fixed_position_set is unset.
Instead of showing the full timestamp for debugging messages that happen
within a second, showing the delta from the previous full timestamp can
be more useful when debugging; this allows immediately seeing the time
difference, instead of doing the math in our heads.
Only for debug builds, the debug name should include a) actor name, b)
type name, and c) pointer address.
For non-debug builds we can live with the actor/type name.
ClutterGridLayout is port of GtkGrid to a Clutter layout manager. All
the logic is taken from gtkgrid.c, so all the credits should go to
Matthias Clasen for writing this nice piece of code.
ClutterGridLayout supports adding children with it's own methods
GridLayout.attach() and GridLayout.attach_next_to() as well as
Actor.add_child() and friends. The latter adds children in a similar
fashion to ClutterBoxLayout
https://bugzilla.gnome.org/show_bug.cgi?id=677372