1.14 <GdkDeviceTool>

Class: <GdkDeviceTool>

It derives from <GObject>.

A physical tool associated to a <GdkDevice>.

Properties

Property: device-tool:axes self

The axes of the tool.

Its value is a <GdkAxisFlags> (or, to set it, a list of its symbols, or one of them).

It can only be set when the object is made, with #:axes.

Property: device-tool:hardware-id self

The hardware ID of the tool.

Its value is an unsigned 64-bit integer.

It can only be set when the object is made, with #:hardware-id.

Property: device-tool:serial self

The serial number of the tool.

Its value is an unsigned 64-bit integer.

It can only be set when the object is made, with #:serial.

Property: device-tool:tool-type self

The type of the tool.

Its value is a <GdkDeviceToolType> (or, to set it, one of its symbols).

It can only be set when the object is made, with #:tool-type.

Procedures

Method: device-tool:get-axes self ⇒ %return
Method: get-axes self ⇒ %return

Gets the axes of the tool.

self

Passed: a <GdkDeviceTool>.

a <GdkDeviceTool>

%return

Returned: a <GdkAxisFlags>.

the axes of self

Method: device-tool:get-hardware-id self ⇒ %return
Method: get-hardware-id self ⇒ %return

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 device-tool:get-serial).

This is a more concrete (and device specific) method to identify a <GdkDeviceTool> than device-tool:get-tool-type, as a tablet may support multiple devices with the same <GdkDeviceToolType>, but different hardware identifiers.

self

Passed: a <GdkDeviceTool>.

a <GdkDeviceTool>

%return

Returned: an unsigned 64-bit integer.

The hardware identifier of this tool.

Method: device-tool:get-serial self ⇒ %return
Method: get-serial self ⇒ %return

Gets the serial number of this tool.

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

self

Passed: a <GdkDeviceTool>.

a <GdkDeviceTool>

%return

Returned: an unsigned 64-bit integer.

The serial ID for this tool

Method: device-tool:get-tool-type self ⇒ %return
Method: get-tool-type self ⇒ %return

Gets the <GdkDeviceToolType> of the tool.

self

Passed: a <GdkDeviceTool>.

a <GdkDeviceTool>

%return

Returned: a <GdkDeviceToolType>.

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.