gi-clutter-1.0.2: 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.PathConstraint

Description

PathConstraint is an opaque structure whose members cannot be directly accessed

Since: 1.6

Synopsis

Exported types

class (GObject o, IsDescendantOf PathConstraint o) => IsPathConstraint o Source #

Type class for types which can be safely cast to PathConstraint, for instance with toPathConstraint.

Instances

Instances details
(GObject o, IsDescendantOf PathConstraint o) => IsPathConstraint o Source # 
Instance details

Defined in GI.Clutter.Objects.PathConstraint

toPathConstraint :: (MonadIO m, IsPathConstraint o) => o -> m PathConstraint Source #

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

Methods

getOffset

pathConstraintGetOffset Source #

Arguments

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

constraint: a PathConstraint

-> m Float

Returns: the offset

Retrieves the offset along the Path used by constraint.

Since: 1.6

getPath

pathConstraintGetPath Source #

Arguments

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

constraint: a PathConstraint

-> m Path

Returns: the Path used by the PathConstraint, or Nothing. The returned Path is owned by the constraint and it should not be unreferenced

Retrieves a pointer to the Path used by constraint.

Since: 1.6

new

pathConstraintNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsPath a) 
=> Maybe a

path: a Path, or Nothing

-> Float

offset: the offset along the Path

-> m PathConstraint

Returns: the newly created PathConstraint

Creates a new PathConstraint with the given path and offset

Since: 1.6

setOffset

pathConstraintSetOffset Source #

Arguments

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

constraint: a PathConstraint

-> Float

offset: the offset along the path

-> m () 

Sets the offset along the Path used by constraint.

Since: 1.6

setPath

pathConstraintSetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsPathConstraint a, IsPath b) 
=> a

constraint: a PathConstraint

-> Maybe b

path: a Path

-> m () 

Sets the path to be followed by the PathConstraint.

The constraint will take ownership of the Path passed to this function.

Since: 1.6

Properties

offset

The offset along the PathConstraint:path, between -1.0 and 2.0.

Since: 1.6

constructPathConstraintOffset :: (IsPathConstraint o, MonadIO m) => Float -> m (GValueConstruct o) Source #

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

getPathConstraintOffset :: (MonadIO m, IsPathConstraint o) => o -> m Float Source #

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

get pathConstraint #offset

setPathConstraintOffset :: (MonadIO m, IsPathConstraint o) => o -> Float -> m () Source #

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

set pathConstraint [ #offset := value ]

path

The Path used to constrain the position of an actor.

Since: 1.6

clearPathConstraintPath :: (MonadIO m, IsPathConstraint o) => o -> m () Source #

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

clear #path

constructPathConstraintPath :: (IsPathConstraint o, MonadIO m, IsPath a) => a -> m (GValueConstruct o) Source #

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

getPathConstraintPath :: (MonadIO m, IsPathConstraint o) => o -> m Path Source #

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

get pathConstraint #path

setPathConstraintPath :: (MonadIO m, IsPathConstraint o, IsPath a) => o -> a -> m () Source #

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

set pathConstraint [ #path := value ]

Signals

nodeReached

type PathConstraintNodeReachedCallback Source #

Arguments

 = Actor

actor: the Actor using the constraint

-> Word32

index: the index of the node that has been reached

-> IO () 

The nodeReached signal is emitted each time a PathConstraint:offset value results in the actor passing a PathNode

Since: 1.6

afterPathConstraintNodeReached :: (IsPathConstraint a, MonadIO m) => a -> ((?self :: a) => PathConstraintNodeReachedCallback) -> m SignalHandlerId Source #

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

after pathConstraint #nodeReached 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.

onPathConstraintNodeReached :: (IsPathConstraint a, MonadIO m) => a -> ((?self :: a) => PathConstraintNodeReachedCallback) -> m SignalHandlerId Source #

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

on pathConstraint #nodeReached callback