2018-07-13 14:40:56 +02: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 10:26:01 +02:00
|
|
|
#ifndef WLR_TYPES_WLR_TOUCH_H
|
|
|
|
#define WLR_TYPES_WLR_TOUCH_H
|
|
|
|
|
2017-06-20 00:41:02 +02:00
|
|
|
#include <stdint.h>
|
2018-02-12 21:29:23 +01:00
|
|
|
#include <wayland-server.h>
|
2017-06-20 00:41:02 +02:00
|
|
|
|
|
|
|
struct wlr_touch_impl;
|
|
|
|
|
|
|
|
struct wlr_touch {
|
2019-07-15 22:54:39 +02:00
|
|
|
const struct wlr_touch_impl *impl;
|
2017-06-20 00:41:02 +02:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal down;
|
|
|
|
struct wl_signal up;
|
|
|
|
struct wl_signal motion;
|
|
|
|
struct wl_signal cancel;
|
|
|
|
} events;
|
2017-08-11 20:23:53 +02:00
|
|
|
|
|
|
|
void *data;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
2017-06-21 20:07:09 +02:00
|
|
|
struct wlr_event_touch_down {
|
2017-08-27 17:44:55 +02:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 11:40:06 +01:00
|
|
|
uint32_t time_msec;
|
2017-11-16 23:53:52 +01:00
|
|
|
int32_t touch_id;
|
2018-03-28 17:04:40 +02:00
|
|
|
// From 0..1
|
|
|
|
double x, y;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
2017-06-21 20:07:09 +02:00
|
|
|
struct wlr_event_touch_up {
|
2017-08-27 17:44:55 +02:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 11:40:06 +01:00
|
|
|
uint32_t time_msec;
|
2017-11-16 23:53:52 +01:00
|
|
|
int32_t touch_id;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
2017-06-21 20:07:09 +02:00
|
|
|
struct wlr_event_touch_motion {
|
2017-08-27 17:44:55 +02:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 11:40:06 +01:00
|
|
|
uint32_t time_msec;
|
2017-11-16 23:53:52 +01:00
|
|
|
int32_t touch_id;
|
2018-03-28 17:04:40 +02:00
|
|
|
// From 0..1
|
|
|
|
double x, y;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
2017-06-21 20:07:09 +02:00
|
|
|
struct wlr_event_touch_cancel {
|
2017-08-27 17:44:55 +02:00
|
|
|
struct wlr_input_device *device;
|
2017-10-30 11:40:06 +01:00
|
|
|
uint32_t time_msec;
|
2017-11-16 23:53:52 +01:00
|
|
|
int32_t touch_id;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|