gi-clutter-1.0.3: 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.Behaviour

Description

Behaviour-struct contains only private data and should be accessed with the functions below.

Since: 0.2

Synopsis

Exported types

newtype Behaviour Source #

Memory-managed wrapper type.

Constructors

Behaviour (ManagedPtr Behaviour) 

Instances

Instances details
Eq Behaviour Source # 
Instance details

Defined in GI.Clutter.Objects.Behaviour

GObject Behaviour Source # 
Instance details

Defined in GI.Clutter.Objects.Behaviour

ManagedPtrNewtype Behaviour Source # 
Instance details

Defined in GI.Clutter.Objects.Behaviour

Methods

toManagedPtr :: Behaviour -> ManagedPtr Behaviour

TypedObject Behaviour Source # 
Instance details

Defined in GI.Clutter.Objects.Behaviour

Methods

glibType :: IO GType

HasParentTypes Behaviour Source # 
Instance details

Defined in GI.Clutter.Objects.Behaviour

IsGValue (Maybe Behaviour) Source #

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

Instance details

Defined in GI.Clutter.Objects.Behaviour

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Behaviour Source # 
Instance details

Defined in GI.Clutter.Objects.Behaviour

type ParentTypes Behaviour = '[Object, Scriptable]

class (GObject o, IsDescendantOf Behaviour o) => IsBehaviour o Source #

Type class for types which can be safely cast to Behaviour, for instance with toBehaviour.

Instances

Instances details
(GObject o, IsDescendantOf Behaviour o) => IsBehaviour o Source # 
Instance details

Defined in GI.Clutter.Objects.Behaviour

toBehaviour :: (MonadIO m, IsBehaviour o) => o -> m Behaviour Source #

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

Methods

actorsForeach

behaviourActorsForeach Source #

Arguments

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

behave: a Behaviour

-> BehaviourForeachFunc

func: a function called for each actor

-> m () 

Deprecated: (Since version 1.6)

Calls func for every actor driven by behave.

Since: 0.2

apply

behaviourApply Source #

Arguments

:: (HasCallStack, MonadIO m, IsBehaviour a, IsActor b) 
=> a

behave: a Behaviour

-> b

actor: a Actor

-> m () 

Deprecated: (Since version 1.6)

Applies behave to actor. This function adds a reference on the actor.

Since: 0.2

getActors

behaviourGetActors Source #

Arguments

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

behave: a Behaviour

-> m [Actor]

Returns: a list of actors. You should free the returned list with g_slist_free() when finished using it.

Deprecated: (Since version 1.6)

Retrieves all the actors to which behave applies. It is not recommended for derived classes to use this in there alpha notify method but use clutter_behaviour_actors_foreach as it avoids alot of needless allocations.

Since: 0.2

getAlpha

behaviourGetAlpha Source #

Arguments

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

behave: a Behaviour

-> m Alpha

Returns: a Alpha object, or Nothing if no alpha object has been bound to this behaviour.

Deprecated: (Since version 1.6)

Retrieves the Alpha object bound to behave.

Since: 0.2

getNActors

behaviourGetNActors Source #

Arguments

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

behave: a Behaviour

-> m Int32

Returns: The number of applied actors

Deprecated: (Since version 1.6)

Gets the number of actors this behaviour is applied too.

Since: 0.2

getNthActor

behaviourGetNthActor Source #

Arguments

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

behave: a Behaviour

-> Int32

index_: the index of an actor this behaviour is applied too.

-> m Actor

Returns: A Clutter actor or NULL if index_ is invalid.

Deprecated: (Since version 1.6)

Gets an actor the behaviour was applied to referenced by index num.

Since: 0.2

isApplied

behaviourIsApplied Source #

Arguments

:: (HasCallStack, MonadIO m, IsBehaviour a, IsActor b) 
=> a

behave: a Behaviour

-> b

actor: a Actor

-> m Bool

Returns: TRUE if actor has behaviour. FALSE otherwise.

Deprecated: (Since version 1.6)

Check if behave applied to actor.

Since: 0.4

remove

behaviourRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsBehaviour a, IsActor b) 
=> a

behave: a Behaviour

-> b

actor: a Actor

-> m () 

Deprecated: (Since version 1.6)

Removes actor from the list of Actors to which behave applies. This function removes a reference on the actor.

Since: 0.2

removeAll

behaviourRemoveAll Source #

Arguments

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

behave: a Behaviour

-> m () 

Deprecated: (Since version 1.6)

Removes every actor from the list that behave holds.

Since: 0.4

setAlpha

behaviourSetAlpha Source #

Arguments

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

behave: a Behaviour

-> b

alpha: a Alpha or Nothing to unset a previously set alpha

-> m () 

Deprecated: (Since version 1.6)

Binds alpha to a Behaviour. The Alpha object is what makes a behaviour work: for each tick of the timeline used by Alpha a new value of the alpha parameter is computed by the alpha function; the value should be used by the Behaviour to update one or more properties of the actors to which the behaviour applies.

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

Since: 0.2

Properties

alpha

The Alpha object used to drive this behaviour. A Alpha object binds a Timeline and a function which computes a value (the "alpha") depending on the time. Each time the alpha value changes the alpha-notify virtual function is called.

Since: 0.2

constructBehaviourAlpha :: (IsBehaviour 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.

getBehaviourAlpha :: (MonadIO m, IsBehaviour o) => o -> m Alpha Source #

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

get behaviour #alpha

setBehaviourAlpha :: (MonadIO m, IsBehaviour o, IsAlpha a) => o -> a -> m () Source #

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

set behaviour [ #alpha := value ]

Signals

applied

type BehaviourAppliedCallback Source #

Arguments

 = Actor

actor: the actor the behaviour was applied to.

-> IO () 

Deprecated: (Since version 1.6)

The apply signal is emitted each time the behaviour is applied to an actor.

Since: 0.4

afterBehaviourApplied :: (IsBehaviour a, MonadIO m) => a -> ((?self :: a) => BehaviourAppliedCallback) -> m SignalHandlerId Source #

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

after behaviour #applied 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.

onBehaviourApplied :: (IsBehaviour a, MonadIO m) => a -> ((?self :: a) => BehaviourAppliedCallback) -> m SignalHandlerId Source #

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

on behaviour #applied callback

removed

type BehaviourRemovedCallback Source #

Arguments

 = Actor

actor: the removed actor

-> IO () 

Deprecated: (Since version 1.6)

The removed signal is emitted each time a behaviour is not applied to an actor anymore.

Since: 0.4

afterBehaviourRemoved :: (IsBehaviour a, MonadIO m) => a -> ((?self :: a) => BehaviourRemovedCallback) -> m SignalHandlerId Source #

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

after behaviour #removed 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.

onBehaviourRemoved :: (IsBehaviour a, MonadIO m) => a -> ((?self :: a) => BehaviourRemovedCallback) -> m SignalHandlerId Source #

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

on behaviour #removed callback