Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GesturePan
is a Gesture
implementation able to recognize
pan gestures, those are drags that are locked to happen along one
axis. The axis that a GesturePan
handles is defined at
construct time, and can be changed through
gesturePanSetOrientation
.
When the gesture starts to be recognized, GesturePan
will
attempt to determine as early as possible whether the sequence
is moving in the expected direction, and denying the sequence if
this does not happen.
Once a panning gesture along the expected axis is recognized,
the GesturePan
::pan
signal will be emitted as input events
are received, containing the offset in the given axis.
- newtype GesturePan = GesturePan (ManagedPtr GesturePan)
- class GObject o => IsGesturePan o
- toGesturePan :: IsGesturePan o => o -> IO GesturePan
- noGesturePan :: Maybe GesturePan
- data GesturePanGetOrientationMethodInfo
- gesturePanGetOrientation :: (HasCallStack, MonadIO m, IsGesturePan a) => a -> m Orientation
- gesturePanNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> Orientation -> m GesturePan
- data GesturePanSetOrientationMethodInfo
- gesturePanSetOrientation :: (HasCallStack, MonadIO m, IsGesturePan a) => a -> Orientation -> m ()
- data GesturePanOrientationPropertyInfo
- constructGesturePanOrientation :: IsGesturePan o => Orientation -> IO (GValueConstruct o)
- gesturePanOrientation :: AttrLabelProxy "orientation"
- getGesturePanOrientation :: (MonadIO m, IsGesturePan o) => o -> m Orientation
- setGesturePanOrientation :: (MonadIO m, IsGesturePan o) => o -> Orientation -> m ()
- type C_GesturePanPanCallback = Ptr () -> CUInt -> CDouble -> Ptr () -> IO ()
- type GesturePanPanCallback = PanDirection -> Double -> IO ()
- data GesturePanPanSignalInfo
- afterGesturePanPan :: (GObject a, MonadIO m) => a -> GesturePanPanCallback -> m SignalHandlerId
- genClosure_GesturePanPan :: GesturePanPanCallback -> IO Closure
- mk_GesturePanPanCallback :: C_GesturePanPanCallback -> IO (FunPtr C_GesturePanPanCallback)
- noGesturePanPanCallback :: Maybe GesturePanPanCallback
- onGesturePanPan :: (GObject a, MonadIO m) => a -> GesturePanPanCallback -> m SignalHandlerId
- wrap_GesturePanPanCallback :: GesturePanPanCallback -> Ptr () -> CUInt -> CDouble -> Ptr () -> IO ()
Exported types
newtype GesturePan Source #
GObject GesturePan Source # | |
IsObject GesturePan Source # | |
IsGestureSingle GesturePan Source # | |
IsGestureDrag GesturePan Source # | |
IsGesture GesturePan Source # | |
IsEventController GesturePan Source # | |
IsGesturePan GesturePan Source # | |
((~) * info (ResolveGesturePanMethod t GesturePan), MethodInfo * info GesturePan p) => IsLabel t (GesturePan -> p) Source # | |
((~) * info (ResolveGesturePanMethod t GesturePan), MethodInfo * info GesturePan p) => IsLabelProxy t (GesturePan -> p) Source # | |
HasAttributeList * GesturePan Source # | |
type AttributeList GesturePan Source # | |
type SignalList GesturePan Source # | |
class GObject o => IsGesturePan o Source #
toGesturePan :: IsGesturePan o => o -> IO GesturePan Source #
Methods
getOrientation
data GesturePanGetOrientationMethodInfo Source #
((~) * signature (m Orientation), MonadIO m, IsGesturePan a) => MethodInfo * GesturePanGetOrientationMethodInfo a signature Source # | |
gesturePanGetOrientation Source #
:: (HasCallStack, MonadIO m, IsGesturePan a) | |
=> a |
|
-> m Orientation | Returns: the expected orientation for pan gestures |
Returns the orientation of the pan gestures that this gesture
expects.
Since: 3.14
new
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Orientation |
|
-> m GesturePan | Returns: a newly created |
Returns a newly created Gesture
that recognizes pan gestures.
Since: 3.14
setOrientation
data GesturePanSetOrientationMethodInfo Source #
((~) * signature (Orientation -> m ()), MonadIO m, IsGesturePan a) => MethodInfo * GesturePanSetOrientationMethodInfo a signature Source # | |
gesturePanSetOrientation Source #
:: (HasCallStack, MonadIO m, IsGesturePan a) | |
=> a |
|
-> Orientation |
|
-> m () |
Sets the orientation to be expected on pan gestures.
Since: 3.14
Properties
orientation
data GesturePanOrientationPropertyInfo Source #
constructGesturePanOrientation :: IsGesturePan o => Orientation -> IO (GValueConstruct o) Source #
gesturePanOrientation :: AttrLabelProxy "orientation" Source #
getGesturePanOrientation :: (MonadIO m, IsGesturePan o) => o -> m Orientation Source #
setGesturePanOrientation :: (MonadIO m, IsGesturePan o) => o -> Orientation -> m () Source #
Signals
pan
type GesturePanPanCallback = PanDirection -> Double -> IO () Source #
afterGesturePanPan :: (GObject a, MonadIO m) => a -> GesturePanPanCallback -> m SignalHandlerId Source #
onGesturePanPan :: (GObject a, MonadIO m) => a -> GesturePanPanCallback -> m SignalHandlerId Source #
wrap_GesturePanPanCallback :: GesturePanPanCallback -> Ptr () -> CUInt -> CDouble -> Ptr () -> IO () Source #