1.88 <GtkGestureStylus>

Class: <GtkGestureStylus>

It derives from <GtkGestureSingle>.

Recognizes tablet stylus input.

The provided signals just relay the basic information of the stylus events.

Properties

Property: gesture-stylus:stylus-only self

If this gesture should exclusively react to stylus input devices.

Its value is a boolean.

Set it with (set! (gesture-stylus:stylus-only self) value).

Procedures

Method: gesture-stylus:get-axes self axes ⇒ %return values
Method: get-axes self axes ⇒ %return values

Returns the current values for the requested axes.

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

self

Passed: a <GtkGestureStylus>.

a <GtkGestureStylus>

axes

Passed: a foreign pointer, or a bytevector.

array of requested axes, terminated with ignore

%return

Returned: a boolean.

#t if there is a current value for the axes

values

Returned: a foreign pointer.

return location for the axis values

Method: gesture-stylus:get-axis self axis ⇒ %return value
Method: get-axis self axis ⇒ %return value

Returns the current value for the requested axis.

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

self

Passed: a <GtkGestureStylus>.

a <GtkGestureStylus>

axis

Passed: a <GdkAxisUse>, or one of its symbols.

requested device axis

%return

Returned: a boolean.

#t if there is a current value for the axis

value

Returned: a real number.

return location for the axis value

Method: gesture-stylus:get-backlog self ⇒ %return backlog
Method: get-backlog self ⇒ %return backlog

Returns the accumulated backlog of tracking information.

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 [Gtk.GestureStylus::motion] signal.

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

The backlog is provided in chronological order.

self

Passed: a <GtkGestureStylus>.

a <GtkGestureStylus>

%return

Returned: a boolean.

#t if there is a backlog to unfold in the current state.

backlog

Returned: a vector, each a <GdkTimeCoord>.

coordinates and times for the backlog events

n-elems

Not returned: it is the length of backlog.

return location for the number of elements

Method: gesture-stylus:get-device-tool self ⇒ %return
Method: get-device-tool self ⇒ %return

Returns the <GdkDeviceTool> currently driving input through this gesture.

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

self

Passed: a <GtkGestureStylus>.

a <GtkGestureStylus>

%return

Returned: a <GdkDeviceTool>, or #f.

The current stylus tool

Method: gesture-stylus:get-stylus-only? self ⇒ %return
Method: get-stylus-only? self ⇒ %return

Checks whether the gesture is for styluses only.

Stylus-only gestures will signal events exclusively from stylus input devices.

self

Passed: a <GtkGestureStylus>.

the gesture

%return

Returned: a boolean.

#t if the gesture is only for stylus events

Procedure: gesture-stylus:new ⇒ %return

Creates a new <GtkGestureStylus>.

%return

Returned: a <GtkGesture>.

a newly created stylus gesture

Method: gesture-stylus:set-stylus-only self stylus-only
Method: set-stylus-only self stylus-only

Sets the state of stylus-only

If true, the gesture will exclusively handle events from stylus input devices, otherwise it’ll handle events from any pointing device.

self

Passed: a <GtkGestureStylus>.

the gesture

stylus-only

Passed: a boolean.

whether the gesture is used exclusively for stylus events

Signals

Signal: gesture-stylus:down

Connect a handler with (connect object gesture-stylus:down handler). It is called as (handler self x y).

Emitted when the stylus touches the device.

self

Passed: a <GtkGestureStylus>.

x

Passed: a real number.

the X coordinate of the stylus event

y

Passed: a real number.

the Y coordinate of the stylus event

Signal: gesture-stylus:motion

Connect a handler with (connect object gesture-stylus:motion handler). It is called as (handler self x y).

Emitted when the stylus moves while touching the device.

self

Passed: a <GtkGestureStylus>.

x

Passed: a real number.

the X coordinate of the stylus event

y

Passed: a real number.

the Y coordinate of the stylus event

Signal: gesture-stylus:proximity

Connect a handler with (connect object gesture-stylus:proximity handler). It is called as (handler self x y).

Emitted when the stylus is in proximity of the device.

self

Passed: a <GtkGestureStylus>.

x

Passed: a real number.

the X coordinate of the stylus event

y

Passed: a real number.

the Y coordinate of the stylus event

Signal: gesture-stylus:up

Connect a handler with (connect object gesture-stylus:up handler). It is called as (handler self x y).

Emitted when the stylus no longer touches the device.

self

Passed: a <GtkGestureStylus>.

x

Passed: a real number.

the X coordinate of the stylus event

y

Passed: a real number.

the Y coordinate of the stylus event