It derives from <AdwAnimation>.
A spring-based Animation.
<AdwSpringAnimation> implements an
animation driven by a physical model of a spring described by
SpringParams, with a resting position in
SpringAnimation:value-to, stretched to
SpringAnimation:value-from.
Since the animation is physically simulated, spring animations don’t
have a fixed duration. The animation will stop when the simulated
spring comes to a rest - when the amplitude of the oscillations becomes
smaller than SpringAnimation:epsilon, or immediately when it
reaches SpringAnimation:value-to if SpringAnimation:clamp
is set to TRUE. The estimated duration can be obtained with
SpringAnimation:estimated-duration.
Due to the nature of spring-driven motion the animation can overshoot
SpringAnimation:value-to before coming to a rest. Whether the
animation will overshoot or not depends on the damping ratio of the
spring. See SpringParams for more information about specific
damping ratio values.
If SpringAnimation:clamp is TRUE, the animation will
abruptly end as soon as it reaches the final value, preventing
overshooting.
Animations can have an initial velocity value, set via
SpringAnimation:initial-velocity, which adjusts the curve without
changing the duration. This makes spring animations useful for
deceleration at the end of gestures.
If the initial and final values are equal, and the initial velocity is not 0, the animation value will bounce and return to its resting position.
Whether the animation should be clamped.
If set to TRUE, the animation will abruptly end as soon as it
reaches the final value, preventing overshooting.
It won’t prevent overshooting SpringAnimation:value-from if a
relative negative SpringAnimation:initial-velocity is set.
Its value is a boolean.
Set it with (set! (spring-animation:clamp self) value).
Precision of the spring.
The level of precision used to determine when the animation has come to a rest, that is, when the amplitude of the oscillations becomes smaller than this value.
If the epsilon value is too small, the animation will take a long time to stop after the animated value has stopped visibly changing.
If the epsilon value is too large, the animation will end prematurely.
The default value is 0.001.
Its value is a real number.
Set it with (set! (spring-animation:epsilon self) value).
Estimated duration of the animation, in milliseconds.
Can be DURATION_INFINITE if the spring damping is set to 0.
Its value is an unsigned 32-bit integer.
It is read only.
The initial velocity to start the animation with.
Initial velocity affects only the animation curve, but not its duration.
Its value is a real number.
Set it with (set! (spring-animation:initial-velocity self)
value).
Physical parameters describing the spring.
Its value is a <AdwSpringParams>, or
#f.
Set it with (set! (spring-animation:spring-params self) value).
The value to animate from.
The animation will start at this value and end at
SpringAnimation:value-to.
Its value is a real number.
Set it with (set! (spring-animation:value-from self) value).
The value to animate to.
The animation will start at SpringAnimation:value-from and end at
this value.
Its value is a real number.
Set it with (set! (spring-animation:value-to self) value).
Current velocity of the animation.
Its value is a real number.
It is read only.
Calculates the value self will have at time.
The time starts at 0 and ends at
SpringAnimation:estimated_duration.
See also SpringAnimation.calculate_velocity.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: an unsigned 32-bit integer.
elapsed time, in milliseconds
Returned: a real number.
the value at time
Calculates the velocity self will have at time.
The time starts at 0 and ends at
SpringAnimation:estimated_duration.
See also SpringAnimation.calculate_value.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: an unsigned 32-bit integer.
elapsed time, in milliseconds
Returned: a real number.
the velocity at time
Gets whether self should be clamped.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: a boolean.
whether self is clamped
Gets the precision of the spring.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: a real number.
the epsilon value
Gets the estimated duration of self, in milliseconds.
Can be DURATION_INFINITE if the spring damping is set to 0.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: an unsigned 32-bit integer.
the estimated duration
Gets the initial velocity of self.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: a real number.
the initial velocity
Gets the physical parameters of the spring of self.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: a <AdwSpringParams>.
the spring parameters
Gets the value self will animate from.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: a real number.
the value to animate from
Gets the value self will animate to.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: a real number.
the value to animate to
Gets the current velocity of self.
Passed: a <AdwSpringAnimation>.
a spring animation
Returned: a real number.
the current velocity
Creates a new <AdwSpringAnimation> on
widget.
The animation will animate target from from to to with the dynamics of a spring described by spring-params.
Passed: a <GtkWidget>.
a widget to create animation on
Passed: a real number.
a value to animate from
Passed: a real number.
a value to animate to
Passed: a <AdwSpringParams>.
physical parameters of the spring
Passed: a <AdwAnimationTarget>.
a target value to animate
Returned: a <AdwAnimation>.
the newly created animation
Sets whether self should be clamped.
If set to TRUE, the animation will abruptly end as soon as it
reaches the final value, preventing overshooting.
It won’t prevent overshooting SpringAnimation:value-from if a
relative negative SpringAnimation:initial-velocity is set.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: a boolean.
the new value
Sets the precision of the spring.
The level of precision used to determine when the animation has come to a rest, that is, when the amplitude of the oscillations becomes smaller than this value.
If the epsilon value is too small, the animation will take a long time to stop after the animated value has stopped visibly changing.
If the epsilon value is too large, the animation will end prematurely.
The default value is 0.001.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: a real number.
the new value
Sets the initial velocity of self.
Initial velocity affects only the animation curve, but not its duration.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: a real number.
the initial velocity
Sets the physical parameters of the spring of self.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: a <AdwSpringParams>.
the new spring parameters
Sets the value self will animate from.
The animation will start at this value and end at
SpringAnimation:value-to.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: a real number.
the value to animate from
Sets the value self will animate to.
The animation will start at SpringAnimation:value-from and end at
this value.
Passed: a <AdwSpringAnimation>.
a spring animation
Passed: a real number.
the value to animate to