Gtk.GestureStylus¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.GestureSingle (8), Gtk.Gesture (17), Gtk.EventController (13), GObject.Object (37)
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Gtk.GestureSingle (3), Gtk.Gesture (1), Gtk.EventController (4)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the stylus touches the device. |
|
Emitted when the stylus moves while touching the device. |
|
Emitted when the stylus is in proximity of the device. |
|
Emitted when the stylus no longer touches the device. |
Fields¶
- Inherited:
Class Details¶
- class Gtk.GestureStylus(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GtkGestureStylus
is aGtkGesture
specific to stylus input.The provided signals just relay the basic information of the stylus events.
- classmethod new()[source]¶
- Returns:
a newly created stylus gesture
- Return type:
Creates a new
GtkGestureStylus
.
- get_axes(axes)[source]¶
- Parameters:
axes ([
Gdk.AxisUse
]) – array of requested axes, terminated withGdk.AxisUse.IGNORE
- Returns:
True
if there is a current value for the axes- values:
return location for the axis values
- Return type:
Returns the current values for the requested axes.
This function must be called from the handler of one of the [signal`Gtk`.GestureStylus::down], [signal`Gtk`.GestureStylus::motion], [signal`Gtk`.GestureStylus::up] or [signal`Gtk`.GestureStylus::proximity] signals.
- get_axis(axis)[source]¶
- Parameters:
axis (
Gdk.AxisUse
) – requested device axis- Returns:
True
if there is a current value for the axis- value:
return location for the axis value
- Return type:
Returns the current value for the requested axis.
This function must be called from the handler of one of the [signal`Gtk`.GestureStylus::down], [signal`Gtk`.GestureStylus::motion], [signal`Gtk`.GestureStylus::up] or [signal`Gtk`.GestureStylus::proximity] signals.
- get_backlog()[source]¶
- Returns:
True
if there is a backlog to unfold in the current state.- backlog:
coordinates and times for the backlog events
- Return type:
(
bool
, backlog: [Gdk.TimeCoord
])
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 [signal`Gtk`.GestureStylus::motion] signal handler, the state given in this signal and obtainable through [method`Gtk`.GestureStylus.get_axis] express the latest (most up-to-date) state in motion history.
The backlog is provided in chronological order.
- get_device_tool()[source]¶
- Returns:
The current stylus tool
- Return type:
Returns the
GdkDeviceTool
currently driving input through this gesture.This function must be called from the handler of one of the [signal`Gtk`.GestureStylus::down], [signal`Gtk`.GestureStylus::motion], [signal`Gtk`.GestureStylus::up] or [signal`Gtk`.GestureStylus::proximity] signals.
- get_stylus_only()[source]¶
-
Checks whether the gesture is for styluses only.
Stylus-only gestures will signal events exclusively from stylus input devices.
New in version 4.10.
- set_stylus_only(stylus_only)[source]¶
- Parameters:
stylus_only (
bool
) – whether the gesture is used exclusivly for stylus events
Sets the state of stylus-only
If true, the gesture will exclusivly handle events from stylus input deivces, otherwise it’ll handle events from any pointing device.
New in version 4.10.
Signal Details¶
- Gtk.GestureStylus.signals.down(gesture_stylus, x, y)¶
- Signal Name:
down
- Flags:
- Parameters:
gesture_stylus (
Gtk.GestureStylus
) – The object which received the signalx (
float
) – the X coordinate of the stylus eventy (
float
) – the Y coordinate of the stylus event
Emitted when the stylus touches the device.
- Gtk.GestureStylus.signals.motion(gesture_stylus, x, y)¶
- Signal Name:
motion
- Flags:
- Parameters:
gesture_stylus (
Gtk.GestureStylus
) – The object which received the signalx (
float
) – the X coordinate of the stylus eventy (
float
) – the Y coordinate of the stylus event
Emitted when the stylus moves while touching the device.
- Gtk.GestureStylus.signals.proximity(gesture_stylus, x, y)¶
- Signal Name:
proximity
- Flags:
- Parameters:
gesture_stylus (
Gtk.GestureStylus
) – The object which received the signalx (
float
) – the X coordinate of the stylus eventy (
float
) – the Y coordinate of the stylus event
Emitted when the stylus is in proximity of the device.
- Gtk.GestureStylus.signals.up(gesture_stylus, x, y)¶
- Signal Name:
up
- Flags:
- Parameters:
gesture_stylus (
Gtk.GestureStylus
) – The object which received the signalx (
float
) – the X coordinate of the stylus eventy (
float
) – the Y coordinate of the stylus event
Emitted when the stylus no longer touches the device.