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

Description

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

Since: 1.12

Synopsis

Exported types

newtype PanAction Source #

Memory-managed wrapper type.

Constructors

PanAction (ManagedPtr PanAction) 

Instances

Instances details
Eq PanAction Source # 
Instance details

Defined in GI.Clutter.Objects.PanAction

GObject PanAction Source # 
Instance details

Defined in GI.Clutter.Objects.PanAction

ManagedPtrNewtype PanAction Source # 
Instance details

Defined in GI.Clutter.Objects.PanAction

Methods

toManagedPtr :: PanAction -> ManagedPtr PanAction

TypedObject PanAction Source # 
Instance details

Defined in GI.Clutter.Objects.PanAction

Methods

glibType :: IO GType

HasParentTypes PanAction Source # 
Instance details

Defined in GI.Clutter.Objects.PanAction

IsGValue (Maybe PanAction) Source #

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

Instance details

Defined in GI.Clutter.Objects.PanAction

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes PanAction Source # 
Instance details

Defined in GI.Clutter.Objects.PanAction

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

class (GObject o, IsDescendantOf PanAction o) => IsPanAction o Source #

Type class for types which can be safely cast to PanAction, for instance with toPanAction.

Instances

Instances details
(GObject o, IsDescendantOf PanAction o) => IsPanAction o Source # 
Instance details

Defined in GI.Clutter.Objects.PanAction

toPanAction :: (MonadIO m, IsPanAction o) => o -> m PanAction Source #

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

Methods

getAccelerationFactor

panActionGetAccelerationFactor Source #

Arguments

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

self: A PanAction

-> m Double

Returns: The initial acceleration factor for interpolated events.

Retrieves the initial acceleration factor for interpolated pan events.

Since: 1.12

getConstrainedMotionDelta

panActionGetConstrainedMotionDelta Source #

Arguments

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

self: A PanAction

-> 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 delta, in stage space, dependent on the current state of the PanAction, and respecting the constraint specified by the PanAction:panAxis property.

Since: 1.24

getDeceleration

panActionGetDeceleration Source #

Arguments

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

self: A PanAction

-> m Double

Returns: The deceleration rate of the interpolated events.

Retrieves the deceleration rate of interpolated pan events.

Since: 1.12

getInterpolate

panActionGetInterpolate Source #

Arguments

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

self: a PanAction

-> m Bool

Returns: True if interpolated events emission is active.

Checks if the action should emit pan events even after releasing the pointer during a panning gesture, to emulate some kind of kinetic inertia.

Since: 1.12

getInterpolatedCoords

panActionGetInterpolatedCoords Source #

Arguments

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

self: A PanAction

-> m (Float, Float) 

Retrieves the coordinates, in stage space, of the latest interpolated event, analogous to gestureActionGetMotionCoords.

Since: 1.12

getInterpolatedDelta

panActionGetInterpolatedDelta Source #

Arguments

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

self: A PanAction

-> m (Float, Float, Float)

Returns: the distance since the latest interpolated event

Retrieves the delta, in stage space, since the latest interpolated event, analogous to gestureActionGetMotionDelta.

Since: 1.12

getMotionCoords

panActionGetMotionCoords Source #

Arguments

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

self: A PanAction

-> 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, dependent on the current state of the PanAction. If it is inactive, both fields will be set to 0. If it is panning by user action, the values will be equivalent to those returned by gestureActionGetMotionCoords. If it is interpolating with some form of kinetic scrolling, the values will be equivalent to those returned by panActionGetInterpolatedCoords. This is a convenience method designed to be used in replacement "pan" signal handlers.

Since: 1.14

getMotionDelta

panActionGetMotionDelta Source #

Arguments

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

self: A PanAction

-> Word32

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

-> m (Float, Float, Float) 

Retrieves the delta, in stage space, dependent on the current state of the PanAction. If it is inactive, both fields will be set to 0. If it is panning by user action, the values will be equivalent to those returned by gestureActionGetMotionDelta. If it is interpolating with some form of kinetic scrolling, the values will be equivalent to those returned by panActionGetInterpolatedDelta. This is a convenience method designed to be used in replacement "pan" signal handlers.

Since: 1.14

getPanAxis

panActionGetPanAxis Source #

Arguments

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

self: a PanAction

-> m PanAxis

Returns: the axis constraint

Retrieves the axis constraint set by panActionSetPanAxis

Since: 1.12

new

panActionNew Source #

Arguments

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

Returns: the newly created PanAction

Creates a new PanAction instance

Since: 1.12

setAccelerationFactor

panActionSetAccelerationFactor Source #

Arguments

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

self: A PanAction

-> Double

factor: The acceleration factor

-> m () 

Factor applied to the momentum velocity at the time of releasing the pointer when generating interpolated pan events.

Since: 1.12

setDeceleration

panActionSetDeceleration Source #

Arguments

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

self: A PanAction

-> Double

rate: The deceleration rate

-> m () 

Sets the deceleration rate of the interpolated pan events generated after a pan gesture. This is approximately the value that the momentum at the time of releasing the pointer is divided by every 60th of a second.

Since: 1.12

setInterpolate

panActionSetInterpolate Source #

Arguments

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

self: a PanAction

-> Bool

shouldInterpolate: whether to enable interpolated pan events

-> m () 

Sets whether the action should emit interpolated pan events after the drag has ended, to emulate the gesture kinetic inertia.

Since: 1.12

setPanAxis

panActionSetPanAxis Source #

Arguments

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

self: a PanAction

-> PanAxis

axis: the axis to constraint the panning to

-> m () 

Restricts the panning action to a specific axis

Since: 1.12

Properties

accelerationFactor

The initial acceleration factor

The kinetic momentum measured at the time of releasing the pointer will be multiplied by the factor specified by this property before being used to generate interpolated pan events.

Since: 1.12

constructPanActionAccelerationFactor :: (IsPanAction o, MonadIO m) => Double -> m (GValueConstruct o) Source #

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

getPanActionAccelerationFactor :: (MonadIO m, IsPanAction o) => o -> m Double Source #

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

get panAction #accelerationFactor

setPanActionAccelerationFactor :: (MonadIO m, IsPanAction o) => o -> Double -> m () Source #

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

set panAction [ #accelerationFactor := value ]

deceleration

The rate at which the interpolated panning will decelerate in

PanAction will emit interpolated pan events with decreasing scroll deltas, using the rate specified by this property.

Since: 1.12

constructPanActionDeceleration :: (IsPanAction o, MonadIO m) => Double -> m (GValueConstruct o) Source #

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

getPanActionDeceleration :: (MonadIO m, IsPanAction o) => o -> m Double Source #

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

get panAction #deceleration

setPanActionDeceleration :: (MonadIO m, IsPanAction o) => o -> Double -> m () Source #

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

set panAction [ #deceleration := value ]

interpolate

Whether interpolated events emission is enabled.

Since: 1.12

constructPanActionInterpolate :: (IsPanAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getPanActionInterpolate :: (MonadIO m, IsPanAction o) => o -> m Bool Source #

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

get panAction #interpolate

setPanActionInterpolate :: (MonadIO m, IsPanAction o) => o -> Bool -> m () Source #

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

set panAction [ #interpolate := value ]

panAxis

Constraints the panning action to the specified axis

Since: 1.12

constructPanActionPanAxis :: (IsPanAction o, MonadIO m) => PanAxis -> m (GValueConstruct o) Source #

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

getPanActionPanAxis :: (MonadIO m, IsPanAction o) => o -> m PanAxis Source #

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

get panAction #panAxis

setPanActionPanAxis :: (MonadIO m, IsPanAction o) => o -> PanAxis -> m () Source #

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

set panAction [ #panAxis := value ]

Signals

pan

type PanActionPanCallback Source #

Arguments

 = Actor

actor: the Actor attached to the action

-> Bool

isInterpolated: if the event is the result of interpolating the motion velocity at the end of the drag

-> IO Bool

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

The pan signal is emitted to keep track of the motion during a pan gesture. isInterpolated is set to True during the interpolation phase of the pan, after the drag has ended and the :interpolate property was set to True.

Since: 1.12

afterPanActionPan :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanCallback) -> m SignalHandlerId Source #

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

after panAction #pan 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.

onPanActionPan :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanCallback) -> m SignalHandlerId Source #

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

on panAction #pan callback

panStopped

type PanActionPanStoppedCallback Source #

Arguments

 = Actor

actor: the Actor attached to the action

-> IO () 

The panStopped signal is emitted at the end of the interpolation phase of the pan action, only when :interpolate is set to True.

Since: 1.12

afterPanActionPanStopped :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanStoppedCallback) -> m SignalHandlerId Source #

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

after panAction #panStopped 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.

onPanActionPanStopped :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanStoppedCallback) -> m SignalHandlerId Source #

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

on panAction #panStopped callback