### Method

# Gdk.Surface.get_device_position

#### Declaration [src]

    gboolean
    gdk_surface_get_device_position (
      GdkSurface* surface,
      GdkDevice* device,
      double* x,
      double* y,
      GdkModifierType* mask
    )

#### Description [src]

Obtains the current device position and modifier state.

The position is given in coordinates relative to the upper left corner of `surface`.

#### Parameters

`device` | `GdkDevice`
| pointer `GdkDevice` to query to
| Ownership is not transferred to the callee
`x` | `double*`
| return locatio for the X coordinate of `device`, or `NULL`
| Direction: out
| Ownership of the data is transferred to the callee
`y` | `double*`
| return location for the Y coordinate of `device`, or `NULL`
| Direction: out
| Ownership of the data is transferred to the callee
`mask` | `GdkModifierType`
| return location for the modifier mask, or `NULL`
| Direction: out
| Ownership of the data is transferred to the callee

#### Return value

Returns: `gboolean`
`TRUE` if the device is over the surface