diff options
Diffstat (limited to 'include/sway/input')
-rw-r--r-- | include/sway/input/cursor.h | 6 | ||||
-rw-r--r-- | include/sway/input/keyboard.h | 1 | ||||
-rw-r--r-- | include/sway/input/libinput.h | 2 | ||||
-rw-r--r-- | include/sway/input/seat.h | 39 | ||||
-rw-r--r-- | include/sway/input/switch.h | 1 | ||||
-rw-r--r-- | include/sway/input/tablet.h | 1 | ||||
-rw-r--r-- | include/sway/input/text_input.h | 2 |
7 files changed, 46 insertions, 6 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 7d66e699..8a2898dd 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h @@ -4,7 +4,7 @@ #include <stdint.h> #include <wlr/types/wlr_pointer_constraints_v1.h> #include <wlr/types/wlr_pointer_gestures_v1.h> -#include <wlr/types/wlr_surface.h> +#include <wlr/types/wlr_compositor.h> #include "sway/input/seat.h" #include "config.h" @@ -36,6 +36,8 @@ struct sway_cursor { bool active_confine_requires_warp; struct wlr_pointer_gestures_v1 *pointer_gestures; + struct wl_listener hold_begin; + struct wl_listener hold_end; struct wl_listener pinch_begin; struct wl_listener pinch_update; struct wl_listener pinch_end; @@ -110,7 +112,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor, enum wlr_button_state state); void dispatch_cursor_axis(struct sway_cursor *cursor, - struct wlr_event_pointer_axis *event); + struct wlr_pointer_axis_event *event); void cursor_set_image(struct sway_cursor *cursor, const char *image, struct wl_client *client); diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h index 2c61e5a7..571d9e6f 100644 --- a/include/sway/input/keyboard.h +++ b/include/sway/input/keyboard.h @@ -50,6 +50,7 @@ struct sway_shortcut_state { struct sway_keyboard { struct sway_seat_device *seat_device; + struct wlr_keyboard *wlr; struct xkb_keymap *keymap; xkb_layout_index_t effective_layout; diff --git a/include/sway/input/libinput.h b/include/sway/input/libinput.h index 890d632e..e4b1acc3 100644 --- a/include/sway/input/libinput.h +++ b/include/sway/input/libinput.h @@ -2,7 +2,7 @@ #define _SWAY_INPUT_LIBINPUT_H #include "sway/input/input-manager.h" -void sway_input_configure_libinput_device(struct sway_input_device *device); +bool sway_input_configure_libinput_device(struct sway_input_device *device); void sway_input_reset_libinput_device(struct sway_input_device *device); diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 77c2278d..e3a46872 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h @@ -18,7 +18,23 @@ struct sway_seatop_impl { enum wlr_button_state state); void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec); void (*pointer_axis)(struct sway_seat *seat, - struct wlr_event_pointer_axis *event); + struct wlr_pointer_axis_event *event); + void (*hold_begin)(struct sway_seat *seat, + struct wlr_pointer_hold_begin_event *event); + void (*hold_end)(struct sway_seat *seat, + struct wlr_pointer_hold_end_event *event); + void (*pinch_begin)(struct sway_seat *seat, + struct wlr_pointer_pinch_begin_event *event); + void (*pinch_update)(struct sway_seat *seat, + struct wlr_pointer_pinch_update_event *event); + void (*pinch_end)(struct sway_seat *seat, + struct wlr_pointer_pinch_end_event *event); + void (*swipe_begin)(struct sway_seat *seat, + struct wlr_pointer_swipe_begin_event *event); + void (*swipe_update)(struct sway_seat *seat, + struct wlr_pointer_swipe_update_event *event); + void (*swipe_end)(struct sway_seat *seat, + struct wlr_pointer_swipe_end_event *event); void (*rebase)(struct sway_seat *seat, uint32_t time_msec); void (*tablet_tool_motion)(struct sway_seat *seat, struct sway_tablet_tool *tool, uint32_t time_msec); @@ -274,7 +290,7 @@ void seatop_button(struct sway_seat *seat, uint32_t time_msec, void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec); void seatop_pointer_axis(struct sway_seat *seat, - struct wlr_event_pointer_axis *event); + struct wlr_pointer_axis_event *event); void seatop_tablet_tool_tip(struct sway_seat *seat, struct sway_tablet_tool *tool, uint32_t time_msec, @@ -283,6 +299,25 @@ void seatop_tablet_tool_tip(struct sway_seat *seat, void seatop_tablet_tool_motion(struct sway_seat *seat, struct sway_tablet_tool *tool, uint32_t time_msec); +void seatop_hold_begin(struct sway_seat *seat, + struct wlr_pointer_hold_begin_event *event); +void seatop_hold_end(struct sway_seat *seat, + struct wlr_pointer_hold_end_event *event); + +void seatop_pinch_begin(struct sway_seat *seat, + struct wlr_pointer_pinch_begin_event *event); +void seatop_pinch_update(struct sway_seat *seat, + struct wlr_pointer_pinch_update_event *event); +void seatop_pinch_end(struct sway_seat *seat, + struct wlr_pointer_pinch_end_event *event); + +void seatop_swipe_begin(struct sway_seat *seat, + struct wlr_pointer_swipe_begin_event *event); +void seatop_swipe_update(struct sway_seat *seat, + struct wlr_pointer_swipe_update_event *event); +void seatop_swipe_end(struct sway_seat *seat, + struct wlr_pointer_swipe_end_event *event); + void seatop_rebase(struct sway_seat *seat, uint32_t time_msec); /** diff --git a/include/sway/input/switch.h b/include/sway/input/switch.h index 213b471d..de6787b7 100644 --- a/include/sway/input/switch.h +++ b/include/sway/input/switch.h @@ -5,6 +5,7 @@ struct sway_switch { struct sway_seat_device *seat_device; + struct wlr_switch *wlr; enum wlr_switch_state state; enum wlr_switch_type type; diff --git a/include/sway/input/tablet.h b/include/sway/input/tablet.h index d7e4c242..c0a5aff7 100644 --- a/include/sway/input/tablet.h +++ b/include/sway/input/tablet.h @@ -32,6 +32,7 @@ struct sway_tablet_pad { struct wl_list link; struct sway_seat_device *seat_device; struct sway_tablet *tablet; + struct wlr_tablet_pad *wlr; struct wlr_tablet_v2_tablet_pad *tablet_v2_pad; struct wl_listener attach; diff --git a/include/sway/input/text_input.h b/include/sway/input/text_input.h index 37744266..c70fd935 100644 --- a/include/sway/input/text_input.h +++ b/include/sway/input/text_input.h @@ -3,7 +3,7 @@ #include <wlr/types/wlr_text_input_v3.h> #include <wlr/types/wlr_input_method_v2.h> -#include <wlr/types/wlr_surface.h> +#include <wlr/types/wlr_compositor.h> #include "sway/input/seat.h" /** |