gi-gtk-4.0.2: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.GestureClick

Description

GestureClick is a Gesture implementation able to recognize multiple clicks on a nearby zone, which can be listened for through the pressed signal. Whenever time or distance between clicks exceed the GTK+ defaults, stopped is emitted, and the click counter is reset.

Callers may also restrict the area that is considered valid for a >1 touch/button press through gtk_gesture_click_set_area(), so any click happening outside that area is considered to be a first click of its own.

Synopsis

Exported types

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

Instances details
(GObject o, IsDescendantOf GestureClick o) => IsGestureClick o Source # 
Instance details

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

Overloaded methods

new

gestureClickNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m GestureClick

Returns: a newly created GestureClick

Returns a newly created Gesture that recognizes single and multiple presses.

Signals

pressed

type C_GestureClickPressedCallback = Ptr () -> Int32 -> CDouble -> CDouble -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GestureClickPressedCallback Source #

Arguments

 = Int32

nPress: how many touch/button presses happened with this one

-> Double

x: The X coordinate, in widget allocation coordinates

-> Double

y: The Y coordinate, in widget allocation coordinates

-> IO () 

This signal is emitted whenever a button or touch press happens.

afterGestureClickPressed :: (IsGestureClick a, MonadIO m) => 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

onGestureClickPressed :: (IsGestureClick a, MonadIO m) => 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 C_GestureClickReleasedCallback = Ptr () -> Int32 -> CDouble -> CDouble -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GestureClickReleasedCallback Source #

Arguments

 = Int32

nPress: number of press that is paired with this release

-> Double

x: The X coordinate, in widget allocation coordinates

-> Double

y: The Y coordinate, in widget allocation coordinates

-> IO () 

This signal is emitted when a button or touch is released. nPress will report the number of press that is paired to this event, note that 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 -> 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

onGestureClickReleased :: (IsGestureClick a, MonadIO m) => 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 C_GestureClickStoppedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GestureClickStoppedCallback = IO () Source #

This signal is emitted whenever any time/distance threshold has been exceeded.

afterGestureClickStopped :: (IsGestureClick a, MonadIO m) => 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

onGestureClickStopped :: (IsGestureClick a, MonadIO m) => 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 C_GestureClickUnpairedReleaseCallback = Ptr () -> CDouble -> CDouble -> Word32 -> Ptr EventSequence -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GestureClickUnpairedReleaseCallback Source #

Arguments

 = Double

x: X coordinate of the event

-> Double

y: Y coordinate of the event

-> Word32

button: Button being released

-> EventSequence

sequence: Sequence being released

-> IO () 

This signal is 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 -> 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

onGestureClickUnpairedRelease :: (IsGestureClick a, MonadIO m) => 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