1
0
Fork 0

evdev: Add clutter_evdev_warp_pointer

https://bugzilla.gnome.org/show_bug.cgi?id=731536
This commit is contained in:
Jasper St. Pierre 2014-05-27 14:03:09 -04:00
parent 31749cfa47
commit 4cdcbcb2b1
2 changed files with 33 additions and 0 deletions

View file

@ -1984,3 +1984,30 @@ clutter_evdev_remove_filter (ClutterEvdevFilterFunc func,
tmp_list = tmp_list->next;
}
}
/**
* clutter_evdev_warp_pointer:
* @pointer_device: the pointer device to warp
* @time: the timestamp for the warp event
* @x: the new X position of the pointer
* @y: the new Y position of the pointer
*
* Warps the pointer to a new location. Technically, this is
* processed the same way as an absolute motion event from
* libinput: it simply generates an absolute motion event that
* will be processed on the next iteration of the mainloop.
*
* The intended use for this is for display servers that need
* to warp cursor the cursor to a new location.
*
* Since: 1.20
* Stability: unstable
*/
void
clutter_evdev_warp_pointer (ClutterInputDevice *pointer_device,
guint32 time_,
int x,
int y)
{
notify_absolute_motion (pointer_device, time_, x, y);
}

View file

@ -119,6 +119,12 @@ struct libinput_device * clutter_evdev_input_device_get_libinput_device (Clutter
CLUTTER_AVAILABLE_IN_1_20
gint32 clutter_evdev_event_sequence_get_slot (const ClutterEventSequence *sequence);
CLUTTER_AVAILABLE_IN_1_20
void clutter_evdev_warp_pointer (ClutterInputDevice *pointer_device,
guint32 time_,
int x,
int y);
G_END_DECLS
#endif /* __CLUTTER_EVDEV_H__ */