Method

GdkWindowget_device_position

since: 3.0

Declaration [src]

GdkWindow*
gdk_window_get_device_position (
  GdkWindow* window,
  GdkDevice* device,
  gint* x,
  gint* 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 window.

Use gdk_window_get_device_position_double() if you need subpixel precision.

Available since: 3.0

Parameters

device

Type: GdkDevice

Pointer GdkDevice to query to.

The data is owned by the caller of the method.
x

Type: gint*

Return location for the X coordinate of device, or NULL.

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

Type: gint*

Return location for the Y coordinate of device, or NULL.

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

Type: GdkModifierType

Return location for the modifier mask, or NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.

Return value

Type: GdkWindow

The window underneath device (as with gdk_device_get_window_at_position()), or NULL if the window is not known to GDK.

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