evdev: Add clutter_evdev_warp_pointer
https://bugzilla.gnome.org/show_bug.cgi?id=731536
This commit is contained in:
parent
31749cfa47
commit
4cdcbcb2b1
@ -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);
|
||||
}
|
||||
|
@ -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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user