| 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 |
GI.Gtk.Objects.GestureSwipe
Description
GestureSwipe is a Gesture implementation able to recognize
swipes, after a press/move/.../move/release sequence happens, the
GestureSwipe::swipe signal will be emitted, providing the velocity
and directionality of the sequence at the time it was lifted.
If the velocity is desired in intermediate points,
gestureSwipeGetVelocity can be called on eg. a
Gesture::update handler.
All velocities are reported in pixels/sec units.
- newtype GestureSwipe = GestureSwipe (ManagedPtr GestureSwipe)
- class GObject o => IsGestureSwipe o
- toGestureSwipe :: (MonadIO m, IsGestureSwipe o) => o -> m GestureSwipe
- noGestureSwipe :: Maybe GestureSwipe
- gestureSwipeGetVelocity :: (HasCallStack, MonadIO m, IsGestureSwipe a) => a -> m (Bool, Double, Double)
- gestureSwipeNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m GestureSwipe
- type C_GestureSwipeSwipeCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureSwipeSwipeCallback = Double -> Double -> IO ()
- afterGestureSwipeSwipe :: (IsGestureSwipe a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId
- genClosure_GestureSwipeSwipe :: GestureSwipeSwipeCallback -> IO Closure
- mk_GestureSwipeSwipeCallback :: C_GestureSwipeSwipeCallback -> IO (FunPtr C_GestureSwipeSwipeCallback)
- noGestureSwipeSwipeCallback :: Maybe GestureSwipeSwipeCallback
- onGestureSwipeSwipe :: (IsGestureSwipe a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId
- wrap_GestureSwipeSwipeCallback :: GestureSwipeSwipeCallback -> Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
Exported types
newtype GestureSwipe Source #
Constructors
| GestureSwipe (ManagedPtr GestureSwipe) |
class GObject o => IsGestureSwipe o Source #
Instances
toGestureSwipe :: (MonadIO m, IsGestureSwipe o) => o -> m GestureSwipe Source #
Methods
getVelocity
gestureSwipeGetVelocity Source #
Arguments
| :: (HasCallStack, MonadIO m, IsGestureSwipe a) | |
| => a |
|
| -> m (Bool, Double, Double) | Returns: whether velocity could be calculated |
If the gesture is recognized, this function returns True and fill in
velocityX and velocityY with the recorded velocity, as per the
last event(s) processed.
Since: 3.14
new
Arguments
| :: (HasCallStack, MonadIO m, IsWidget a) | |
| => a |
|
| -> m GestureSwipe | Returns: a newly created |
Returns a newly created Gesture that recognizes swipes.
Since: 3.14
Signals
swipe
afterGestureSwipeSwipe :: (IsGestureSwipe a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId Source #
mk_GestureSwipeSwipeCallback :: C_GestureSwipeSwipeCallback -> IO (FunPtr C_GestureSwipeSwipeCallback) Source #
onGestureSwipeSwipe :: (IsGestureSwipe a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId Source #
wrap_GestureSwipeSwipeCallback :: GestureSwipeSwipeCallback -> Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #