Adw.TimedAnimation¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Adw.TimedAnimation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A time-based [class`Animation`].
AdwTimedAnimation
implements a simple animation interpolating the given value from [property`TimedAnimation`:py:data::value-from<Adw.TimedAnimation.props.value_from>] to [property`TimedAnimation`:py:data::value-to<Adw.TimedAnimation.props.value_to>] over [property`TimedAnimation`:py:data::duration<Adw.TimedAnimation.props.duration>] milliseconds using the curve described by [property`TimedAnimation`:py:data::easing<Adw.TimedAnimation.props.easing>].If [property`TimedAnimation`:py:data::reverse<Adw.TimedAnimation.props.reverse>] is set to
TRUE
,AdwTimedAnimation
will instead animate from [property`TimedAnimation`:py:data::value-to<Adw.TimedAnimation.props.value_to>] to [property`TimedAnimation`:py:data::value-from<Adw.TimedAnimation.props.value_from>], and the easing curve will be inverted.The animation can repeat a certain amount of times, or endlessly, depending on the [property`TimedAnimation`:py:data::repeat-count<Adw.TimedAnimation.props.repeat_count>] value. If [property`TimedAnimation`:py:data::alternate<Adw.TimedAnimation.props.alternate>] is set to
TRUE
, it will also change the direction every other iteration.- classmethod new(widget, from_, to, duration, target)¶
- Parameters:
widget (
Gtk.Widget
) – a widget to create animation onfrom (
float
) – a value to animate fromto (
float
) – a value to animate toduration (
int
) – a duration for the animationtarget (
Adw.AnimationTarget
) – a target value to animate
- Returns:
the newly created animation
- Return type:
Creates a new
AdwTimedAnimation
on widget to animate target from from to to.
- get_alternate()¶
- Returns:
whether self alternates
- Return type:
Gets whether self changes direction on every iteration.
- get_duration()¶
- Returns:
the duration of self, in milliseconds
- Return type:
Gets the duration of self.
- get_easing()¶
- Returns:
the easing function self uses
- Return type:
Gets the easing function self uses.
- get_repeat_count()¶
- Returns:
the number of times self will play
- Return type:
Gets the number of times self will play.
- get_reverse()¶
- Returns:
whether self plays backwards
- Return type:
Gets whether self plays backwards.
- get_value_from()¶
- Returns:
the value to animate from
- Return type:
Gets the value self will animate from.
- get_value_to()¶
- Returns:
the value to animate to
- Return type:
Gets the value self will animate to.
- set_alternate(alternate)¶
- Parameters:
alternate (
bool
) – whether self alternates
Sets whether self changes direction on every iteration.
- set_duration(duration)¶
- Parameters:
duration (
int
) – the duration to use, in milliseconds
Sets the duration of self.
If the animation repeats more than once, sets the duration of one iteration.
- set_easing(easing)¶
- Parameters:
easing (
Adw.Easing
) – the easing function to use
Sets the easing function self will use.
See [enum`Easing`] for the description of specific easing functions.
- set_repeat_count(repeat_count)¶
- Parameters:
repeat_count (
int
) – the number of times self will play
Sets the number of times self will play.
If set to 0, self will repeat endlessly.
- set_reverse(reverse)¶
- Parameters:
reverse (
bool
) – whether self plays backwards
Sets whether self plays backwards.
- set_value_from(value)¶
- Parameters:
value (
float
) – the value to animate from
Sets the value self will animate from.
The animation will start at this value and end at [property`TimedAnimation`:py:data::value-to<Adw.TimedAnimation.props.value_to>].
If [property`TimedAnimation`:py:data::reverse<Adw.TimedAnimation.props.reverse>] is
TRUE
, the animation will end at this value instead.
- set_value_to(value)¶
- Parameters:
value (
float
) – the value to animate to
Sets the value self will animate to.
The animation will start at [property`TimedAnimation`:py:data::value-from<Adw.TimedAnimation.props.value_from>] and end at this value.
If [property`TimedAnimation`:py:data::reverse<Adw.TimedAnimation.props.reverse>] is
TRUE
, the animation will start at this value instead.
Property Details¶
- Adw.TimedAnimation.props.alternate¶
- Name:
alternate
- Type:
- Default Value:
- Flags:
Whether the animation changes direction on every iteration.
- Adw.TimedAnimation.props.duration¶
- Name:
duration
- Type:
- Default Value:
0
- Flags:
Duration of the animation, in milliseconds.
Describes how much time the animation will take.
If the animation repeats more than once, describes the duration of one iteration.
- Adw.TimedAnimation.props.easing¶
- Name:
easing
- Type:
- Default Value:
- Flags:
Easing function used in the animation.
Describes the curve the value is interpolated on.
See [enum`Easing`] for the description of specific easing functions.
- Adw.TimedAnimation.props.repeat_count¶
- Name:
repeat-count
- Type:
- Default Value:
1
- Flags:
Number of times the animation will play.
If set to 0, the animation will repeat endlessly.
- Adw.TimedAnimation.props.reverse¶
-
Whether the animation plays backwards.
- Adw.TimedAnimation.props.value_from¶
- Name:
value-from
- Type:
- Default Value:
0.0
- Flags:
The value to animate from.
The animation will start at this value and end at [property`TimedAnimation`:py:data::value-to<Adw.TimedAnimation.props.value_to>].
If [property`TimedAnimation`:py:data::reverse<Adw.TimedAnimation.props.reverse>] is
TRUE
, the animation will end at this value instead.
- Adw.TimedAnimation.props.value_to¶
- Name:
value-to
- Type:
- Default Value:
0.0
- Flags:
The value to animate to.
The animation will start at [property`TimedAnimation`:py:data::value-from<Adw.TimedAnimation.props.value_from>] and end at this value.
If [property`TimedAnimation`:py:data::reverse<Adw.TimedAnimation.props.reverse>] is
TRUE
, the animation will start at this value instead.