Method

GdkDeviceget_window_at_position

since: 3.0

Declaration [src]

GdkWindow*
gdk_device_get_window_at_position (
  GdkDevice* device,
  gint* win_x,
  gint* win_y
)

Description [src]

Obtains the window underneath device, returning the location of the device in win_x and win_y. Returns NULL if the window tree under device is not known to GDK (for example, belongs to another application).

As a slave device coordinates are those of its master pointer, This function may not be called on devices of type GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them, see gdk_device_grab().

Available since: 3.0

Parameters

win_x

Type: gint*

Return location for the X coordinate of the device location, relative to the window origin, or NULL.

The argument will be set by the function.
The argument can be NULL.
win_y

Type: gint*

Return location for the Y coordinate of the device location, relative to the window origin, or NULL.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: GdkWindow

The GdkWindow under the device position, or NULL.

The returned data is owned by the instance.
The return value can be NULL.