Method

GdkSurfaceget_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

Type: GdkDevice

Pointer GdkDevice to query to.

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

Type: double*

Return location for the X coordinate of device.

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

Type: double*

Return location for the Y coordinate of device.

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

Type: GdkModifierType

Return location for the modifier mask.

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: gboolean

TRUE if the device is over the surface.