2018-07-13 12:40:56 +00:00
|
|
|
/*
|
|
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
|
|
* future consistency of this API.
|
|
|
|
*/
|
|
|
|
#ifndef WLR_USE_UNSTABLE
|
|
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
|
|
#endif
|
|
|
|
|
2017-09-23 08:26:01 +00:00
|
|
|
#ifndef WLR_TYPES_WLR_TOUCH_H
|
|
|
|
#define WLR_TYPES_WLR_TOUCH_H
|
|
|
|
|
2017-06-19 22:41:02 +00:00
|
|
|
#include <stdint.h>
|
2019-07-27 08:53:54 +00:00
|
|
|
#include <wayland-server-core.h>
|
2017-06-19 22:41:02 +00:00
|
|
|
|
|
|
|
struct wlr_touch_impl;
|
|
|
|
|
|
|
|
struct wlr_touch {
|
2019-07-15 20:54:39 +00:00
|
|
|
const struct wlr_touch_impl *impl;
|
2017-06-19 22:41:02 +00:00
|
|
|
|
|
|
|
struct {
|
2021-06-30 09:24:08 +00:00
|
|
|
struct wl_signal down; // struct wlr_event_touch_down
|
|
|
|
struct wl_signal up; // struct wlr_event_touch_up
|
|
|
|
struct wl_signal motion; // struct wlr_event_touch_motion
|
|
|
|
struct wl_signal cancel; // struct wlr_event_touch_cancel
|
2021-06-30 09:38:57 +00:00
|
|
|
struct wl_signal frame;
|
2017-06-19 22:41:02 +00:00
|
|
|
} events;
|
2017-08-11 18:23:53 +00:00
|
|
|
|
|
|
|
void *data;
|
2017-06-19 22:41:02 +00:00
|
|
|
};
|
|
|
|
|
2017-06-21 18:07:09 +00:00
|
|
|
struct wlr_event_touch_down {
|
2017-08-27 15:44:55 +00:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 10:40:06 +00:00
|
|
|
uint32_t time_msec;
|
2017-11-16 22:53:52 +00:00
|
|
|
int32_t touch_id;
|
2018-03-28 15:04:40 +00:00
|
|
|
// From 0..1
|
|
|
|
double x, y;
|
2017-06-19 22:41:02 +00:00
|
|
|
};
|
|
|
|
|
2017-06-21 18:07:09 +00:00
|
|
|
struct wlr_event_touch_up {
|
2017-08-27 15:44:55 +00:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 10:40:06 +00:00
|
|
|
uint32_t time_msec;
|
2017-11-16 22:53:52 +00:00
|
|
|
int32_t touch_id;
|
2017-06-19 22:41:02 +00:00
|
|
|
};
|
|
|
|
|
2017-06-21 18:07:09 +00:00
|
|
|
struct wlr_event_touch_motion {
|
2017-08-27 15:44:55 +00:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 10:40:06 +00:00
|
|
|
uint32_t time_msec;
|
2017-11-16 22:53:52 +00:00
|
|
|
int32_t touch_id;
|
2018-03-28 15:04:40 +00:00
|
|
|
// From 0..1
|
|
|
|
double x, y;
|
2017-06-19 22:41:02 +00:00
|
|
|
};
|
|
|
|
|
2017-06-21 18:07:09 +00:00
|
|
|
struct wlr_event_touch_cancel {
|
2017-08-27 15:44:55 +00:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 10:40:06 +00:00
|
|
|
uint32_t time_msec;
|
2017-11-16 22:53:52 +00:00
|
|
|
int32_t touch_id;
|
2017-06-19 22:41:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|