From 3f24f8a1bee10fb3aadf8c57ca107fe5aaa7cffa Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 14 Jun 2017 14:50:09 -0400 Subject: Flesh out touch events and add demo --- include/backend/libinput.h | 2 -- include/wlr/types.h | 29 ++++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/backend/libinput.h b/include/backend/libinput.h index dd24fbb0..2427ae5c 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -56,7 +56,5 @@ void handle_touch_motion(struct libinput_event *event, struct libinput_device *device); void handle_touch_cancel(struct libinput_event *event, struct libinput_device *device); -void handle_touch_frame(struct libinput_event *event, - struct libinput_device *device); #endif diff --git a/include/wlr/types.h b/include/wlr/types.h index b4d69ccb..4763013a 100644 --- a/include/wlr/types.h +++ b/include/wlr/types.h @@ -146,10 +146,37 @@ struct wlr_touch { struct wl_signal up; struct wl_signal motion; struct wl_signal cancel; - struct wl_signal frame; } events; }; +struct wlr_touch_down { + uint32_t time_sec; + uint64_t time_usec; + int32_t slot; + double x_mm, y_mm; + double width_mm, height_mm; +}; + +struct wlr_touch_up { + uint32_t time_sec; + uint64_t time_usec; + int32_t slot; +}; + +struct wlr_touch_motion { + uint32_t time_sec; + uint64_t time_usec; + int32_t slot; + double x_mm, y_mm; + double width_mm, height_mm; +}; + +struct wlr_touch_cancel { + uint32_t time_sec; + uint64_t time_usec; + int32_t slot; +}; + // TODO: tablet & tablet tool // TODO: gestures // TODO: switch -- cgit v1.2.3