mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-04 23:40:14 +01:00
Don't use the `seat' concept on device capability enum
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
parent
bd4db1c2a2
commit
79d77d4b8b
3 changed files with 21 additions and 21 deletions
24
src/evdev.c
24
src/evdev.c
|
|
@ -586,21 +586,21 @@ evdev_configure_device(struct evdev_device *device)
|
|||
if ((device->caps & (EVDEV_MOTION_ABS | EVDEV_MOTION_REL)) &&
|
||||
(device->caps & EVDEV_BUTTON)) {
|
||||
device->base.device_interface->register_capability(
|
||||
LIBINPUT_SEAT_CAP_POINTER,
|
||||
LIBINPUT_DEVICE_CAP_POINTER,
|
||||
device->base.device_interface_data);
|
||||
device->seat_caps |= EVDEV_SEAT_POINTER;
|
||||
device->seat_caps |= EVDEV_DEVICE_POINTER;
|
||||
}
|
||||
if ((device->caps & EVDEV_KEYBOARD)) {
|
||||
device->base.device_interface->register_capability(
|
||||
LIBINPUT_SEAT_CAP_KEYBOARD,
|
||||
LIBINPUT_DEVICE_CAP_KEYBOARD,
|
||||
device->base.device_interface_data);
|
||||
device->seat_caps |= EVDEV_SEAT_KEYBOARD;
|
||||
device->seat_caps |= EVDEV_DEVICE_KEYBOARD;
|
||||
}
|
||||
if ((device->caps & EVDEV_TOUCH)) {
|
||||
device->base.device_interface->register_capability(
|
||||
LIBINPUT_SEAT_CAP_TOUCH,
|
||||
LIBINPUT_DEVICE_CAP_TOUCH,
|
||||
device->base.device_interface_data);
|
||||
device->seat_caps |= EVDEV_SEAT_TOUCH;
|
||||
device->seat_caps |= EVDEV_DEVICE_TOUCH;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -678,19 +678,19 @@ evdev_device_destroy(struct evdev_device *device)
|
|||
{
|
||||
struct evdev_dispatch *dispatch;
|
||||
|
||||
if (device->seat_caps & EVDEV_SEAT_POINTER) {
|
||||
if (device->seat_caps & EVDEV_DEVICE_POINTER) {
|
||||
device->base.device_interface->unregister_capability(
|
||||
LIBINPUT_SEAT_CAP_POINTER,
|
||||
LIBINPUT_DEVICE_CAP_POINTER,
|
||||
device->base.device_interface_data);
|
||||
}
|
||||
if (device->seat_caps & EVDEV_SEAT_KEYBOARD) {
|
||||
if (device->seat_caps & EVDEV_DEVICE_KEYBOARD) {
|
||||
device->base.device_interface->unregister_capability(
|
||||
LIBINPUT_SEAT_CAP_KEYBOARD,
|
||||
LIBINPUT_DEVICE_CAP_KEYBOARD,
|
||||
device->base.device_interface_data);
|
||||
}
|
||||
if (device->seat_caps & EVDEV_SEAT_TOUCH) {
|
||||
if (device->seat_caps & EVDEV_DEVICE_TOUCH) {
|
||||
device->base.device_interface->unregister_capability(
|
||||
LIBINPUT_SEAT_CAP_TOUCH,
|
||||
LIBINPUT_DEVICE_CAP_TOUCH,
|
||||
device->base.device_interface_data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ enum evdev_device_capability {
|
|||
};
|
||||
|
||||
enum evdev_device_seat_capability {
|
||||
EVDEV_SEAT_POINTER = (1 << 0),
|
||||
EVDEV_SEAT_KEYBOARD = (1 << 1),
|
||||
EVDEV_SEAT_TOUCH = (1 << 2)
|
||||
EVDEV_DEVICE_POINTER = (1 << 0),
|
||||
EVDEV_DEVICE_KEYBOARD = (1 << 1),
|
||||
EVDEV_DEVICE_TOUCH = (1 << 2)
|
||||
};
|
||||
|
||||
struct evdev_device {
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@
|
|||
|
||||
typedef int32_t li_fixed_t;
|
||||
|
||||
enum libinput_seat_capability {
|
||||
LIBINPUT_SEAT_CAP_KEYBOARD = 0,
|
||||
LIBINPUT_SEAT_CAP_POINTER = 1,
|
||||
LIBINPUT_SEAT_CAP_TOUCH = 2,
|
||||
enum libinput_device_capability {
|
||||
LIBINPUT_DEVICE_CAP_KEYBOARD = 0,
|
||||
LIBINPUT_DEVICE_CAP_POINTER = 1,
|
||||
LIBINPUT_DEVICE_CAP_TOUCH = 2,
|
||||
};
|
||||
|
||||
enum libinput_keyboard_key_state {
|
||||
|
|
@ -69,9 +69,9 @@ typedef void (*libinput_fd_callback)(int fd, void *data);
|
|||
|
||||
struct libinput_device_interface {
|
||||
/* */
|
||||
void (*register_capability)(enum libinput_seat_capability capability,
|
||||
void (*register_capability)(enum libinput_device_capability capability,
|
||||
void *data);
|
||||
void (*unregister_capability)(enum libinput_seat_capability capability,
|
||||
void (*unregister_capability)(enum libinput_device_capability capability,
|
||||
void *data);
|
||||
|
||||
/* */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue