### Method

# Gdk Event get_device_tool

#### Declaration [src]

    GdkDeviceTool*
    gdk_event_get_device_tool (
      GdkEvent* event
    )

#### Description [src]

Returns a `GdkDeviceTool` representing the tool that caused the event.

If the was not generated by a device that supports different tools (such as a tablet), this function will return `NULL`.

Note: the `GdkDeviceTool` will be constant during the application lifetime, if settings must be stored persistently across runs, see gdk_device_tool_get_serial().

#### Return value

Returns: | `GdkDeviceTool`
| The current device tool.
| The data is owned by the instance.
| The return value can be `NULL`.