input: add basic support for touchscreen input

Closes #517
This commit is contained in:
CismonX 2023-07-05 00:19:21 +08:00 committed by Daniel Eklöf
parent 4a73828911
commit d2fcb5343f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
12 changed files with 364 additions and 22 deletions

View file

@ -47,6 +47,14 @@ enum data_offer_mime_type {
DATA_OFFER_MIME_TEXT_UTF8_STRING,
};
enum touch_state {
TOUCH_STATE_INHIBITED = -1,
TOUCH_STATE_IDLE,
TOUCH_STATE_HELD,
TOUCH_STATE_DRAGGING,
TOUCH_STATE_SCROLLING,
};
struct wayl_surface {
struct wl_surface *surf;
#if defined(HAVE_FRACTIONAL_SCALE)
@ -165,6 +173,17 @@ struct seat {
bool xcursor_pending;
} pointer;
/* Touch state */
struct wl_touch *wl_touch;
struct {
enum touch_state state;
uint32_t serial;
uint32_t time;
struct wl_surface *surface;
int32_t id;
} touch;
struct {
int x;
int y;