gi-adwaita-1.0.3: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Objects.TimedAnimation

Description

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

Exported types

newtype TimedAnimation Source #

Memory-managed wrapper type.

Constructors

TimedAnimation (ManagedPtr TimedAnimation) 

Instances

Instances details
Eq TimedAnimation Source # 
Instance details

Defined in GI.Adw.Objects.TimedAnimation

GObject TimedAnimation Source # 
Instance details

Defined in GI.Adw.Objects.TimedAnimation

ManagedPtrNewtype TimedAnimation Source # 
Instance details

Defined in GI.Adw.Objects.TimedAnimation

TypedObject TimedAnimation Source # 
Instance details

Defined in GI.Adw.Objects.TimedAnimation

Methods

glibType :: IO GType

HasParentTypes TimedAnimation Source # 
Instance details

Defined in GI.Adw.Objects.TimedAnimation

IsGValue (Maybe TimedAnimation) Source #

Convert TimedAnimation to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Adw.Objects.TimedAnimation

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe TimedAnimation -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe TimedAnimation)

type ParentTypes TimedAnimation Source # 
Instance details

Defined in GI.Adw.Objects.TimedAnimation

type ParentTypes TimedAnimation = '[Animation, Object]

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

Instances details
(GObject o, IsDescendantOf TimedAnimation o) => IsTimedAnimation o Source # 
Instance details

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

getAlternate

timedAnimationGetAlternate Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> m Bool

Returns: whether self alternates

Gets whether self changes direction on every iteration.

Since: 1.0

getDuration

timedAnimationGetDuration Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> m Word32

Returns: the duration of self, in milliseconds

Gets the duration of self.

Since: 1.0

getEasing

timedAnimationGetEasing Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> m Easing

Returns: the easing function self uses

Gets the easing function self uses.

Since: 1.0

getRepeatCount

timedAnimationGetRepeatCount Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> m Word32

Returns: the number of times self will play

Gets the number of times self will play.

Since: 1.0

getReverse

timedAnimationGetReverse Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> m Bool

Returns: whether self plays backwards

Gets whether self plays backwards.

Since: 1.0

getValueFrom

timedAnimationGetValueFrom Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> m Double

Returns: the value to animate from

Gets the value self will animate from.

Since: 1.0

getValueTo

timedAnimationGetValueTo Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> m Double

Returns: the value to animate to

Gets the value self will animate to.

Since: 1.0

new

timedAnimationNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWidget a, IsAnimationTarget b) 
=> a

widget: a widget to create animation on

-> Double

from: a value to animate from

-> Double

to: a value to animate to

-> Word32

duration: a duration for the animation

-> b

target: a target value to animate

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> Bool

alternate: whether self alternates

-> m () 

Sets whether self changes direction on every iteration.

Since: 1.0

setDuration

timedAnimationSetDuration Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> Word32

duration: the duration to use, in milliseconds

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> Easing

easing: the easing function to use

-> m () 

Sets the easing function self will use.

See [enumeasing] for the description of specific easing functions.

Since: 1.0

setRepeatCount

timedAnimationSetRepeatCount Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> Word32

repeatCount: the number of times self will play

-> m () 

Sets the number of times self will play.

If set to 0, self will repeat endlessly.

Since: 1.0

setReverse

timedAnimationSetReverse Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> Bool

reverse: whether self plays backwards

-> m () 

Sets whether self plays backwards.

Since: 1.0

setValueFrom

timedAnimationSetValueFrom Source #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> Double

value: the value to animate from

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsTimedAnimation a) 
=> a

self: a timed animation

-> Double

value: the value to animate to

-> 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 ]