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.GestureAction

Description

The GestureAction structure contains only private data and should be accessed using the provided API

Since: 1.8

Synopsis

Exported types

newtype GestureAction Source #

Memory-managed wrapper type.

Constructors

GestureAction (ManagedPtr GestureAction) 

Instances

Instances details
Eq GestureAction Source # 
Instance details

Defined in GI.Clutter.Objects.GestureAction

GObject GestureAction Source # 
Instance details

Defined in GI.Clutter.Objects.GestureAction

ManagedPtrNewtype GestureAction Source # 
Instance details

Defined in GI.Clutter.Objects.GestureAction

Methods

toManagedPtr :: GestureAction -> ManagedPtr GestureAction

TypedObject GestureAction Source # 
Instance details

Defined in GI.Clutter.Objects.GestureAction

Methods

glibType :: IO GType

HasParentTypes GestureAction Source # 
Instance details

Defined in GI.Clutter.Objects.GestureAction

IsGValue (Maybe GestureAction) Source #

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

Instance details

Defined in GI.Clutter.Objects.GestureAction

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes GestureAction Source # 
Instance details

Defined in GI.Clutter.Objects.GestureAction

type ParentTypes GestureAction = '[Action, ActorMeta, Object]

class (GObject o, IsDescendantOf GestureAction o) => IsGestureAction o Source #

Type class for types which can be safely cast to GestureAction, for instance with toGestureAction.

Instances

Instances details
(GObject o, IsDescendantOf GestureAction o) => IsGestureAction o Source # 
Instance details

Defined in GI.Clutter.Objects.GestureAction

toGestureAction :: (MonadIO m, IsGestureAction o) => o -> m GestureAction Source #

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

Methods

cancel

gestureActionCancel Source #

Arguments

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

action: a GestureAction

-> m () 

Cancel a GestureAction before it begins

Since: 1.12

getDevice

gestureActionGetDevice Source #

Arguments

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

action: a GestureAction

-> Word32

point: the touch point index, with 0 being the first touch point received by the action

-> m InputDevice

Returns: the InputDevice of a touch point.

Retrieves the InputDevice of a touch point.

Since: 1.12

getLastEvent

gestureActionGetLastEvent Source #

Arguments

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

action: a GestureAction

-> Word32

point: index of a point currently active

-> m Event

Returns: the last Event for a touch point.

Retrieves a reference to the last Event for a touch point. Call eventCopy if you need to store the reference somewhere.

Since: 1.14

getMotionCoords

gestureActionGetMotionCoords Source #

Arguments

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

action: a GestureAction

-> Word32

point: the touch point index, with 0 being the first touch point received by the action

-> m (Float, Float) 

Retrieves the coordinates, in stage space, of the latest motion event during the dragging.

Since: 1.8

getMotionDelta

gestureActionGetMotionDelta Source #

Arguments

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

action: a GestureAction

-> Word32

point: the touch point index, with 0 being the first touch point received by the action

-> m (Float, Float, Float)

Returns: the distance since last motion event

Retrieves the incremental delta since the last motion event during the dragging.

Since: 1.12

getNCurrentPoints

gestureActionGetNCurrentPoints Source #

Arguments

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

action: a GestureAction

-> m Word32

Returns: the number of points currently active.

Retrieves the number of points currently active.

Since: 1.12

getNTouchPoints

gestureActionGetNTouchPoints Source #

Arguments

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

action: a GestureAction

-> m Int32

Returns: the number of points to trigger the gesture.

Retrieves the number of requested points to trigger the gesture.

Since: 1.12

getPressCoords

gestureActionGetPressCoords Source #

Arguments

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

action: a GestureAction

-> Word32

point: the touch point index, with 0 being the first touch point received by the action

-> m (Float, Float) 

Retrieves the coordinates, in stage space, of the press event that started the dragging for a specific touch point.

Since: 1.8

getReleaseCoords

gestureActionGetReleaseCoords Source #

Arguments

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

action: a GestureAction

-> Word32

point: the touch point index, with 0 being the first touch point received by the action

-> m (Float, Float) 

Retrieves the coordinates, in stage space, where the touch point was last released.

Since: 1.8

getSequence

gestureActionGetSequence Source #

Arguments

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

action: a GestureAction

-> Word32

point: index of a point currently active

-> m EventSequence

Returns: the EventSequence of a touch point.

Retrieves the EventSequence of a touch point.

Since: 1.12

getThresholdTriggerDistance

gestureActionGetThresholdTriggerDistance Source #

Arguments

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

action: a GestureAction

-> m (Float, Float) 

Retrieves the threshold trigger distance of the gesture action, as set using gestureActionSetThresholdTriggerDistance.

Since: 1.18

getThresholdTriggerEdge

gestureActionGetThresholdTriggerEdge Source #

Arguments

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

action: a GestureAction

-> m GestureTriggerEdge

Returns: the edge trigger

Retrieves the edge trigger of the gesture action, as set using gestureActionSetThresholdTriggerEdge.

Since: 1.20

getThresholdTriggerEgde

gestureActionGetThresholdTriggerEgde Source #

Arguments

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

action: a GestureAction

-> m GestureTriggerEdge

Returns: the edge trigger

Deprecated: (Since version 1.20)Use gestureActionGetThresholdTriggerEdge instead.

Retrieves the edge trigger of the gesture action, as set using gestureActionSetThresholdTriggerEdge.

Since: 1.18

getVelocity

gestureActionGetVelocity Source #

Arguments

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

action: a GestureAction

-> Word32

point: the touch point index, with 0 being the first touch point received by the action

-> m (Float, Float, Float) 

Retrieves the velocity, in stage pixels per millisecond, of the latest motion event during the dragging.

Since: 1.12

new

gestureActionNew Source #

Arguments

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

Returns: the newly created GestureAction

Creates a new GestureAction instance.

Since: 1.8

setNTouchPoints

gestureActionSetNTouchPoints Source #

Arguments

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

action: a GestureAction

-> Int32

nbPoints: a number of points

-> m () 

Sets the number of points needed to trigger the gesture.

Since: 1.12

setThresholdTriggerDistance

gestureActionSetThresholdTriggerDistance Source #

Arguments

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

action: a GestureAction

-> Float

x: the distance on the horizontal axis

-> Float

y: the distance on the vertical axis

-> m () 

Sets the threshold trigger distance for the gesture drag threshold, if any.

This function should only be called by sub-classes of GestureAction during their construction phase.

Since: 1.18

setThresholdTriggerEdge

gestureActionSetThresholdTriggerEdge Source #

Arguments

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

action: a GestureAction

-> GestureTriggerEdge

edge: the ClutterGestureTriggerEdge

-> m () 

Sets the edge trigger for the gesture drag threshold, if any.

This function should only be called by sub-classes of GestureAction during their construction phase.

Since: 1.18

Properties

nTouchPoints

Number of touch points to trigger a gesture action.

Since: 1.16

