From 5c82d2f5c361d9ad6ed3a120cb3f5e1005c4a9e7 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sun, 13 Aug 2017 00:50:09 +0200 Subject: libinput backend: massive renaming - 'libinput' (backend's) to libinput_context - 'device' (libinput_device) to libinput_dev - 'dev' (wlr_device) to wlr_dev - 'devices' lists tangling of libinput devices to wlr_devices - 'devices' list of wlr_devices in backend state to wlr_device_lists --- backend/libinput/keyboard.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'backend/libinput/keyboard.c') diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c index f15b6362..b231828d 100644 --- a/backend/libinput/keyboard.c +++ b/backend/libinput/keyboard.c @@ -8,15 +8,15 @@ #include "backend/libinput.h" struct wlr_keyboard_state { - struct libinput_device *device; + struct libinput_device *libinput_dev; }; static void wlr_libinput_keyboard_set_leds(struct wlr_keyboard_state *kbstate, uint32_t leds) { - libinput_device_led_update(kbstate->device, leds); + libinput_device_led_update(kbstate->libinput_dev, leds); } static void wlr_libinput_keyboard_destroy(struct wlr_keyboard_state *kbstate) { - libinput_device_unref(kbstate->device); + libinput_device_unref(kbstate->libinput_dev); free(kbstate); } @@ -26,20 +26,20 @@ struct wlr_keyboard_impl impl = { }; struct wlr_keyboard *wlr_libinput_keyboard_create( - struct libinput_device *device) { - assert(device); + struct libinput_device *libinput_dev) { + assert(libinput_dev); struct wlr_keyboard_state *kbstate = calloc(1, sizeof(struct wlr_keyboard_state)); - kbstate->device = device; - libinput_device_ref(device); - libinput_device_led_update(device, 0); + kbstate->libinput_dev = libinput_dev; + libinput_device_ref(libinput_dev); + libinput_device_led_update(libinput_dev, 0); return wlr_keyboard_create(&impl, kbstate); } void handle_keyboard_key(struct libinput_event *event, - struct libinput_device *device) { - struct wlr_input_device *dev = - get_appropriate_device(WLR_INPUT_DEVICE_KEYBOARD, device); - if (!dev) { + struct libinput_device *libinput_dev) { + struct wlr_input_device *wlr_dev = + get_appropriate_device(WLR_INPUT_DEVICE_KEYBOARD, libinput_dev); + if (!wlr_dev) { wlr_log(L_DEBUG, "Got a keyboard event for a device with no keyboards?"); return; } @@ -59,5 +59,5 @@ void handle_keyboard_key(struct libinput_event *event, wlr_event.state = WLR_KEY_PRESSED; break; } - wl_signal_emit(&dev->keyboard->events.key, &wlr_event); + wl_signal_emit(&wlr_dev->keyboard->events.key, &wlr_event); } -- cgit v1.2.3