Add touch input

Fixes #1
This commit is contained in:
Jente Hidskes 2019-01-03 22:29:08 +01:00
parent f47a76c9be
commit ce755c8591
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA
2 changed files with 179 additions and 18 deletions

17
seat.h
View file

@ -20,6 +20,7 @@ struct cg_seat {
struct wl_list keyboards;
struct wl_list pointers;
struct wl_list touch;
struct wl_listener new_input;
struct wlr_cursor *cursor;
@ -28,6 +29,14 @@ struct cg_seat {
struct wl_listener cursor_motion_absolute;
struct wl_listener cursor_button;
struct wl_listener cursor_axis;
int32_t touch_id;
double touch_x;
double touch_y;
struct wl_listener touch_down;
struct wl_listener touch_up;
struct wl_listener touch_motion;
struct wl_listener request_set_cursor;
};
@ -49,6 +58,14 @@ struct cg_pointer {
struct wl_listener destroy;
};
struct cg_touch {
struct wl_list link; // seat::touch
struct cg_seat *seat;
struct wlr_input_device *device;
struct wl_listener destroy;
};
struct cg_seat *cg_seat_create(struct cg_server *server);
void cg_seat_destroy(struct cg_seat *seat);
struct cg_view *seat_get_focus(struct cg_seat *seat);