diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-01-31 16:04:09 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-05-01 09:38:24 +1000 |
commit | 63e5372190606c5c124eafbc4cac753f59bb9f69 (patch) | |
tree | 2a49153177ea77cd4bb04e0a6ebfe62be202af0e /src/libinput.h | |
parent | 59eb10e593213403c301a5ce3fbd0a22b6e52efd (diff) |
Add libinput_device_touch_get_touch_count()
This makes it possible for callers to detect whether a touch device is
single or multitouch (or even check for things like dual-touch vs real
multi-touch) and adjust the interface accordingly.
Note that this is for touch devices only, not touchpads that are just pointer
devices.
https://bugs.freedesktop.org/show_bug.cgi?id=104867
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/libinput.h')
-rw-r--r-- | src/libinput.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libinput.h b/src/libinput.h index f1a0a2a6..828cf6b4 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -3716,6 +3716,20 @@ libinput_device_keyboard_has_key(struct libinput_device *device, /** * @ingroup device * + * Check how many touches a @ref LIBINPUT_DEVICE_CAP_TOUCH device supports + * simultaneously. + * + * @param device A current input device + * + * @return The number of simultaneous touches or 0 if unknown, -1 + * on error. + */ +int +libinput_device_touch_get_touch_count(struct libinput_device *device); + +/** + * @ingroup device + * * Check if a @ref LIBINPUT_DEVICE_CAP_SWITCH device has a switch of the * given type. * |