gi-gtk-4.0.8: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.GestureClick

Description

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

Exported types

newtype GestureClick Source #

Memory-managed wrapper type.

Constructors

GestureClick (ManagedPtr GestureClick) 

Instances

Instances details
Eq GestureClick Source # 
Instance details

Defined in GI.Gtk.Objects.GestureClick

GObject GestureClick Source # 
Instance details

Defined in GI.Gtk.Objects.GestureClick

ManagedPtrNewtype GestureClick Source # 
Instance details

Defined in GI.Gtk.Objects.GestureClick

Methods

toManagedPtr :: GestureClick -> ManagedPtr GestureClick

TypedObject GestureClick Source # 
Instance details

Defined in GI.Gtk.Objects.GestureClick

Methods

glibType :: IO GType

HasParentTypes GestureClick Source # 
Instance details

Defined in GI.Gtk.Objects.GestureClick

IsGValue (Maybe GestureClick) Source #

Convert GestureClick to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.GestureClick

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe GestureClick -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe GestureClick)

type ParentTypes GestureClick Source # 
Instance details

Defined in GI.Gtk.Objects.GestureClick

type ParentTypes GestureClick = '[GestureSingle, Gesture, EventController, Object]

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

new

gestureClickNew Source #

Arguments

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

Returns: a newly created GtkGestureClick

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

Signals

pressed

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 () 

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 #

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 () 

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 #

Arguments

 = Double

x: X coordinate of the event

-> Double

y: Y coordinate of the event

-> Word32

button: Button being released

-> Maybe EventSequence

sequence: Sequence being released

-> 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