Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The PanAction
structure contains
only private data and should be accessed using the provided API
Since: 1.12
Synopsis
- newtype PanAction = PanAction (ManagedPtr PanAction)
- class (GObject o, IsDescendantOf PanAction o) => IsPanAction o
- toPanAction :: (MonadIO m, IsPanAction o) => o -> m PanAction
- panActionGetAccelerationFactor :: (HasCallStack, MonadIO m, IsPanAction a) => a -> m Double
- panActionGetConstrainedMotionDelta :: (HasCallStack, MonadIO m, IsPanAction a) => a -> Word32 -> m (Float, Float, Float)
- panActionGetDeceleration :: (HasCallStack, MonadIO m, IsPanAction a) => a -> m Double
- panActionGetInterpolate :: (HasCallStack, MonadIO m, IsPanAction a) => a -> m Bool
- panActionGetInterpolatedCoords :: (HasCallStack, MonadIO m, IsPanAction a) => a -> m (Float, Float)
- panActionGetInterpolatedDelta :: (HasCallStack, MonadIO m, IsPanAction a) => a -> m (Float, Float, Float)
- panActionGetMotionCoords :: (HasCallStack, MonadIO m, IsPanAction a) => a -> Word32 -> m (Float, Float)
- panActionGetMotionDelta :: (HasCallStack, MonadIO m, IsPanAction a) => a -> Word32 -> m (Float, Float, Float)
- panActionGetPanAxis :: (HasCallStack, MonadIO m, IsPanAction a) => a -> m PanAxis
- panActionNew :: (HasCallStack, MonadIO m) => m PanAction
- panActionSetAccelerationFactor :: (HasCallStack, MonadIO m, IsPanAction a) => a -> Double -> m ()
- panActionSetDeceleration :: (HasCallStack, MonadIO m, IsPanAction a) => a -> Double -> m ()
- panActionSetInterpolate :: (HasCallStack, MonadIO m, IsPanAction a) => a -> Bool -> m ()
- panActionSetPanAxis :: (HasCallStack, MonadIO m, IsPanAction a) => a -> PanAxis -> m ()
- constructPanActionAccelerationFactor :: (IsPanAction o, MonadIO m) => Double -> m (GValueConstruct o)
- getPanActionAccelerationFactor :: (MonadIO m, IsPanAction o) => o -> m Double
- setPanActionAccelerationFactor :: (MonadIO m, IsPanAction o) => o -> Double -> m ()
- constructPanActionDeceleration :: (IsPanAction o, MonadIO m) => Double -> m (GValueConstruct o)
- getPanActionDeceleration :: (MonadIO m, IsPanAction o) => o -> m Double
- setPanActionDeceleration :: (MonadIO m, IsPanAction o) => o -> Double -> m ()
- constructPanActionInterpolate :: (IsPanAction o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPanActionInterpolate :: (MonadIO m, IsPanAction o) => o -> m Bool
- setPanActionInterpolate :: (MonadIO m, IsPanAction o) => o -> Bool -> m ()
- constructPanActionPanAxis :: (IsPanAction o, MonadIO m) => PanAxis -> m (GValueConstruct o)
- getPanActionPanAxis :: (MonadIO m, IsPanAction o) => o -> m PanAxis
- setPanActionPanAxis :: (MonadIO m, IsPanAction o) => o -> PanAxis -> m ()
- type PanActionPanCallback = Actor -> Bool -> IO Bool
- afterPanActionPan :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanCallback) -> m SignalHandlerId
- onPanActionPan :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanCallback) -> m SignalHandlerId
- type PanActionPanStoppedCallback = Actor -> IO ()
- afterPanActionPanStopped :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanStoppedCallback) -> m SignalHandlerId
- onPanActionPanStopped :: (IsPanAction a, MonadIO m) => a -> ((?self :: a) => PanActionPanStoppedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq PanAction Source # | |
GObject PanAction Source # | |
Defined in GI.Clutter.Objects.PanAction | |
ManagedPtrNewtype PanAction Source # | |
Defined in GI.Clutter.Objects.PanAction toManagedPtr :: PanAction -> ManagedPtr PanAction | |
TypedObject PanAction Source # | |
Defined in GI.Clutter.Objects.PanAction | |
HasParentTypes PanAction Source # | |
Defined in GI.Clutter.Objects.PanAction | |
IsGValue (Maybe PanAction) Source # | Convert |
Defined in GI.Clutter.Objects.PanAction gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe PanAction -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe PanAction) | |
type ParentTypes PanAction Source # | |
Defined in GI.Clutter.Objects.PanAction |
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
(GObject o, IsDescendantOf PanAction o) => IsPanAction o Source # | |
Defined in GI.Clutter.Objects.PanAction |
toPanAction :: (MonadIO m, IsPanAction o) => o -> m PanAction Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, cancel, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAccelerationFactor, getActor, getConstrainedMotionDelta, getData, getDeceleration, getDevice, getEnabled, getInterpolate, getInterpolatedCoords, getInterpolatedDelta, getLastEvent, getMotionCoords, getMotionDelta, getNCurrentPoints, getNTouchPoints, getName, getPanAxis, getPressCoords, getProperty, getQdata, getReleaseCoords, getSequence, getThresholdTriggerDistance, getThresholdTriggerEdge, getThresholdTriggerEgde, getVelocity.
Setters
setAccelerationFactor, setData, setDataFull, setDeceleration, setEnabled, setInterpolate, setNTouchPoints, setName, setPanAxis, setProperty, setThresholdTriggerDistance, setThresholdTriggerEdge.
getAccelerationFactor
panActionGetAccelerationFactor Source #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> Word32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> m Double | Returns: The deceleration rate of the interpolated events. |
Retrieves the deceleration rate of interpolated pan events.
Since: 1.12
getInterpolate
panActionGetInterpolate Source #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> m (Float, Float) |
Retrieves the coordinates, in stage space, of the latest interpolated
event, analogous to gestureActionGetMotionCoords
.
Since: 1.12
getInterpolatedDelta
panActionGetInterpolatedDelta Source #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> Word32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> Word32 |
|
-> 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
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> m PanAxis | Returns: the axis constraint |
Retrieves the axis constraint set by panActionSetPanAxis
Since: 1.12
new
:: (HasCallStack, MonadIO m) | |
=> m PanAction | Returns: the newly created |
Creates a new PanAction
instance
Since: 1.12
setAccelerationFactor
panActionSetAccelerationFactor Source #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> Double |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> Double |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> Bool |
|
-> 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
:: (HasCallStack, MonadIO m, IsPanAction a) | |
=> a |
|
-> PanAxis |
|
-> 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 #
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 #
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