mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-21 23:50:45 +01:00
Add LIBINPUT_DEVICE_CAP_TABLET libinput_device_capability value
This capability flag would be enabled when events are driven through a stylus, ie. on a tablet. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
812ea542e7
commit
53affdc9bb
3 changed files with 6 additions and 2 deletions
|
|
@ -840,6 +840,8 @@ evdev_device_has_capability(struct evdev_device *device,
|
|||
return !!(device->seat_caps & EVDEV_DEVICE_KEYBOARD);
|
||||
case LIBINPUT_DEVICE_CAP_TOUCH:
|
||||
return !!(device->seat_caps & EVDEV_DEVICE_TOUCH);
|
||||
case LIBINPUT_DEVICE_CAP_TABLET:
|
||||
return !!(device->seat_caps & EVDEV_DEVICE_TABLET);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ enum evdev_event_type {
|
|||
enum evdev_device_seat_capability {
|
||||
EVDEV_DEVICE_POINTER = (1 << 0),
|
||||
EVDEV_DEVICE_KEYBOARD = (1 << 1),
|
||||
EVDEV_DEVICE_TOUCH = (1 << 2)
|
||||
EVDEV_DEVICE_TOUCH = (1 << 2),
|
||||
EVDEV_DEVICE_TABLET = (1 << 3),
|
||||
};
|
||||
|
||||
struct mt_slot {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,8 @@ enum libinput_log_priority {
|
|||
enum libinput_device_capability {
|
||||
LIBINPUT_DEVICE_CAP_KEYBOARD = 0,
|
||||
LIBINPUT_DEVICE_CAP_POINTER = 1,
|
||||
LIBINPUT_DEVICE_CAP_TOUCH = 2
|
||||
LIBINPUT_DEVICE_CAP_TOUCH = 2,
|
||||
LIBINPUT_DEVICE_CAP_TABLET = 3
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue