gi-gtk-4.0.4: 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.GestureStylus

Description

GestureStylus is a Gesture implementation specific to stylus input. The provided signals just relay the basic information of the stylus events.

Synopsis

Exported types

newtype GestureStylus Source #

Memory-managed wrapper type.

Constructors

GestureStylus (ManagedPtr GestureStylus) 

Instances

Instances details
Eq GestureStylus Source # 
Instance details

Defined in GI.Gtk.Objects.GestureStylus

GObject GestureStylus Source # 
Instance details

Defined in GI.Gtk.Objects.GestureStylus

ManagedPtrNewtype GestureStylus Source # 
Instance details

Defined in GI.Gtk.Objects.GestureStylus

Methods

toManagedPtr :: GestureStylus -> ManagedPtr GestureStylus

TypedObject GestureStylus Source # 
Instance details

Defined in GI.Gtk.Objects.GestureStylus

Methods

glibType :: IO GType

HasParentTypes GestureStylus Source # 
Instance details

Defined in GI.Gtk.Objects.GestureStylus

IsGValue (Maybe GestureStylus) Source #

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

Instance details

Defined in GI.Gtk.Objects.GestureStylus

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes GestureStylus Source # 
Instance details

Defined in GI.Gtk.Objects.GestureStylus

class (GObject o, IsDescendantOf GestureStylus o) => IsGestureStylus o Source #

Type class for types which can be safely cast to GestureStylus, for instance with toGestureStylus.

Instances

Instances details
(GObject o, IsDescendantOf GestureStylus o) => IsGestureStylus o Source # 
Instance details

Defined in GI.Gtk.Objects.GestureStylus

toGestureStylus :: (MonadIO m, IsGestureStylus o) => o -> m GestureStylus Source #

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

Methods

getAxis

gestureStylusGetAxis Source #

Arguments

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

gesture: a GestureStylus

-> AxisUse

axis: requested device axis

-> m (Bool, Double)

Returns: True if there is a current value for the axis

Returns the current value for the requested axis.

This function must be called from the handler of one of the down, motion, up or proximity signals.

getBacklog

gestureStylusGetBacklog Source #

Arguments

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

gesture: a GestureStylus

-> m (Bool, [TimeCoord])

Returns: True if there is a backlog to unfold in the current state.

By default, GTK will limit rate of input events. On stylus input where accuracy of strokes is paramount, this function returns the accumulated coordinate/timing state before the emission of the current motion signal.

This function may only be called within a motion signal handler, the state given in this signal and obtainable through gestureStylusGetAxis call express the latest (most up-to-date) state in motion history.

The backlog is provided in chronological order.

getDeviceTool

gestureStylusGetDeviceTool Source #

Arguments

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

gesture: a GestureStylus

-> m (Maybe DeviceTool)

Returns: The current stylus tool

Returns the DeviceTool currently driving input through this gesture. This function must be called from either the down, motion, up or proximity signal handlers.

new

gestureStylusNew Source #

Arguments

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

Returns: a newly created stylus gesture

Creates a new GestureStylus.

Signals

down

type C_GestureStylusDownCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

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

type GestureStylusDownCallback Source #

Arguments

 = Double

x: the X coordinate of the stylus event

-> Double

y: the Y coordinate of the stylus event

-> IO () 

A signal emitted when the stylus touches the device.

afterGestureStylusDown :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusDownCallback -> m SignalHandlerId Source #

Connect a signal handler for the down signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gestureStylus #down callback

genClosure_GestureStylusDown :: MonadIO m => GestureStylusDownCallback -> m (GClosure C_GestureStylusDownCallback) Source #

Wrap the callback into a GClosure.

onGestureStylusDown :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusDownCallback -> m SignalHandlerId Source #

Connect a signal handler for the down signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gestureStylus #down callback

motion

type C_GestureStylusMotionCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

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

type GestureStylusMotionCallback Source #

Arguments

 = Double

x: the X coordinate of the stylus event

-> Double

y: the Y coordinate of the stylus event

-> IO () 

A signal emitted when the stylus moves while touching the device.

afterGestureStylusMotion :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusMotionCallback -> m SignalHandlerId Source #

Connect a signal handler for the motion signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gestureStylus #motion callback

onGestureStylusMotion :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusMotionCallback -> m SignalHandlerId Source #

Connect a signal handler for the motion signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gestureStylus #motion callback

proximity

type C_GestureStylusProximityCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

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

type GestureStylusProximityCallback Source #

Arguments

 = Double

x: the X coordinate of the stylus event

-> Double

y: the Y coordinate of the stylus event

-> IO () 

A signal emitted when the stylus is in proximity of the device.

afterGestureStylusProximity :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusProximityCallback -> m SignalHandlerId Source #

Connect a signal handler for the proximity signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gestureStylus #proximity callback

onGestureStylusProximity :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusProximityCallback -> m SignalHandlerId Source #

Connect a signal handler for the proximity signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gestureStylus #proximity callback

up

type C_GestureStylusUpCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

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

type GestureStylusUpCallback Source #

Arguments

 = Double

x: the X coordinate of the stylus event

-> Double

y: the Y coordinate of the stylus event

-> IO () 

A signal emitted when the stylus no longer touches the device.

afterGestureStylusUp :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusUpCallback -> m SignalHandlerId Source #

Connect a signal handler for the up signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gestureStylus #up callback

genClosure_GestureStylusUp :: MonadIO m => GestureStylusUpCallback -> m (GClosure C_GestureStylusUpCallback) Source #

Wrap the callback into a GClosure.

onGestureStylusUp :: (IsGestureStylus a, MonadIO m) => a -> GestureStylusUpCallback -> m SignalHandlerId Source #

Connect a signal handler for the up signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gestureStylus #up callback