diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-02-28 11:57:35 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-03-02 18:18:05 +0000 |
commit | d60cdad3ea1fed18bbda542b42d3fd7283c88909 (patch) | |
tree | f8da507ced35028ce12eea1e64a4d8a47a9087f5 /include/backend/libinput.h | |
parent | 5eefda1ffe16bdacd3445259937cfed119409e22 (diff) |
backend/libinput: rework pointer interface
The wlr_libinput_input_device now owns its wlr_pointer, instead of creating
a new wlr_libinput_input_device for it
Diffstat (limited to 'include/backend/libinput.h')
-rw-r--r-- | include/backend/libinput.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/include/backend/libinput.h b/include/backend/libinput.h index 1e1ac8c5..bcb36a71 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -35,6 +35,7 @@ struct wlr_libinput_input_device { struct libinput_device *handle; struct wlr_keyboard keyboard; + struct wlr_pointer pointer; struct wl_list link; }; @@ -61,32 +62,32 @@ void init_device_keyboard(struct wlr_libinput_input_device *dev); struct wlr_libinput_input_device *device_from_keyboard(struct wlr_keyboard *kb); void handle_keyboard_key(struct libinput_event *event, struct wlr_keyboard *kb); -struct wlr_pointer *create_libinput_pointer( - struct libinput_device *device); +void init_device_pointer(struct wlr_libinput_input_device *dev); +struct wlr_libinput_input_device *device_from_pointer(struct wlr_pointer *kb); void handle_pointer_motion(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_motion_abs(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_button(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_axis(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_swipe_begin(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_swipe_update(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_swipe_end(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_pinch_begin(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_pinch_update(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_pinch_end(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_hold_begin(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); void handle_pointer_hold_end(struct libinput_event *event, - struct libinput_device *device); + struct wlr_pointer *pointer); struct wlr_switch *create_libinput_switch( struct libinput_device *device); |