Flesh out touch events and add demo

This commit is contained in:
Drew DeVault 2017-06-14 14:50:09 -04:00
parent d6905f86cb
commit 3f24f8a1be
9 changed files with 356 additions and 8 deletions

View file

@ -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

View file

@ -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