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_TABLET_PAD_H
|
|
|
|
#define WLR_TYPES_WLR_TABLET_PAD_H
|
|
|
|
|
2017-06-20 00:41:02 +02:00
|
|
|
#include <stdint.h>
|
2019-07-27 10:53:54 +02:00
|
|
|
#include <wayland-server-core.h>
|
2018-02-12 21:29:23 +01:00
|
|
|
#include <wlr/types/wlr_input_device.h>
|
2017-06-20 00:41:02 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* NOTE: the wlr tablet pad implementation does not currently support tablets
|
|
|
|
* with more than one mode. I don't own any such hardware so I cannot test it
|
|
|
|
* and it is too complicated to make a meaningful implementation of blindly.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct wlr_tablet_pad_impl;
|
|
|
|
|
|
|
|
struct wlr_tablet_pad {
|
2022-02-01 16:25:28 +01:00
|
|
|
struct wlr_input_device base;
|
|
|
|
|
2017-06-20 00:41:02 +02:00
|
|
|
struct wlr_tablet_pad_impl *impl;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal button;
|
|
|
|
struct wl_signal ring;
|
|
|
|
struct wl_signal strip;
|
2018-04-26 12:31:25 +02:00
|
|
|
struct wl_signal attach_tablet; //struct wlr_tablet_tool
|
2017-06-20 00:41:02 +02:00
|
|
|
} events;
|
2017-08-11 20:23:53 +02:00
|
|
|
|
2018-04-23 08:55:49 +02:00
|
|
|
size_t button_count;
|
|
|
|
size_t ring_count;
|
|
|
|
size_t strip_count;
|
|
|
|
|
|
|
|
struct wl_list groups; // wlr_tablet_pad_group::link
|
2021-07-01 10:09:35 +02:00
|
|
|
struct wl_array paths; // char *
|
2018-04-23 08:55:49 +02:00
|
|
|
|
2017-08-11 20:23:53 +02:00
|
|
|
void *data;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
2018-04-24 08:10:45 +02:00
|
|
|
struct wlr_tablet_pad_group {
|
2018-04-23 08:55:49 +02:00
|
|
|
struct wl_list link;
|
|
|
|
|
|
|
|
size_t button_count;
|
|
|
|
unsigned int *buttons;
|
|
|
|
|
|
|
|
size_t strip_count;
|
|
|
|
unsigned int *strips;
|
|
|
|
|
|
|
|
size_t ring_count;
|
|
|
|
unsigned int *rings;
|
|
|
|
|
|
|
|
unsigned int mode_count;
|
|
|
|
};
|
|
|
|
|
2017-06-21 20:07:09 +02:00
|
|
|
struct wlr_event_tablet_pad_button {
|
2017-10-30 11:40:06 +01:00
|
|
|
uint32_t time_msec;
|
2017-06-20 00:41:02 +02:00
|
|
|
uint32_t button;
|
|
|
|
enum wlr_button_state state;
|
2018-03-08 02:57:55 +01:00
|
|
|
unsigned int mode;
|
2018-04-26 12:31:25 +02:00
|
|
|
unsigned int group;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum wlr_tablet_pad_ring_source {
|
|
|
|
WLR_TABLET_PAD_RING_SOURCE_UNKNOWN,
|
|
|
|
WLR_TABLET_PAD_RING_SOURCE_FINGER,
|
|
|
|
};
|
|
|
|
|
2017-06-21 20:07:09 +02:00
|
|
|
struct wlr_event_tablet_pad_ring {
|
2017-10-30 11:40:06 +01:00
|
|
|
uint32_t time_msec;
|
2017-06-20 00:41:02 +02:00
|
|
|
enum wlr_tablet_pad_ring_source source;
|
|
|
|
uint32_t ring;
|
|
|
|
double position;
|
2018-03-08 02:57:55 +01:00
|
|
|
unsigned int mode;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum wlr_tablet_pad_strip_source {
|
|
|
|
WLR_TABLET_PAD_STRIP_SOURCE_UNKNOWN,
|
|
|
|
WLR_TABLET_PAD_STRIP_SOURCE_FINGER,
|
|
|
|
};
|
|
|
|
|
2017-06-21 20:07:09 +02:00
|
|
|
struct wlr_event_tablet_pad_strip {
|
2017-10-30 11:40:06 +01:00
|
|
|
uint32_t time_msec;
|
2017-06-20 00:41:02 +02:00
|
|
|
enum wlr_tablet_pad_strip_source source;
|
|
|
|
uint32_t strip;
|
|
|
|
double position;
|
2018-03-08 02:57:55 +01:00
|
|
|
unsigned int mode;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|