Gdk.DeviceTool

g GObject.Object GObject.Object Gdk.DeviceTool Gdk.DeviceTool GObject.Object->Gdk.DeviceTool

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_axes ()

get_hardware_id ()

get_serial ()

get_tool_type ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

axes

Gdk.AxisFlags

r/w/co

hardware-id

int

r/w/co

serial

int

r/w/co

tool-type

Gdk.DeviceToolType

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gdk.DeviceTool(**kwargs)
Bases:

GObject.Object

Abstract:

No

A physical tool associated to a GdkDevice.

get_axes()[source]
Returns:

the axes of self

Return type:

Gdk.AxisFlags

Gets the axes of the tool.

get_hardware_id()[source]
Returns:

The hardware identifier of this tool.

Return type:

int

Gets the hardware ID of this tool, or 0 if it’s not known.

When non-zero, the identifier is unique for the given tool model, meaning that two identical tools will share the same hardware_id, but will have different serial numbers (see [method`Gdk`.DeviceTool.get_serial]).

This is a more concrete (and device specific) method to identify a GdkDeviceTool than [method`Gdk`.DeviceTool.get_tool_type], as a tablet may support multiple devices with the same GdkDeviceToolType, but different hardware identifiers.

get_serial()[source]
Returns:

The serial ID for this tool

Return type:

int

Gets the serial number of this tool.

This value can be used to identify a physical tool (eg. a tablet pen) across program executions.

get_tool_type()[source]
Returns:

The physical type for this tool. This can be used to figure out what sort of pen is being used, such as an airbrush or a pencil.

Return type:

Gdk.DeviceToolType

Gets the GdkDeviceToolType of the tool.

Property Details

Gdk.DeviceTool.props.axes
Name:

axes

Type:

Gdk.AxisFlags

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The axes of the tool.

Gdk.DeviceTool.props.hardware_id
Name:

hardware-id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The hardware ID of the tool.

Gdk.DeviceTool.props.serial
Name:

serial

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The serial number of the tool.

Gdk.DeviceTool.props.tool_type
Name:

tool-type

Type:

Gdk.DeviceToolType

Default Value:

Gdk.DeviceToolType.UNKNOWN

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The type of the tool.