diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 1 | ||||
-rw-r--r-- | include/sway/config.h | 9 | ||||
-rw-r--r-- | include/sway/input/tablet.h | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index f549626b..964b3661 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h @@ -264,6 +264,7 @@ sway_cmd input_cmd_scroll_button; sway_cmd input_cmd_scroll_method; sway_cmd input_cmd_tap; sway_cmd input_cmd_tap_button_map; +sway_cmd input_cmd_tool_mode; sway_cmd input_cmd_xkb_capslock; sway_cmd input_cmd_xkb_file; sway_cmd input_cmd_xkb_layout; diff --git a/include/sway/config.h b/include/sway/config.h index ee1852d4..473f723b 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -6,11 +6,13 @@ #include <time.h> #include <wlr/interfaces/wlr_switch.h> #include <wlr/types/wlr_box.h> +#include <wlr/types/wlr_tablet_tool.h> #include <xkbcommon/xkbcommon.h> #include "../include/config.h" #include "list.h" #include "swaynag.h" #include "tree/container.h" +#include "sway/input/tablet.h" #include "sway/tree/root.h" #include "wlr-layer-shell-unstable-v1-protocol.h" @@ -116,6 +118,11 @@ enum input_config_mapped_to { MAPPED_TO_REGION, }; +struct input_config_tool { + enum wlr_tablet_tool_type type; + enum sway_tablet_tool_mode mode; +}; + /** * options for input devices */ @@ -160,6 +167,8 @@ struct input_config { char *mapped_to_output; struct wlr_box *mapped_to_region; + list_t *tools; + bool capturable; struct wlr_box region; }; diff --git a/include/sway/input/tablet.h b/include/sway/input/tablet.h index f30e232a..d7e4c242 100644 --- a/include/sway/input/tablet.h +++ b/include/sway/input/tablet.h @@ -11,11 +11,17 @@ struct sway_tablet { struct wlr_tablet_v2_tablet *tablet_v2; }; +enum sway_tablet_tool_mode { + SWAY_TABLET_TOOL_MODE_ABSOLUTE, + SWAY_TABLET_TOOL_MODE_RELATIVE, +}; + struct sway_tablet_tool { struct sway_seat *seat; struct sway_tablet *tablet; struct wlr_tablet_v2_tablet_tool *tablet_v2_tool; + enum sway_tablet_tool_mode mode; double tilt_x, tilt_y; struct wl_listener set_cursor; |