gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.Animation

Description

The Animation structure contains only private data and should be accessed using the provided functions.

Since: 1.0

Synopsis

Exported types

newtype Animation Source #

Memory-managed wrapper type.

Constructors

Animation (ManagedPtr Animation) 

Instances

Instances details
Eq Animation Source # 
Instance details

Defined in GI.Clutter.Objects.Animation

GObject Animation Source # 
Instance details

Defined in GI.Clutter.Objects.Animation

ManagedPtrNewtype Animation Source # 
Instance details

Defined in GI.Clutter.Objects.Animation

Methods

toManagedPtr :: Animation -> ManagedPtr Animation

TypedObject Animation Source # 
Instance details

Defined in GI.Clutter.Objects.Animation

Methods

glibType :: IO GType

HasParentTypes Animation Source # 
Instance details

Defined in GI.Clutter.Objects.Animation

IsGValue (Maybe Animation) Source #

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

Instance details

Defined in GI.Clutter.Objects.Animation

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Animation Source # 
Instance details

Defined in GI.Clutter.Objects.Animation

type ParentTypes Animation = '[Object, Scriptable]

class (GObject o, IsDescendantOf Animation o) => IsAnimation o Source #

Type class for types which can be safely cast to Animation, for instance with toAnimation.

Instances

Instances details
(GObject o, IsDescendantOf Animation o) => IsAnimation o Source # 
Instance details

Defined in GI.Clutter.Objects.Animation

toAnimation :: (MonadIO m, IsAnimation o) => o -> m Animation Source #

Cast to Animation, for types for which this is known to be safe. For general casts, use castTo.

Methods

bind

animationBind Source #

Arguments

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

animation: a Animation

-> Text

propertyName: the property to control

-> GValue

final: The final value of the property

-> m Animation

Returns: The animation itself.

Deprecated: (Since version 1.12)Use PropertyTransition instead

Adds a single property with name propertyName to the animation animation. For more information about animations, see clutter_actor_animate().

This method returns the animation primarily to make chained calls convenient in language bindings.

Since: 1.0

bindInterval

animationBindInterval Source #

Arguments

:: (HasCallStack, MonadIO m, IsAnimation a, IsInterval b) 
=> a

animation: a Animation

-> Text

propertyName: the property to control

-> b

interval: a Interval

-> m Animation

Returns: The animation itself.

Deprecated: (Since version 1.12)Use PropertyTransition instead

Binds interval to the propertyName of the Object attached to animation. The Animation will take ownership of the passed Interval. For more information about animations, see clutter_actor_animate().

If you need to update the interval instance use animationUpdateInterval instead.

Since: 1.0

completed

animationCompleted Source #

Arguments

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

animation: a Animation

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Emits the completed signal on animation

When using this function with a Animation created by the clutter_actor_animate() family of functions, animation will be unreferenced and it will not be valid anymore, unless objectRef was called before calling this function or unless a reference was taken inside a handler for the Animation::completed signal

Since: 1.0

getAlpha

animationGetAlpha Source #

Arguments

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

animation: a Animation

-> m Alpha

Returns: the alpha object used by the animation

Deprecated: (Since version 1.10)Use animationGetTimeline and timelineGetProgressMode instead.

Retrieves the Alpha used by animation.

Since: 1.0

getDuration

animationGetDuration Source #

Arguments

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

animation: a Animation

-> m Word32

Returns: the duration of the animation

Deprecated: (Since version 1.12)Use PropertyTransition instead

Retrieves the duration of animation, in milliseconds.

Since: 1.0

getInterval

animationGetInterval Source #

Arguments

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

animation: a Animation

-> Text

propertyName: name of the property

-> m Interval

Returns: a Interval or Nothing if no property with the same name was found. The returned interval is owned by the Animation and should not be unreferenced

Deprecated: (Since version 1.12)Use PropertyTransition instead

Retrieves the Interval associated to propertyName inside animation.

Since: 1.0

getLoop

animationGetLoop Source #

Arguments

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

animation: a Animation

-> m Bool

Returns: True if the animation is looping

Deprecated: (Since version 1.12)Use PropertyTransition instead

Retrieves whether animation is looping.

Since: 1.0

getMode

animationGetMode Source #

Arguments

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

animation: a Animation

-> m CULong

Returns: the mode for the animation

Deprecated: (Since version 1.12)Use PropertyTransition instead

Retrieves the animation mode of animation, as set by animationSetMode.

Since: 1.0

getObject

animationGetObject Source #

Arguments

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

animation: a Animation

-> m Object

Returns: a Object

