Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GestureLongPress
is a Gesture
implementation able to recognize
long presses, triggering the pressed after the
timeout is exceeded.
If the touchpoint is lifted before the timeout passes, or if it drifts too far of the initial press point, the cancelled signal will be emitted.
Synopsis
- newtype GestureLongPress = GestureLongPress (ManagedPtr GestureLongPress)
- class (GObject o, IsDescendantOf GestureLongPress o) => IsGestureLongPress o
- toGestureLongPress :: (MonadIO m, IsGestureLongPress o) => o -> m GestureLongPress
- gestureLongPressNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m GestureLongPress
- constructGestureLongPressDelayFactor :: (IsGestureLongPress o, MonadIO m) => Double -> m (GValueConstruct o)
- getGestureLongPressDelayFactor :: (MonadIO m, IsGestureLongPress o) => o -> m Double
- setGestureLongPressDelayFactor :: (MonadIO m, IsGestureLongPress o) => o -> Double -> m ()
- type C_GestureLongPressCancelledCallback = Ptr () -> Ptr () -> IO ()
- type GestureLongPressCancelledCallback = IO ()
- afterGestureLongPressCancelled :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressCancelledCallback -> m SignalHandlerId
- genClosure_GestureLongPressCancelled :: MonadIO m => GestureLongPressCancelledCallback -> m (GClosure C_GestureLongPressCancelledCallback)
- mk_GestureLongPressCancelledCallback :: C_GestureLongPressCancelledCallback -> IO (FunPtr C_GestureLongPressCancelledCallback)
- noGestureLongPressCancelledCallback :: Maybe GestureLongPressCancelledCallback
- onGestureLongPressCancelled :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressCancelledCallback -> m SignalHandlerId
- wrap_GestureLongPressCancelledCallback :: GestureLongPressCancelledCallback -> C_GestureLongPressCancelledCallback
- type C_GestureLongPressPressedCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureLongPressPressedCallback = Double -> Double -> IO ()
- afterGestureLongPressPressed :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressPressedCallback -> m SignalHandlerId
- genClosure_GestureLongPressPressed :: MonadIO m => GestureLongPressPressedCallback -> m (GClosure C_GestureLongPressPressedCallback)
- mk_GestureLongPressPressedCallback :: C_GestureLongPressPressedCallback -> IO (FunPtr C_GestureLongPressPressedCallback)
- noGestureLongPressPressedCallback :: Maybe GestureLongPressPressedCallback
- onGestureLongPressPressed :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressPressedCallback -> m SignalHandlerId
- wrap_GestureLongPressPressedCallback :: GestureLongPressPressedCallback -> C_GestureLongPressPressedCallback
Exported types
newtype GestureLongPress Source #
Memory-managed wrapper type.
Instances
Eq GestureLongPress Source # | |
Defined in GI.Gtk.Objects.GestureLongPress (==) :: GestureLongPress -> GestureLongPress -> Bool # (/=) :: GestureLongPress -> GestureLongPress -> Bool # | |
IsGValue GestureLongPress Source # | Convert |
Defined in GI.Gtk.Objects.GestureLongPress toGValue :: GestureLongPress -> IO GValue # fromGValue :: GValue -> IO GestureLongPress # | |
ManagedPtrNewtype GestureLongPress Source # | |
Defined in GI.Gtk.Objects.GestureLongPress | |
TypedObject GestureLongPress Source # | |
Defined in GI.Gtk.Objects.GestureLongPress | |
GObject GestureLongPress Source # | |
Defined in GI.Gtk.Objects.GestureLongPress | |
HasParentTypes GestureLongPress Source # | |
Defined in GI.Gtk.Objects.GestureLongPress | |
type ParentTypes GestureLongPress Source # | |
Defined in GI.Gtk.Objects.GestureLongPress |
class (GObject o, IsDescendantOf GestureLongPress o) => IsGestureLongPress o Source #
Type class for types which can be safely cast to GestureLongPress
, for instance with toGestureLongPress
.
Instances
(GObject o, IsDescendantOf GestureLongPress o) => IsGestureLongPress o Source # | |
Defined in GI.Gtk.Objects.GestureLongPress |
toGestureLongPress :: (MonadIO m, IsGestureLongPress o) => o -> m GestureLongPress Source #
Cast to GestureLongPress
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
new
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m GestureLongPress | Returns: a newly created |
Returns a newly created Gesture
that recognizes long presses.
Since: 3.14
Properties
delayFactor
No description available in the introspection data.
constructGestureLongPressDelayFactor :: (IsGestureLongPress o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “delay-factor
” property. This is rarely needed directly, but it is used by new
.
getGestureLongPressDelayFactor :: (MonadIO m, IsGestureLongPress o) => o -> m Double Source #
Get the value of the “delay-factor
” property.
When overloading is enabled, this is equivalent to
get
gestureLongPress #delayFactor
setGestureLongPressDelayFactor :: (MonadIO m, IsGestureLongPress o) => o -> Double -> m () Source #
Set the value of the “delay-factor
” property.
When overloading is enabled, this is equivalent to
set
gestureLongPress [ #delayFactor:=
value ]
Signals
cancelled
type C_GestureLongPressCancelledCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type GestureLongPressCancelledCallback = IO () Source #
This signal is emitted whenever a press moved too far, or was released before pressed happened.
Since: 3.14
afterGestureLongPressCancelled :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressCancelledCallback -> m SignalHandlerId Source #
Connect a signal handler for the cancelled signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
gestureLongPress #cancelled callback
genClosure_GestureLongPressCancelled :: MonadIO m => GestureLongPressCancelledCallback -> m (GClosure C_GestureLongPressCancelledCallback) Source #
Wrap the callback into a GClosure
.
mk_GestureLongPressCancelledCallback :: C_GestureLongPressCancelledCallback -> IO (FunPtr C_GestureLongPressCancelledCallback) Source #
Generate a function pointer callable from C code, from a C_GestureLongPressCancelledCallback
.
noGestureLongPressCancelledCallback :: Maybe GestureLongPressCancelledCallback Source #
A convenience synonym for
.Nothing
:: Maybe
GestureLongPressCancelledCallback
onGestureLongPressCancelled :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressCancelledCallback -> m SignalHandlerId Source #
Connect a signal handler for the cancelled signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
gestureLongPress #cancelled callback
wrap_GestureLongPressCancelledCallback :: GestureLongPressCancelledCallback -> C_GestureLongPressCancelledCallback Source #
pressed
type C_GestureLongPressPressedCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type GestureLongPressPressedCallback Source #
= Double |
|
-> Double |
|
-> IO () |
This signal is emitted whenever a press goes unmoved/unreleased longer than what the GTK+ defaults tell.
Since: 3.14
afterGestureLongPressPressed :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressPressedCallback -> m SignalHandlerId Source #
Connect a signal handler for the pressed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
gestureLongPress #pressed callback
genClosure_GestureLongPressPressed :: MonadIO m => GestureLongPressPressedCallback -> m (GClosure C_GestureLongPressPressedCallback) Source #
Wrap the callback into a GClosure
.
mk_GestureLongPressPressedCallback :: C_GestureLongPressPressedCallback -> IO (FunPtr C_GestureLongPressPressedCallback) Source #
Generate a function pointer callable from C code, from a C_GestureLongPressPressedCallback
.
noGestureLongPressPressedCallback :: Maybe GestureLongPressPressedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
GestureLongPressPressedCallback
onGestureLongPressPressed :: (IsGestureLongPress a, MonadIO m) => a -> GestureLongPressPressedCallback -> m SignalHandlerId Source #
Connect a signal handler for the pressed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
gestureLongPress #pressed callback