:right-sidebar: True DeviceTool =================================================================== .. currentmodule:: gi.repository.Gdk .. class:: DeviceTool(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` A physical tool associated to a ``GdkDevice``\. Methods ------- .. rst-class:: interim-class .. class:: DeviceTool :no-index: .. method:: get_axes() -> ~gi.repository.Gdk.AxisFlags Gets the axes of the tool. .. method:: get_hardware_id() -> 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 :obj:`~gi.repository.Gdk.DeviceTool.get_serial`\). This is a more concrete (and device specific) method to identify a ``GdkDeviceTool`` than :obj:`~gi.repository.Gdk.DeviceTool.get_tool_type`\, as a tablet may support multiple devices with the same ``GdkDeviceToolType``\, but different hardware identifiers. .. method:: get_serial() -> 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. .. method:: get_tool_type() -> ~gi.repository.Gdk.DeviceToolType Gets the ``GdkDeviceToolType`` of the tool. Properties ---------- .. rst-class:: interim-class .. class:: DeviceTool :no-index: .. attribute:: props.axes :type: ~gi.repository.Gdk.AxisFlags The type of the None singleton. .. attribute:: props.hardware_id :type: int The type of the None singleton. .. attribute:: props.serial :type: int The type of the None singleton. .. attribute:: props.tool_type :type: ~gi.repository.Gdk.DeviceToolType The type of the None singleton.