Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A time-based [classanimation
].
AdwTimedAnimation
implements a simple animation interpolating the given
value from [propertytimedAnimation
:value-from] to
[propertytimedAnimation
:value-to] over
[propertytimedAnimation
:duration] milliseconds using the curve described by
[propertytimedAnimation
:easing].
If [propertytimedAnimation
:reverse] is set to TRUE
, AdwTimedAnimation
will instead animate from [propertytimedAnimation
:value-to] to
[propertytimedAnimation
:value-from], and the easing curve will be inverted.
The animation can repeat a certain amount of times, or endlessly, depending
on the [propertytimedAnimation
:repeat-count] value. If
[propertytimedAnimation
:alternate] is set to TRUE
, it will also change the
direction every other iteration.
Since: 1.0
Synopsis
- newtype TimedAnimation = TimedAnimation (ManagedPtr TimedAnimation)
- class (GObject o, IsDescendantOf TimedAnimation o) => IsTimedAnimation o
- toTimedAnimation :: (MonadIO m, IsTimedAnimation o) => o -> m TimedAnimation
- timedAnimationGetAlternate :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> m Bool
- timedAnimationGetDuration :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> m Word32
- timedAnimationGetEasing :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> m Easing
- timedAnimationGetRepeatCount :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> m Word32
- timedAnimationGetReverse :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> m Bool
- timedAnimationGetValueFrom :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> m Double
- timedAnimationGetValueTo :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> m Double
- timedAnimationNew :: (HasCallStack, MonadIO m, IsWidget a, IsAnimationTarget b) => a -> Double -> Double -> Word32 -> b -> m TimedAnimation
- timedAnimationSetAlternate :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> Bool -> m ()
- timedAnimationSetDuration :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> Word32 -> m ()
- timedAnimationSetEasing :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> Easing -> m ()
- timedAnimationSetRepeatCount :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> Word32 -> m ()
- timedAnimationSetReverse :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> Bool -> m ()
- timedAnimationSetValueFrom :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> Double -> m ()
- timedAnimationSetValueTo :: (HasCallStack, MonadIO m, IsTimedAnimation a) => a -> Double -> m ()
- constructTimedAnimationAlternate :: (IsTimedAnimation o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTimedAnimationAlternate :: (MonadIO m, IsTimedAnimation o) => o -> m Bool
- setTimedAnimationAlternate :: (MonadIO m, IsTimedAnimation o) => o -> Bool -> m ()
- constructTimedAnimationDuration :: (IsTimedAnimation o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getTimedAnimationDuration :: (MonadIO m, IsTimedAnimation o) => o -> m Word32
- setTimedAnimationDuration :: (MonadIO m, IsTimedAnimation o) => o -> Word32 -> m ()
- constructTimedAnimationEasing :: (IsTimedAnimation o, MonadIO m) => Easing -> m (GValueConstruct o)
- getTimedAnimationEasing :: (MonadIO m, IsTimedAnimation o) => o -> m Easing
- setTimedAnimationEasing :: (MonadIO m, IsTimedAnimation o) => o -> Easing -> m ()
- constructTimedAnimationRepeatCount :: (IsTimedAnimation o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getTimedAnimationRepeatCount :: (MonadIO m, IsTimedAnimation o) => o -> m Word32
- setTimedAnimationRepeatCount :: (MonadIO m, IsTimedAnimation o) => o -> Word32 -> m ()
- constructTimedAnimationReverse :: (IsTimedAnimation o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTimedAnimationReverse :: (MonadIO m, IsTimedAnimation o) => o -> m Bool
- setTimedAnimationReverse :: (MonadIO m, IsTimedAnimation o) => o -> Bool -> m ()
- constructTimedAnimationValueFrom :: (IsTimedAnimation o, MonadIO m) => Double -> m (GValueConstruct o)
- getTimedAnimationValueFrom :: (MonadIO m, IsTimedAnimation o) => o -> m Double
- setTimedAnimationValueFrom :: (MonadIO m, IsTimedAnimation o) => o -> Double -> m ()
- constructTimedAnimationValueTo :: (IsTimedAnimation o, MonadIO m) => Double -> m (GValueConstruct o)
- getTimedAnimationValueTo :: (MonadIO m, IsTimedAnimation o) => o -> m Double
- setTimedAnimationValueTo :: (MonadIO m, IsTimedAnimation o) => o -> Double -> m ()
Exported types
newtype TimedAnimation Source #
Memory-managed wrapper type.
TimedAnimation (ManagedPtr TimedAnimation) |
Instances
Eq TimedAnimation Source # | |
Defined in GI.Adw.Objects.TimedAnimation (==) :: TimedAnimation -> TimedAnimation -> Bool # (/=) :: TimedAnimation -> TimedAnimation -> Bool # | |
GObject TimedAnimation Source # | |
Defined in GI.Adw.Objects.TimedAnimation | |
ManagedPtrNewtype TimedAnimation Source # | |
Defined in GI.Adw.Objects.TimedAnimation toManagedPtr :: TimedAnimation -> ManagedPtr TimedAnimation | |
TypedObject TimedAnimation Source # | |
Defined in GI.Adw.Objects.TimedAnimation | |
HasParentTypes TimedAnimation Source # | |
Defined in GI.Adw.Objects.TimedAnimation | |
IsGValue (Maybe TimedAnimation) Source # | Convert |
Defined in GI.Adw.Objects.TimedAnimation gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe TimedAnimation -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe TimedAnimation) | |
type ParentTypes TimedAnimation Source # | |
Defined in GI.Adw.Objects.TimedAnimation |
class (GObject o, IsDescendantOf TimedAnimation o) => IsTimedAnimation o Source #
Type class for types which can be safely cast to TimedAnimation
, for instance with toTimedAnimation
.
Instances
(GObject o, IsDescendantOf TimedAnimation o) => IsTimedAnimation o Source # | |
Defined in GI.Adw.Objects.TimedAnimation |
toTimedAnimation :: (MonadIO m, IsTimedAnimation o) => o -> m TimedAnimation Source #
Cast to TimedAnimation
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, pause, play, ref, refSink, reset, resume, runDispose, skip, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAlternate, getData, getDuration, getEasing, getProperty, getQdata, getRepeatCount, getReverse, getState, getTarget, getValue, getValueFrom, getValueTo, getWidget.
Setters
setAlternate, setData, setDataFull, setDuration, setEasing, setProperty, setRepeatCount, setReverse, setTarget, setValueFrom, setValueTo.
getAlternate
timedAnimationGetAlternate Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether self
changes direction on every iteration.
Since: 1.0
getDuration
timedAnimationGetDuration Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> m Word32 | Returns: the duration of |
Gets the duration of self
.
Since: 1.0
getEasing
timedAnimationGetEasing Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> m Easing | Returns: the easing function |
Gets the easing function self
uses.
Since: 1.0
getRepeatCount
timedAnimationGetRepeatCount Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> m Word32 | Returns: the number of times |
Gets the number of times self
will play.
Since: 1.0
getReverse
timedAnimationGetReverse Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether self
plays backwards.
Since: 1.0
getValueFrom
timedAnimationGetValueFrom Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> m Double | Returns: the value to animate from |
Gets the value self
will animate from.
Since: 1.0
getValueTo
timedAnimationGetValueTo Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> m Double | Returns: the value to animate to |
Gets the value self
will animate to.
Since: 1.0
new
:: (HasCallStack, MonadIO m, IsWidget a, IsAnimationTarget b) | |
=> a |
|
-> Double |
|
-> Double |
|
-> Word32 |
|
-> b |
|
-> m TimedAnimation | Returns: the newly created animation |
Creates a new AdwTimedAnimation
on widget
to animate target
from from
to to
.
Since: 1.0
setAlternate
timedAnimationSetAlternate Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether self
changes direction on every iteration.
Since: 1.0
setDuration
timedAnimationSetDuration Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the duration of self
.
If the animation repeats more than once, sets the duration of one iteration.
Since: 1.0
setEasing
timedAnimationSetEasing Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> Easing |
|
-> m () |
Sets the easing function self
will use.
See [enumeasing
] for the description of specific easing functions.
Since: 1.0
setRepeatCount
timedAnimationSetRepeatCount Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the number of times self
will play.
If set to 0, self
will repeat endlessly.
Since: 1.0
setReverse
timedAnimationSetReverse Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether self
plays backwards.
Since: 1.0
setValueFrom
timedAnimationSetValueFrom Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> Double |
|
-> m () |
Sets the value self
will animate from.
The animation will start at this value and end at
[propertytimedAnimation
:value-to].
If [propertytimedAnimation
:reverse] is TRUE
, the animation will end at
this value instead.
Since: 1.0
setValueTo
timedAnimationSetValueTo Source #
:: (HasCallStack, MonadIO m, IsTimedAnimation a) | |
=> a |
|
-> Double |
|
-> m () |
Sets the value self
will animate to.
The animation will start at [propertytimedAnimation
:value-from] and end at
this value.
If [propertytimedAnimation
:reverse] is TRUE
, the animation will start
at this value instead.
Since: 1.0
Properties
alternate
Whether the animation changes direction on every iteration.
Since: 1.0
constructTimedAnimationAlternate :: (IsTimedAnimation o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “alternate
” property. This is rarely needed directly, but it is used by new
.
getTimedAnimationAlternate :: (MonadIO m, IsTimedAnimation o) => o -> m Bool Source #
Get the value of the “alternate
” property.
When overloading is enabled, this is equivalent to
get
timedAnimation #alternate
setTimedAnimationAlternate :: (MonadIO m, IsTimedAnimation o) => o -> Bool -> m () Source #
Set the value of the “alternate
” property.
When overloading is enabled, this is equivalent to
set
timedAnimation [ #alternate:=
value ]
duration
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.
Since: 1.0
constructTimedAnimationDuration :: (IsTimedAnimation o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “duration
” property. This is rarely needed directly, but it is used by new
.
getTimedAnimationDuration :: (MonadIO m, IsTimedAnimation o) => o -> m Word32 Source #
Get the value of the “duration
” property.
When overloading is enabled, this is equivalent to
get
timedAnimation #duration
setTimedAnimationDuration :: (MonadIO m, IsTimedAnimation o) => o -> Word32 -> m () Source #
Set the value of the “duration
” property.
When overloading is enabled, this is equivalent to
set
timedAnimation [ #duration:=
value ]
easing
Easing function used in the animation.
Describes the curve the value is interpolated on.
See [enumeasing
] for the description of specific easing functions.
Since: 1.0
constructTimedAnimationEasing :: (IsTimedAnimation o, MonadIO m) => Easing -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “easing
” property. This is rarely needed directly, but it is used by new
.
getTimedAnimationEasing :: (MonadIO m, IsTimedAnimation o) => o -> m Easing Source #
Get the value of the “easing
” property.
When overloading is enabled, this is equivalent to
get
timedAnimation #easing
setTimedAnimationEasing :: (MonadIO m, IsTimedAnimation o) => o -> Easing -> m () Source #
Set the value of the “easing
” property.
When overloading is enabled, this is equivalent to
set
timedAnimation [ #easing:=
value ]
repeatCount
Number of times the animation will play.
If set to 0, the animation will repeat endlessly.
Since: 1.0
constructTimedAnimationRepeatCount :: (IsTimedAnimation o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “repeat-count
” property. This is rarely needed directly, but it is used by new
.
getTimedAnimationRepeatCount :: (MonadIO m, IsTimedAnimation o) => o -> m Word32 Source #
Get the value of the “repeat-count
” property.
When overloading is enabled, this is equivalent to
get
timedAnimation #repeatCount
setTimedAnimationRepeatCount :: (MonadIO m, IsTimedAnimation o) => o -> Word32 -> m () Source #
Set the value of the “repeat-count
” property.
When overloading is enabled, this is equivalent to
set
timedAnimation [ #repeatCount:=
value ]
reverse
Whether the animation plays backwards.
Since: 1.0
constructTimedAnimationReverse :: (IsTimedAnimation o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “reverse
” property. This is rarely needed directly, but it is used by new
.
getTimedAnimationReverse :: (MonadIO m, IsTimedAnimation o) => o -> m Bool Source #
Get the value of the “reverse
” property.
When overloading is enabled, this is equivalent to
get
timedAnimation #reverse
setTimedAnimationReverse :: (MonadIO m, IsTimedAnimation o) => o -> Bool -> m () Source #
Set the value of the “reverse
” property.
When overloading is enabled, this is equivalent to
set
timedAnimation [ #reverse:=
value ]
valueFrom
The value to animate from.
The animation will start at this value and end at
[propertytimedAnimation
:value-to].
If [propertytimedAnimation
:reverse] is TRUE
, the animation will end at
this value instead.
Since: 1.0
constructTimedAnimationValueFrom :: (IsTimedAnimation o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “value-from
” property. This is rarely needed directly, but it is used by new
.
getTimedAnimationValueFrom :: (MonadIO m, IsTimedAnimation o) => o -> m Double Source #
Get the value of the “value-from
” property.
When overloading is enabled, this is equivalent to
get
timedAnimation #valueFrom
setTimedAnimationValueFrom :: (MonadIO m, IsTimedAnimation o) => o -> Double -> m () Source #
Set the value of the “value-from
” property.
When overloading is enabled, this is equivalent to
set
timedAnimation [ #valueFrom:=
value ]
valueTo
The value to animate to.
The animation will start at [propertytimedAnimation
:value-from] and end at
this value.
If [propertytimedAnimation
:reverse] is TRUE
, the animation will start
at this value instead.
Since: 1.0
constructTimedAnimationValueTo :: (IsTimedAnimation o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “value-to
” property. This is rarely needed directly, but it is used by new
.
getTimedAnimationValueTo :: (MonadIO m, IsTimedAnimation o) => o -> m Double Source #
Get the value of the “value-to
” property.
When overloading is enabled, this is equivalent to
get
timedAnimation #valueTo
setTimedAnimationValueTo :: (MonadIO m, IsTimedAnimation o) => o -> Double -> m () Source #
Set the value of the “value-to
” property.
When overloading is enabled, this is equivalent to
set
timedAnimation [ #valueTo:=
value ]