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 |
GtkGestureClick
is a GtkGesture
implementation for clicks.
It is able to recognize multiple clicks on a nearby zone, which can be listened for through the GestureClick::pressed signal. Whenever time or distance between clicks exceed the GTK defaults, GestureClick::stopped is emitted, and the click counter is reset.
Synopsis
- newtype GestureClick = GestureClick (ManagedPtr GestureClick)
- class (GObject o, IsDescendantOf GestureClick o) => IsGestureClick o
- toGestureClick :: (MonadIO m, IsGestureClick o) => o -> m GestureClick
- gestureClickNew :: (HasCallStack, MonadIO m) => m GestureClick
- type GestureClickPressedCallback = Int32 -> Double -> Double -> IO ()
- afterGestureClickPressed :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickPressedCallback) -> m SignalHandlerId
- onGestureClickPressed :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickPressedCallback) -> m SignalHandlerId
- type GestureClickReleasedCallback = Int32 -> Double -> Double -> IO ()
- afterGestureClickReleased :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickReleasedCallback) -> m SignalHandlerId
- onGestureClickReleased :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickReleasedCallback) -> m SignalHandlerId
- type GestureClickStoppedCallback = IO ()
- afterGestureClickStopped :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickStoppedCallback) -> m SignalHandlerId
- onGestureClickStopped :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickStoppedCallback) -> m SignalHandlerId
- type GestureClickUnpairedReleaseCallback = Double -> Double -> Word32 -> Maybe EventSequence -> IO ()
- afterGestureClickUnpairedRelease :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickUnpairedReleaseCallback) -> m SignalHandlerId
- onGestureClickUnpairedRelease :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickUnpairedReleaseCallback) -> m SignalHandlerId
Exported types
newtype GestureClick Source #
Memory-managed wrapper type.
GestureClick (ManagedPtr GestureClick) |
Instances
Eq GestureClick Source # | |
Defined in GI.Gtk.Objects.GestureClick (==) :: GestureClick -> GestureClick -> Bool # (/=) :: GestureClick -> GestureClick -> Bool # | |
GObject GestureClick Source # | |
Defined in GI.Gtk.Objects.GestureClick | |
ManagedPtrNewtype GestureClick Source # | |
Defined in GI.Gtk.Objects.GestureClick toManagedPtr :: GestureClick -> ManagedPtr GestureClick | |
TypedObject GestureClick Source # | |
Defined in GI.Gtk.Objects.GestureClick | |
HasParentTypes GestureClick Source # | |
Defined in GI.Gtk.Objects.GestureClick | |
IsGValue (Maybe GestureClick) Source # | Convert |
Defined in GI.Gtk.Objects.GestureClick gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe GestureClick -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe GestureClick) | |
type ParentTypes GestureClick Source # | |
Defined in GI.Gtk.Objects.GestureClick |
class (GObject o, IsDescendantOf GestureClick o) => IsGestureClick o Source #
Type class for types which can be safely cast to GestureClick
, for instance with toGestureClick
.
Instances
(GObject o, IsDescendantOf GestureClick o) => IsGestureClick o Source # | |
Defined in GI.Gtk.Objects.GestureClick |
toGestureClick :: (MonadIO m, IsGestureClick o) => o -> m GestureClick Source #
Cast to GestureClick
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, group, handlesSequence, isActive, isFloating, isGroupedWith, isRecognized, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, ungroup, unref, watchClosure.
Getters
getBoundingBox, getBoundingBoxCenter, getButton, getCurrentButton, getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getCurrentSequence, getData, getDevice, getExclusive, getGroup, getLastEvent, getLastUpdatedSequence, getName, getPoint, getPropagationLimit, getPropagationPhase, getProperty, getQdata, getSequenceState, getSequences, getTouchOnly, getWidget.
Setters
setButton, setData, setDataFull, setExclusive, setName, setPropagationLimit, setPropagationPhase, setProperty, setSequenceState, setState, setStaticName, setTouchOnly.
new
:: (HasCallStack, MonadIO m) | |
=> m GestureClick | Returns: a newly created |
Returns a newly created GtkGesture
that recognizes
single and multiple presses.
Signals
pressed
type GestureClickPressedCallback Source #
= Int32 |
|
-> Double |
|
-> Double |
|
-> IO () |
Emitted whenever a button or touch press happens.
afterGestureClickPressed :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickPressedCallback) -> 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
gestureClick #pressed 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.
onGestureClickPressed :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickPressedCallback) -> 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
gestureClick #pressed callback
released
type GestureClickReleasedCallback Source #
= Int32 |
|
-> Double |
|
-> Double |
|
-> IO () |
Emitted when a button or touch is released.
nPress
will report the number of press that is paired to
this event, note that GestureClick::stopped may
have been emitted between the press and its release, nPress
will only start over at the next press.
afterGestureClickReleased :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickReleasedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the released signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
gestureClick #released 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.
onGestureClickReleased :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickReleasedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the released signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
gestureClick #released callback
stopped
type GestureClickStoppedCallback = IO () Source #
Emitted whenever any time/distance threshold has been exceeded.
afterGestureClickStopped :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickStoppedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the stopped signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
gestureClick #stopped 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.
onGestureClickStopped :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickStoppedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the stopped signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
gestureClick #stopped callback
unpairedRelease
type GestureClickUnpairedReleaseCallback Source #
= Double |
|
-> Double |
|
-> Word32 |
|
-> Maybe EventSequence |
|
-> IO () |
Emitted whenever the gesture receives a release event that had no previous corresponding press.
Due to implicit grabs, this can only happen on situations where input is grabbed elsewhere mid-press or the pressed widget voluntarily relinquishes its implicit grab.
afterGestureClickUnpairedRelease :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickUnpairedReleaseCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unpairedRelease signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
gestureClick #unpairedRelease 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.
onGestureClickUnpairedRelease :: (IsGestureClick a, MonadIO m) => a -> ((?self :: a) => GestureClickUnpairedReleaseCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unpairedRelease signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
gestureClick #unpairedRelease callback