Deprecated: (Since version 1.12)Use PropertyTransition instead

Retrieves the Object attached to animation.

Since: 1.0

getTimeline

animationGetTimeline Source #

Arguments

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

animation: a Animation

-> m Timeline

Returns: the timeline used by the animation

Deprecated: (Since version 1.12)Use PropertyTransition instead

Retrieves the Timeline used by animation

Since: 1.0

hasProperty

animationHasProperty Source #

Arguments

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

animation: a Animation

-> Text

propertyName: name of the property

-> m Bool

Returns: True if the property is animated by the Animation, False otherwise

Deprecated: (Since version 1.12)Use PropertyTransition instead

Checks whether animation is controlling propertyName.

Since: 1.0

new

animationNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Animation

Returns: the newly created Animation. Use objectUnref to release the associated resources

Deprecated: (Since version 1.12)Use PropertyTransition instead

Creates a new Animation instance. You should set the Object to be animated using animationSetObject, set the duration with animationSetDuration and the easing mode using animationSetMode.

Use animationBind or animationBindInterval to define the properties to be animated. The interval and the animated properties can be updated at runtime.

The clutter_actor_animate() and relative family of functions provide an easy way to animate a Actor and automatically manage the lifetime of a Animation instance, so you should consider using those functions instead of manually creating an animation.

Since: 1.0

setAlpha

animationSetAlpha Source #

Arguments

:: (HasCallStack, MonadIO m, IsAnimation a, IsAlpha b) 
=> a

animation: a Animation

-> b

alpha: a Alpha, or Nothing to unset the current Alpha

-> m () 

Deprecated: (Since version 1.10)Use animationGetTimeline and timelineSetProgressMode instead.

Sets alpha as the Alpha used by animation.

If alpha is not Nothing, the Animation will take ownership of the Alpha instance.

Since: 1.0

setDuration

animationSetDuration Source #

Arguments

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

animation: a Animation

-> Word32

msecs: the duration in milliseconds

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Sets the duration of animation in milliseconds.

This function will set Animation:alpha and Animation:timeline if needed.

Since: 1.0

setLoop

animationSetLoop Source #

Arguments

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

animation: a Animation

-> Bool

loop: True if the animation should loop

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Sets whether animation should loop over itself once finished.

A looping Animation will not emit the Animation::completed signal when finished.

This function will set Animation:alpha and Animation:timeline if needed.

Since: 1.0

setMode

animationSetMode Source #

Arguments

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

animation: a Animation

-> CULong

mode: an animation mode logical id

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Sets the animation mode of animation. The animation mode is a logical id, either coming from the AnimationMode enumeration or the return value of clutter_alpha_register_func().

This function will also set Animation:alpha if needed.

Since: 1.0

setObject

animationSetObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsAnimation a, IsObject b) 
=> a

animation: a Animation

-> b

object: a Object

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Attaches animation to object. The Animation will take a reference on object.

Since: 1.0

setTimeline

animationSetTimeline Source #

Arguments

:: (HasCallStack, MonadIO m, IsAnimation a, IsTimeline b) 
=> a

animation: a Animation

-> Maybe b

timeline: a Timeline, or Nothing to unset the current Timeline

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Sets the Timeline used by animation.

This function will take a reference on the passed timeline.

Since: 1.0

unbindProperty

animationUnbindProperty Source #

Arguments

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

animation: a Animation

-> Text

propertyName: name of the property

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Removes propertyName from the list of animated properties.

Since: 1.0

update

animationUpdate Source #

Arguments

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

animation: a Animation

-> Text

propertyName: name of the property

-> GValue

final: The final value of the property

-> m Animation

Returns: The animation itself.

Deprecated: (Since version 1.12)Use PropertyTransition instead

Updates the final value of the interval for propertyName

Since: 1.0

updateInterval

animationUpdateInterval Source #

Arguments

:: (HasCallStack, MonadIO m, IsAnimation a, IsInterval b) 
=> a

animation: a Animation

-> Text

propertyName: name of the property

-> b

interval: a Interval

-> m () 

Deprecated: (Since version 1.12)Use PropertyTransition instead

Changes the interval for propertyName. The Animation will take ownership of the passed Interval.

Since: 1.0

Properties

alpha

The Alpha used by the animation.

Since: 1.0

constructAnimationAlpha :: (IsAnimation o, MonadIO m, IsAlpha a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “alpha” property. This is rarely needed directly, but it is used by new.

getAnimationAlpha :: (MonadIO m, IsAnimation o) => o -> m Alpha Source #

Get the value of the “alpha” property. When overloading is enabled, this is equivalent to

get animation #alpha

setAnimationAlpha :: (MonadIO m, IsAnimation o, IsAlpha a) => o -> a -> m () Source #

Set the value of the “alpha” property. When overloading is enabled, this is equivalent to

set animation [ #alpha := value ]

duration

The duration of the animation, expressed in milliseconds.

Since: 1.0

constructAnimationDuration :: (IsAnimation 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.

getAnimationDuration :: (MonadIO m, IsAnimation o) => o -> m Word32 Source #

Get the value of the “duration” property. When overloading is enabled, this is equivalent to

get animation #duration

setAnimationDuration :: (MonadIO m, IsAnimation o) => o -> Word32 -> m () Source #

Set the value of the “duration” property. When overloading is enabled, this is equivalent to

set animation [ #duration := value ]

loop

Whether the animation should loop.

Since: 1.0

constructAnimationLoop :: (IsAnimation o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “loop” property. This is rarely needed directly, but it is used by new.

getAnimationLoop :: (MonadIO m, IsAnimation o) => o -> m Bool Source #

Get the value of the “loop” property. When overloading is enabled, this is equivalent to

get animation #loop

setAnimationLoop :: (MonadIO m, IsAnimation o) => o -> Bool -> m () Source #

Set the value of the “loop” property. When overloading is enabled, this is equivalent to

set animation [ #loop := value ]

mode

The animation mode, either a value from AnimationMode or a value returned by clutter_alpha_register_func(). The default value is AnimationModeLinear.

Since: 1.0

constructAnimationMode :: (IsAnimation o, MonadIO m) => CULong -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “mode” property. This is rarely needed directly, but it is used by new.

getAnimationMode :: (MonadIO m, IsAnimation o) => o -> m CULong Source #

Get the value of the “mode” property. When overloading is enabled, this is equivalent to

get animation #mode

setAnimationMode :: (MonadIO m, IsAnimation o) => o -> CULong -> m () Source #

Set the value of the “mode” property. When overloading is enabled, this is equivalent to

set animation [ #mode := value ]

object

The Object to which the animation applies.

Since: 1.0

constructAnimationObject :: (IsAnimation o, MonadIO m, IsObject a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “object” property. This is rarely needed directly, but it is used by new.

getAnimationObject :: (MonadIO m, IsAnimation o) => o -> m Object Source #

Get the value of the “object” property. When overloading is enabled, this is equivalent to

get animation #object

setAnimationObject :: (MonadIO m, IsAnimation o, IsObject a) => o -> a -> m () Source #

Set the value of the “object” property. When overloading is enabled, this is equivalent to

set animation [ #object := value ]

timeline

The Timeline used by the animation.

Since: 1.0

clearAnimationTimeline :: (MonadIO m, IsAnimation o) => o -> m () Source #

Set the value of the “timeline” property to Nothing. When overloading is enabled, this is equivalent to

clear #timeline

constructAnimationTimeline :: (IsAnimation o, MonadIO m, IsTimeline a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “timeline” property. This is rarely needed directly, but it is used by new.

getAnimationTimeline :: (MonadIO m, IsAnimation o) => o -> m Timeline Source #

Get the value of the “timeline” property. When overloading is enabled, this is equivalent to

get animation #timeline

setAnimationTimeline :: (MonadIO m, IsAnimation o, IsTimeline a) => o -> a -> m () Source #

Set the value of the “timeline” property. When overloading is enabled, this is equivalent to

set animation [ #timeline := value ]

Signals

completed

type AnimationCompletedCallback = IO () Source #

Deprecated: (Since version 1.12)Use PropertyTransition instead

The completed signal is emitted once the animation has been completed.

The animation instance is guaranteed to be valid for the entire duration of the signal emission chain.

Since: 1.0

afterAnimationCompleted :: (IsAnimation a, MonadIO m) => a -> ((?self :: a) => AnimationCompletedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the completed signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after animation #completed callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onAnimationCompleted :: (IsAnimation a, MonadIO m) => a -> ((?self :: a) => AnimationCompletedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the completed signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on animation #completed callback

started

type AnimationStartedCallback = IO () Source #

Deprecated: (Since version 1.12)Use PropertyTransition instead

The started signal is emitted once the animation has been started

Since: 1.0

afterAnimationStarted :: (IsAnimation a, MonadIO m) => a -> ((?self :: a) => AnimationStartedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the started signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after animation #started callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onAnimationStarted :: (IsAnimation a, MonadIO m) => a -> ((?self :: a) => AnimationStartedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the started signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on animation #started callback