mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-31 01:50:10 +01:00
ei: add missing ei_seat_has_capability implementation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
014c0ce081
commit
ceaabd0fd5
1 changed files with 14 additions and 0 deletions
|
|
@ -124,6 +124,20 @@ ei_seat_find_device(struct ei_seat *seat, uint32_t deviceid)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
_public_ bool
|
||||
ei_seat_has_capability(struct ei_seat *seat,
|
||||
enum ei_device_capability cap)
|
||||
{
|
||||
switch (cap) {
|
||||
case EI_DEVICE_CAP_POINTER:
|
||||
case EI_DEVICE_CAP_POINTER_ABSOLUTE:
|
||||
case EI_DEVICE_CAP_KEYBOARD:
|
||||
case EI_DEVICE_CAP_TOUCH:
|
||||
return flag_is_set(seat->capabilities_mask, cap);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
_public_ void
|
||||
ei_seat_drop_capability(struct ei_seat *seat,
|
||||
enum ei_device_capability cap)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue