wlroots/include/wlr/types/wlr_touch.h

60 lines
1.2 KiB
C
Raw Normal View History

/*
* 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
#ifndef WLR_TYPES_WLR_TOUCH_H
#define WLR_TYPES_WLR_TOUCH_H
#include <stdint.h>
#include <wayland-server-core.h>
struct wlr_touch_impl;
struct wlr_touch {
const struct wlr_touch_impl *impl;
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;
} events;
void *data;
};
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-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-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-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;
};
#endif