class Adw::TimedAnimation
- Adw::TimedAnimation
- Adw::Animation
- GObject::Object
- Reference
- Object
Overview
A time-based #Animation
.
Adw::TimedAnimation
implements a simple animation interpolating the given
value from [property@TimedAnimation:value-from] to
[property@TimedAnimation:value-to] over
TimedAnimation::duration
milliseconds using the curve described by
TimedAnimation::easing
.
If TimedAnimation::reverse
is set to TRUE
, Adw::TimedAnimation
will instead animate from [property@TimedAnimation:value-to] to
[property@TimedAnimation: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:repeat-count] value. If
TimedAnimation::alternate
is set to TRUE
, it will also change the
direction every other iteration.
Defined in:
lib/gi-crystal/src/auto/adw-1/timed_animation.crConstructors
-
.new(widget : Gtk::Widget, from : Float64, to : Float64, duration : UInt32, target : Adw::AnimationTarget) : self
Creates a new
Adw::TimedAnimation
on widget to animate target from from to to. -
.new
Initialize a new
TimedAnimation
. - .new(*, alternate : Bool | Nil = nil, duration : UInt32 | Nil = nil, easing : Adw::Easing | Nil = nil, follow_enable_animations_setting : Bool | Nil = nil, repeat_count : UInt32 | Nil = nil, reverse : Bool | Nil = nil, state : Adw::AnimationState | Nil = nil, target : Adw::AnimationTarget | Nil = nil, value : Float64 | Nil = nil, value_from : Float64 | Nil = nil, value_to : Float64 | Nil = nil, widget : Gtk::Widget | Nil = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#alternate : Bool
Gets whether self changes direction on every iteration.
-
#alternate=(alternate : Bool) : Nil
Sets whether self changes direction on every iteration.
- #alternate? : Bool
-
#duration : UInt32
Gets the duration of self.
-
#duration=(duration : UInt32) : Nil
Sets the duration of self.
-
#easing : Adw::Easing
Gets the easing function self uses.
-
#easing=(easing : Adw::Easing) : Nil
Sets the easing function self will use.
-
#hash(hasher)
See
Object#hash(hasher)
-
#repeat_count : UInt32
Gets the number of times self will play.
-
#repeat_count=(repeat_count : UInt32) : Nil
Sets the number of times self will play.
-
#reverse : Bool
Gets whether self plays backwards.
-
#reverse=(reverse : Bool) : Nil
Sets whether self plays backwards.
- #reverse? : Bool
-
#value_from : Float64
Gets the value self will animate from.
-
#value_from=(value : Float64) : Nil
Sets the value self will animate from.
-
#value_to : Float64
Gets the value self will animate to.
-
#value_to=(value : Float64) : Nil
Sets the value self will animate to.
Instance methods inherited from class Adw::Animation
==(other : self)
==,
done_signal
done_signal,
follow_enable_animations_setting : Bool
follow_enable_animations_setting,
follow_enable_animations_setting=(setting : Bool) : Nil
follow_enable_animations_setting=,
follow_enable_animations_setting? : Bool
follow_enable_animations_setting?,
hash(hasher)
hash,
pause : Nil
pause,
play : Nil
play,
reset : Nil
reset,
resume : Nil
resume,
skip : Nil
skip,
state : Adw::AnimationState
state,
target : Adw::AnimationTarget
target,
target=(target : Adw::AnimationTarget) : Nil
target=,
value : Float64
value,
widget : Gtk::Widget
widget,
widget=(value : Gtk::Widget | Nil) : Gtk::Widget | Nil
widget=
Constructor methods inherited from class Adw::Animation
newnew(*, follow_enable_animations_setting : Bool | Nil = nil, state : Adw::AnimationState | Nil = nil, target : Adw::AnimationTarget | Nil = nil, value : Float64 | Nil = nil, widget : Gtk::Widget | Nil = nil) new
Class methods inherited from class Adw::Animation
g_type : UInt64
g_type
Instance methods inherited from class GObject::Object
==(other : self)
==,
bind_property(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags) : GObject::Binding
bind_property,
bind_property_full(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags, transform_to : GObject::Closure, transform_from : GObject::Closure) : GObject::Binding
bind_property_full,
data(key : String) : Pointer(Void) | Nil
data,
finalize
finalize,
freeze_notify : Nil
freeze_notify,
getv(names : Enumerable(String), values : Enumerable(_)) : Nil
getv,
hash(hasher)
hash,
notify(property_name : String) : Nil
notify,
notify_by_pspec(pspec : GObject::ParamSpec) : Nil
notify_by_pspec,
notify_signal
notify_signal,
property(property_name : String, value : _) : Nil
property,
qdata(quark : UInt32) : Pointer(Void) | Nil
qdata,
ref_count : UInt32
ref_count,
run_dispose : Nil
run_dispose,
set_data(key : String, data : Pointer(Void) | Nil) : Nil
set_data,
set_property(property_name : String, value : _) : Nil
set_property,
steal_data(key : String) : Pointer(Void) | Nil
steal_data,
steal_qdata(quark : UInt32) : Pointer(Void) | Nil
steal_qdata,
thaw_notify : Nil
thaw_notify,
to_unsafe : Pointer(Void)
to_unsafe,
watch_closure(closure : GObject::Closure) : Nil
watch_closure
Constructor methods inherited from class GObject::Object
cast(obj : GObject::Object) : self
cast,
new(pointer : Pointer(Void), transfer : GICrystal::Transfer)new new, newv(object_type : UInt64, parameters : Enumerable(GObject::Parameter)) : self newv
Class methods inherited from class GObject::Object
cast?(obj : GObject::Object) : self | Nil
cast?,
compat_control(what : UInt64, data : Pointer(Void) | Nil) : UInt64
compat_control,
g_type : UInt64
g_type,
interface_find_property(g_iface : GObject::TypeInterface, property_name : String) : GObject::ParamSpec
interface_find_property,
interface_list_properties(g_iface : GObject::TypeInterface) : Enumerable(GObject::ParamSpec)
interface_list_properties
Macros inherited from class GObject::Object
previous_vfunc(*args)
previous_vfunc,
previous_vfunc!(*args)
previous_vfunc!,
signal(signature)
signal
Constructor Detail
Creates a new Adw::TimedAnimation
on widget to animate target from from
to to.
Class Method Detail
Instance Method Detail
Returns true
if this reference is the same as other. Invokes same?
.
Sets the duration of self.
If the animation repeats more than once, sets the duration of one iteration.
Sets the easing function self will use.
See #Easing
for the description of specific easing functions.
Sets the number of times self will play.
If set to 0, self will repeat endlessly.
Sets the value self will animate from.
The animation will start at this value and end at [property@TimedAnimation:value-to].
If TimedAnimation::reverse
is TRUE
, the animation will end at
this value instead.
Sets the value self will animate to.
The animation will start at [property@TimedAnimation:value-from] and end at this value.
If TimedAnimation::reverse
is TRUE
, the animation will start
at this value instead.