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

GI.Gtk.Objects.GestureMultiPress

Description

GestureMultiPress 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 gestureMultiPressSetArea, so any click happening outside that area is considered to be a first click of its own.

Synopsis

Exported types

newtype GestureMultiPress Source #

Memory-managed wrapper type.

Constructors

GestureMultiPress (ManagedPtr GestureMultiPress) 

Instances

Instances details
Eq GestureMultiPress Source # 
Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

GObject GestureMultiPress Source # 
Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

ManagedPtrNewtype GestureMultiPress Source # 
Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

TypedObject GestureMultiPress Source # 
Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

Methods

glibType :: IO GType

HasParentTypes GestureMultiPress Source # 
Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

IsGValue (Maybe GestureMultiPress) Source #

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

Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes GestureMultiPress Source # 
Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

class (GObject o, IsDescendantOf GestureMultiPress o) => IsGestureMultiPress o Source #

Type class for types which can be safely cast to GestureMultiPress, for instance with toGestureMultiPress.

Instances

Instances details
(GObject o, IsDescendantOf GestureMultiPress o) => IsGestureMultiPress o Source # 
Instance details

Defined in GI.Gtk.Objects.GestureMultiPress

toGestureMultiPress :: (MonadIO m, IsGestureMultiPress o) => o -> m GestureMultiPress Source #

Cast to GestureMultiPress, for types for which this is known to be safe. For general casts, use castTo.

Methods

getArea

gestureMultiPressGetArea Source #

Arguments

:: (HasCallStack, MonadIO m, IsGestureMultiPress a) 
=> a

gesture: a GestureMultiPress

-> m (Bool, Rectangle)

Returns: True if rect was filled with the press area

If an area was set through gestureMultiPressSetArea, this function will return True and fill in rect with the press area. See gestureMultiPressSetArea for more details on what the press area represents.

Since: 3.14

new

gestureMultiPressNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWidget a) 
=> a

widget: a Widget

-> m GestureMultiPress

Returns: a newly created GestureMultiPress

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

Since: 3.14

setArea

gestureMultiPressSetArea Source #

Arguments

:: (HasCallStack, MonadIO m, IsGestureMultiPress a) 
=> a

gesture: a GestureMultiPress

-> Maybe Rectangle

rect: rectangle to receive coordinates on

-> m () 

If rect is non-Nothing, the press area will be checked to be confined within the rectangle, otherwise the button count will be reset so the press is seen as being the first one. If rect is Nothing, the area will be reset to an unrestricted state.

Note: The rectangle is only used to determine whether any non-first click falls within the expected area. This is not akin to an input shape.

Since: 3.14

Signals

pressed

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

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

type GestureMultiPressPressedCallback 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.

Since: 3.14

afterGestureMultiPressPressed :: (IsGestureMultiPress a, MonadIO m) => a -> GestureMultiPressPressedCallback -> 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 gestureMultiPress #pressed callback

onGestureMultiPressPressed :: (IsGestureMultiPress a, MonadIO m) => a -> GestureMultiPressPressedCallback -> 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 gestureMultiPress #pressed callback

released

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

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

type GestureMultiPressReleasedCallback 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.

Since: 3.14

afterGestureMultiPressReleased :: (IsGestureMultiPress a, MonadIO m) => a -> GestureMultiPressReleasedCallback -> 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 gestureMultiPress #released callback

onGestureMultiPressReleased :: (IsGestureMultiPress a, MonadIO m) => a -> GestureMultiPressReleasedCallback -> 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 gestureMultiPress #released callback

stopped

type C_GestureMultiPressStoppedCallback = Ptr () -> Ptr () -> IO () Source #

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

type GestureMultiPressStoppedCallback = IO () Source #

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

Since: 3.14

afterGestureMultiPressStopped :: (IsGestureMultiPress a, MonadIO m) => a -> GestureMultiPressStoppedCallback -> 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 gestureMultiPress #stopped callback

onGestureMultiPressStopped :: (IsGestureMultiPress a, MonadIO m) => a -> GestureMultiPressStoppedCallback -> 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 gestureMultiPress #stopped callback