constructGestureActionNTouchPoints :: (IsGestureAction o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getGestureActionNTouchPoints :: (MonadIO m, IsGestureAction o) => o -> m Int32 Source #

Get the value of the “n-touch-points” property. When overloading is enabled, this is equivalent to

get gestureAction #nTouchPoints

setGestureActionNTouchPoints :: (MonadIO m, IsGestureAction o) => o -> Int32 -> m () Source #

Set the value of the “n-touch-points” property. When overloading is enabled, this is equivalent to

set gestureAction [ #nTouchPoints := value ]

thresholdTriggerDistanceX

The horizontal trigger distance to be used by the action to either emit the GestureAction::gestureBegin signal or to emit the GestureAction::gestureCancel signal.

A negative value will be interpreted as the default drag threshold.

Since: 1.18

constructGestureActionThresholdTriggerDistanceX :: (IsGestureAction o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “threshold-trigger-distance-x” property. This is rarely needed directly, but it is used by new.

getGestureActionThresholdTriggerDistanceX :: (MonadIO m, IsGestureAction o) => o -> m Float Source #

Get the value of the “threshold-trigger-distance-x” property. When overloading is enabled, this is equivalent to

get gestureAction #thresholdTriggerDistanceX

thresholdTriggerDistanceY

The vertical trigger distance to be used by the action to either emit the GestureAction::gestureBegin signal or to emit the GestureAction::gestureCancel signal.

A negative value will be interpreted as the default drag threshold.

Since: 1.18

constructGestureActionThresholdTriggerDistanceY :: (IsGestureAction o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “threshold-trigger-distance-y” property. This is rarely needed directly, but it is used by new.

getGestureActionThresholdTriggerDistanceY :: (MonadIO m, IsGestureAction o) => o -> m Float Source #

Get the value of the “threshold-trigger-distance-y” property. When overloading is enabled, this is equivalent to

get gestureAction #thresholdTriggerDistanceY

thresholdTriggerEdge

The trigger edge to be used by the action to either emit the GestureAction::gestureBegin signal or to emit the GestureAction::gestureCancel signal.

Since: 1.18

constructGestureActionThresholdTriggerEdge :: (IsGestureAction o, MonadIO m) => GestureTriggerEdge -> m (GValueConstruct o) Source #

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

getGestureActionThresholdTriggerEdge :: (MonadIO m, IsGestureAction o) => o -> m GestureTriggerEdge Source #

Get the value of the “threshold-trigger-edge” property. When overloading is enabled, this is equivalent to

get gestureAction #thresholdTriggerEdge

Signals

gestureBegin

type GestureActionGestureBeginCallback Source #

Arguments

 = Actor

actor: the Actor attached to the action

-> IO Bool

Returns: True if the gesture should start, and False if the gesture should be ignored.

The gesture_begin signal is emitted when the Actor to which a GestureAction has been applied starts receiving a gesture.

Since: 1.8

afterGestureActionGestureBegin :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureBeginCallback) -> m SignalHandlerId Source #

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

after gestureAction #gestureBegin 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.

onGestureActionGestureBegin :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureBeginCallback) -> m SignalHandlerId Source #

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

on gestureAction #gestureBegin callback

gestureCancel

type GestureActionGestureCancelCallback Source #

Arguments

 = Actor

actor: the Actor attached to the action

-> IO () 

The gestureCancel signal is emitted when the ongoing gesture gets cancelled from the GestureAction::gestureProgress signal handler.

This signal is emitted if and only if the GestureAction::gestureBegin signal has been emitted first.

Since: 1.8

afterGestureActionGestureCancel :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureCancelCallback) -> m SignalHandlerId Source #

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

after gestureAction #gestureCancel 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.

onGestureActionGestureCancel :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureCancelCallback) -> m SignalHandlerId Source #

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

on gestureAction #gestureCancel callback

gestureEnd

type GestureActionGestureEndCallback Source #

Arguments

 = Actor

actor: the Actor attached to the action

-> IO () 

The gestureEnd signal is emitted at the end of the gesture gesture, when the pointer's button is released

This signal is emitted if and only if the GestureAction::gestureBegin signal has been emitted first.

Since: 1.8

afterGestureActionGestureEnd :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureEndCallback) -> m SignalHandlerId Source #

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

after gestureAction #gestureEnd 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.

onGestureActionGestureEnd :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureEndCallback) -> m SignalHandlerId Source #

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

on gestureAction #gestureEnd callback

gestureProgress

type GestureActionGestureProgressCallback Source #

Arguments

 = Actor

actor: the Actor attached to the action

-> IO Bool

Returns: True if the gesture should continue, and False if the gesture should be cancelled.

The gestureProgress signal is emitted for each motion event after the GestureAction::gestureBegin signal has been emitted.

Since: 1.8

afterGestureActionGestureProgress :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureProgressCallback) -> m SignalHandlerId Source #

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

after gestureAction #gestureProgress 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.

onGestureActionGestureProgress :: (IsGestureAction a, MonadIO m) => a -> ((?self :: a) => GestureActionGestureProgressCallback) -> m SignalHandlerId Source #

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

on gestureAction #gestureProgress callback