Device.getPosition

void getPosition(out gdk.screen.Screen screen, out int x, out int y)

Gets the current location of device. As a slave device coordinates are those of its master pointer, This function may not be called on devices of type gdk.types.DeviceType.Slave, unless there is an ongoing grab on them, see gdk.device.Device.grab.

Parameters

screenlocation to store the #GdkScreen the device is on, or null.
xlocation to store root window X coordinate of device, or null.
ylocation to store root window Y coordinate of device, or null.