diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2021-01-20 09:05:45 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2023-03-31 12:10:26 +0000 |
commit | 03596a9d065ccb38059c9b782e1d4cd4eaf5a59e (patch) | |
tree | 3d2487ce8b56f15ffdc063c7f816322fff4ad540 /include | |
parent | f95c2986dde8011a09db9e4233875df4fab39196 (diff) | |
download | weston-03596a9d065ccb38059c9b782e1d4cd4eaf5a59e.tar.gz |
libweston: Add initial tablet support to weston
Introduces three new structs, weston_tablet and weston_tablet_tool for the
respective devices, with the respective information as it's used on the protocol.
And weston_tablet_tool_id to track the tools of a tablet.
Note that tools are independent of tablets, many tools can be used across
multiple tablets.
The nesting on the protocol level requires a global tablet manager, a tablet
seat nested into weston_seat. The list of tablets and tools are also part of
the weston_seat.
Most functions are stubs except for the actual tablet and tablet tool
creation and removal.
This is based on patches from Peter Hutterer <peter.hutterer@who-t.net> and
Bastian Farkas <bfarkas@de.adit-jv.com>.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/libweston/libweston.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index d872f7b4..1aa146e1 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -842,6 +842,33 @@ struct weston_touch { struct wl_list timestamps_list; }; +struct weston_tablet_tool { + struct weston_seat *seat; + uint32_t type; + + struct wl_list resource_list; + + struct wl_list link; + + uint64_t serial; + uint64_t hwid; + uint32_t capabilities; +}; + +struct weston_tablet { + struct weston_seat *seat; + + struct wl_list resource_list; + struct wl_list tool_list; + + struct wl_list link; + + char *name; + uint32_t vid; + uint32_t pid; + const char *path; +}; + struct weston_coord_global weston_pointer_motion_to_abs(struct weston_pointer *pointer, struct weston_pointer_motion_event *event); @@ -1026,6 +1053,10 @@ struct weston_seat { struct input_method *input_method; char *seat_name; + + struct wl_list tablet_list; + struct wl_list tablet_tool_list; + struct wl_list tablet_seat_resource_list; }; enum { @@ -1307,6 +1338,9 @@ struct weston_compositor { void *user_data; void (*exit)(struct weston_compositor *c); + struct wl_global *tablet_manager; + struct wl_list tablet_manager_resource_list; + /* Whether to let the compositor run without any input device. */ bool require_input; |