Class DeviceTool

All Implemented Interfaces:
PointerInterface

public class DeviceTool extends Object
A physical tool associated to a `GdkDevice`.

https://docs.gtk.org/gdk4/class.DeviceTool.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getAxes

      public int getAxes()
      Gets the axes of the tool.
      Returns:
      the axes of @tool
    • getHardwareId

      public long getHardwareId()
      Gets the hardware ID of this tool, or 0 if it's not known.

      When non-zero, the identificator 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 identificators.
      Returns:
      The hardware identificator of this tool.
    • getSerial

      public long getSerial()
      Gets the serial number of this tool.

      This value can be used to identify a physical tool
      (eg. a tablet pen) across program executions.
      Returns:
      The serial ID for this tool
    • getToolType

      public int getToolType()
      Gets the `GdkDeviceToolType` of the tool.
      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.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()