wlroots-hyprland/include/wlr/types/wlr_touch.h

59 lines
1.0 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 {
struct wl_signal down;
struct wl_signal up;
struct wl_signal motion;
struct wl_signal cancel;
} events;
void *data;
};
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-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-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-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;
};
#endif