diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-13 08:29:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 08:29:42 -0400 |
commit | 43fb40e949c6b0a7492935d358695fdc6ad593a9 (patch) | |
tree | 17ae6de010260083c08b5e97439e391033848255 /backend/libinput/touch.c | |
parent | 79cd34b0c63513e3e660a389ac3fd5a228bacd0e (diff) | |
parent | 5c82d2f5c361d9ad6ed3a120cb3f5e1005c4a9e7 (diff) |
Merge pull request #79 from martinetd/libinput_renaming
Libinput renaming
Diffstat (limited to 'backend/libinput/touch.c')
-rw-r--r-- | backend/libinput/touch.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c index f6eeb8d3..5d990d3c 100644 --- a/backend/libinput/touch.c +++ b/backend/libinput/touch.c @@ -8,16 +8,16 @@ #include "backend/libinput.h" struct wlr_touch *wlr_libinput_touch_create( - struct libinput_device *device) { - assert(device); + struct libinput_device *libinput_dev) { + assert(libinput_dev); return wlr_touch_create(NULL, NULL); } void handle_touch_down(struct libinput_event *event, - struct libinput_device *device) { - struct wlr_input_device *dev = - get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, device); - if (!dev) { + struct libinput_device *libinput_dev) { + struct wlr_input_device *wlr_dev = + get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev); + if (!wlr_dev) { wlr_log(L_DEBUG, "Got a touch event for a device with no touch?"); return; } @@ -29,15 +29,15 @@ void handle_touch_down(struct libinput_event *event, wlr_event.slot = libinput_event_touch_get_slot(tevent); wlr_event.x_mm = libinput_event_touch_get_x(tevent); wlr_event.y_mm = libinput_event_touch_get_y(tevent); - libinput_device_get_size(device, &wlr_event.width_mm, &wlr_event.height_mm); - wl_signal_emit(&dev->touch->events.down, &wlr_event); + libinput_device_get_size(libinput_dev, &wlr_event.width_mm, &wlr_event.height_mm); + wl_signal_emit(&wlr_dev->touch->events.down, &wlr_event); } void handle_touch_up(struct libinput_event *event, - struct libinput_device *device) { - struct wlr_input_device *dev = - get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, device); - if (!dev) { + struct libinput_device *libinput_dev) { + struct wlr_input_device *wlr_dev = + get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev); + if (!wlr_dev) { wlr_log(L_DEBUG, "Got a touch event for a device with no touch?"); return; } @@ -47,14 +47,14 @@ void handle_touch_up(struct libinput_event *event, wlr_event.time_sec = libinput_event_touch_get_time(tevent); wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent); wlr_event.slot = libinput_event_touch_get_slot(tevent); - wl_signal_emit(&dev->touch->events.up, &wlr_event); + wl_signal_emit(&wlr_dev->touch->events.up, &wlr_event); } void handle_touch_motion(struct libinput_event *event, - struct libinput_device *device) { - struct wlr_input_device *dev = - get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, device); - if (!dev) { + struct libinput_device *libinput_dev) { + struct wlr_input_device *wlr_dev = + get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev); + if (!wlr_dev) { wlr_log(L_DEBUG, "Got a touch event for a device with no touch?"); return; } @@ -66,15 +66,15 @@ void handle_touch_motion(struct libinput_event *event, wlr_event.slot = libinput_event_touch_get_slot(tevent); wlr_event.x_mm = libinput_event_touch_get_x(tevent); wlr_event.y_mm = libinput_event_touch_get_y(tevent); - libinput_device_get_size(device, &wlr_event.width_mm, &wlr_event.height_mm); - wl_signal_emit(&dev->touch->events.motion, &wlr_event); + libinput_device_get_size(libinput_dev, &wlr_event.width_mm, &wlr_event.height_mm); + wl_signal_emit(&wlr_dev->touch->events.motion, &wlr_event); } void handle_touch_cancel(struct libinput_event *event, - struct libinput_device *device) { - struct wlr_input_device *dev = - get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, device); - if (!dev) { + struct libinput_device *libinput_dev) { + struct wlr_input_device *wlr_dev = + get_appropriate_device(WLR_INPUT_DEVICE_TOUCH, libinput_dev); + if (!wlr_dev) { wlr_log(L_DEBUG, "Got a touch event for a device with no touch?"); return; } @@ -84,5 +84,5 @@ void handle_touch_cancel(struct libinput_event *event, wlr_event.time_sec = libinput_event_touch_get_time(tevent); wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent); wlr_event.slot = libinput_event_touch_get_slot(tevent); - wl_signal_emit(&dev->touch->events.cancel, &wlr_event); + wl_signal_emit(&wlr_dev->touch->events.cancel, &wlr_event); } |