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, duration : UInt32? = nil, easing : Adw::Easing? = nil, repeat_count : UInt32? = nil, reverse : Bool? = nil, state : Adw::AnimationState? = nil, target : Adw::AnimationTarget? = nil, value : Float64? = nil, value_from : Float64? = nil, value_to : Float64? = nil, widget : Gtk::Widget? = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#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.
-
#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
done_signal
done_signal,
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?) : Gtk::Widget?
widget=
Constructor methods inherited from class Adw::Animation
newnew(*, state : Adw::AnimationState? = nil, target : Adw::AnimationTarget? = nil, value : Float64? = nil, widget : Gtk::Widget? = nil) new
Class methods inherited from class Adw::Animation
g_type : UInt64
g_type
Instance methods inherited from class GObject::Object
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)?
data,
finalize
finalize,
freeze_notify : Nil
freeze_notify,
getv(names : Enumerable(String), values : Enumerable(_)) : Nil
getv,
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)?
qdata,
ref_count : UInt32
ref_count,
run_dispose : Nil
run_dispose,
set_data(key : String, data : Pointer(Void)?) : Nil
set_data,
set_property(property_name : String, value : _) : Nil
set_property,
steal_data(key : String) : Pointer(Void)?
steal_data,
steal_qdata(quark : UInt32) : Pointer(Void)?
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,
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
compat_control(what : UInt64, data : Pointer(Void)?) : 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
Constructor Detail
Creates a new Adw::TimedAnimation
on @widget to animate @target from @from
to @to.
Class Method Detail
Instance Method Detail
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.