gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.GestureSingle

Contents

Description

GestureSingle is a subclass of Gesture, optimized (although not restricted) for dealing with mouse and single-touch gestures. Under interaction, these gestures stick to the first interacting sequence, which is accessible through gestureSingleGetCurrentSequence while the gesture is being interacted with.

By default gestures react to both BUTTON_PRIMARY and touch events, gestureSingleSetTouchOnly can be used to change the touch behavior. Callers may also specify a different mouse button number to interact with through gestureSingleSetButton, or react to any mouse button by setting 0. While the gesture is active, the button being currently pressed can be known through gestureSingleGetCurrentButton.

Synopsis

Exported types

Methods

getButton

gestureSingleGetButton Source #

Arguments

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

gesture: a GestureSingle

-> m Word32

Returns: The button number, or 0 for any button

Returns the button number gesture listens for, or 0 if gesture reacts to any button press.

Since: 3.14

getCurrentButton

gestureSingleGetCurrentButton Source #

Arguments

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

gesture: a GestureSingle

-> m Word32

Returns: The current button number

Returns the button number currently interacting with gesture, or 0 if there is none.

Since: 3.14

getCurrentSequence

gestureSingleGetCurrentSequence Source #

Arguments

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

gesture: a GestureSingle

-> m (Maybe EventSequence)

Returns: the current sequence

Returns the event sequence currently interacting with gesture. This is only meaningful if gestureIsActive returns True.

Since: 3.14

getExclusive

gestureSingleGetExclusive Source #

Arguments

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

gesture: a GestureSingle

-> m Bool

Returns: Whether the gesture is exclusive

Gets whether a gesture is exclusive. For more information, see gestureSingleSetExclusive.

Since: 3.14

getTouchOnly

gestureSingleGetTouchOnly Source #

Arguments

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

gesture: a GestureSingle

-> m Bool

Returns: True if the gesture only handles touch events

Returns True if the gesture is only triggered by touch events.

Since: 3.14

setButton

gestureSingleSetButton Source #

Arguments

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

gesture: a GestureSingle

-> Word32

button: button number to listen to, or 0 for any button

-> m () 

Sets the button number gesture listens to. If non-0, every button press from a different button number will be ignored. Touch events implicitly match with button 1.

Since: 3.14

setExclusive

gestureSingleSetExclusive Source #

Arguments

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

gesture: a GestureSingle

-> Bool

exclusive: True to make gesture exclusive

-> m () 

Sets whether gesture is exclusive. An exclusive gesture will only handle pointer and "pointer emulated" touch events, so at any given time, there is only one sequence able to interact with those.

Since: 3.14

setTouchOnly

gestureSingleSetTouchOnly Source #

Arguments

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

gesture: a GestureSingle

-> Bool

touchOnly: whether gesture handles only touch events

-> m () 

If touchOnly is True, gesture will only handle events of type GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE or GDK_TOUCH_END. If False, mouse events will be handled too.

Since: 3.14

Properties

button

data GestureSingleButtonPropertyInfo Source #

Instances

AttrInfo GestureSingleButtonPropertyInfo Source # 
type AttrOrigin GestureSingleButtonPropertyInfo Source # 
type AttrLabel GestureSingleButtonPropertyInfo Source # 
type AttrGetType GestureSingleButtonPropertyInfo Source # 
type AttrBaseTypeConstraint GestureSingleButtonPropertyInfo Source # 
type AttrSetTypeConstraint GestureSingleButtonPropertyInfo Source # 
type AttrAllowedOps GestureSingleButtonPropertyInfo Source # 

exclusive

data GestureSingleExclusivePropertyInfo Source #

Instances

AttrInfo GestureSingleExclusivePropertyInfo Source # 
type AttrOrigin GestureSingleExclusivePropertyInfo Source # 
type AttrLabel GestureSingleExclusivePropertyInfo Source # 
type AttrGetType GestureSingleExclusivePropertyInfo Source # 
type AttrBaseTypeConstraint GestureSingleExclusivePropertyInfo Source # 
type AttrSetTypeConstraint GestureSingleExclusivePropertyInfo Source # 
type AttrAllowedOps GestureSingleExclusivePropertyInfo Source # 

touchOnly

data GestureSingleTouchOnlyPropertyInfo Source #

Instances

AttrInfo GestureSingleTouchOnlyPropertyInfo Source # 
type AttrOrigin GestureSingleTouchOnlyPropertyInfo Source # 
type AttrLabel GestureSingleTouchOnlyPropertyInfo Source # 
type AttrGetType GestureSingleTouchOnlyPropertyInfo Source # 
type AttrBaseTypeConstraint GestureSingleTouchOnlyPropertyInfo Source # 
type AttrSetTypeConstraint GestureSingleTouchOnlyPropertyInfo Source # 
type AttrAllowedOps GestureSingleTouchOnlyPropertyInfo Source #