diff options
author | Markus Ongyerth <ongy@ongy.net> | 2018-05-04 11:46:32 +0200 |
---|---|---|
committer | Markus Ongyerth <ongy@ongy.net> | 2018-07-14 09:40:39 +0200 |
commit | 5c7a37f30922d973e176b0eec29bb5fddf241eee (patch) | |
tree | 73f90d316f4aa5c509ff5dca69851964dd9761e6 /include/wlr | |
parent | 391eef6ea9acfd12856970548cb75dbef83dc702 (diff) |
Add tool buttons
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_tablet_v2.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_tablet_v2.h b/include/wlr/types/wlr_tablet_v2.h index a07a0177..12995308 100644 --- a/include/wlr/types/wlr_tablet_v2.h +++ b/include/wlr/types/wlr_tablet_v2.h @@ -7,6 +7,9 @@ #include "tablet-unstable-v2-protocol.h" +/* This can probably be even lower,the tools don't have a lot of buttons */ +#define WLR_TABLEt_V2_TOOL_BUTTONS_CAP 16 + struct wlr_tablet_client_v2; struct wlr_tablet_tool_client_v2; struct wlr_tablet_pad_client_v2; @@ -43,6 +46,10 @@ struct wlr_tablet_v2_tablet_tool { struct wlr_surface *focused_surface; struct wl_listener surface_destroy; struct wl_listener client_destroy; + + uint32_t button_serial; + size_t num_buttons; + uint32_t pressed_buttons[WLR_TABLEt_V2_TOOL_BUTTONS_CAP]; }; struct wlr_tablet_v2_tablet_pad { @@ -94,6 +101,10 @@ void wlr_send_tablet_v2_tablet_tool_wheel( void wlr_send_tablet_v2_tablet_tool_proximity_out( struct wlr_tablet_v2_tablet_tool *tool); +uint32_t wlr_send_tablet_v2_tablet_tool_button( + struct wlr_tablet_v2_tablet_tool *tool, uint32_t button, + enum zwp_tablet_pad_v2_button_state state); + uint32_t wlr_send_tablet_v2_tablet_pad_enter( struct wlr_tablet_v2_tablet_pad *pad, struct wlr_tablet_v2_tablet *tablet, |