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

51 lines
822 B
C
Raw Normal View History

#ifndef WLR_TYPES_WLR_TOUCH_H
#define WLR_TYPES_WLR_TOUCH_H
#include <stdint.h>
2018-02-12 21:29:23 +01:00
#include <wayland-server.h>
struct wlr_touch_impl;
struct wlr_touch {
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