Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GdkDeviceTool

[14:7] extends: object

A physical tool associated to a GdkDevice.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GdkDeviceTool (Handle = null)

    Creates a new DeviceTool by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as GObject.

    • @r A GObject object.
  • get_axes ()

    Gets the axes of the tool.

    • @r the axes of @tool.
  • get_hardware_id ()

    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.

    • @r The hardware identifier of this tool..
  • get_serial ()

    Gets the serial number of this tool. This value can be used to identify a physical tool (eg. a tablet pen) across program executions.

    • @r The serial ID for this tool.
  • get_tool_type ()

    Gets the GdkDeviceToolType of the tool.

    • @r 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..

class: GdkDeviceToolMeta

[153:14] static extends: object

Generated metadata helpers for DeviceTool class surfaces.

Methods

  • properties ()

    Returns property metadata for DeviceTool.

    • @r A list.