2017-09-23 10:26:01 +02:00
|
|
|
#ifndef WLR_TYPES_WLR_INPUT_DEVICE_H
|
|
|
|
#define WLR_TYPES_WLR_INPUT_DEVICE_H
|
2017-06-20 00:41:02 +02:00
|
|
|
|
|
|
|
enum wlr_button_state {
|
|
|
|
WLR_BUTTON_RELEASED,
|
|
|
|
WLR_BUTTON_PRESSED,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum wlr_input_device_type {
|
|
|
|
WLR_INPUT_DEVICE_KEYBOARD,
|
|
|
|
WLR_INPUT_DEVICE_POINTER,
|
|
|
|
WLR_INPUT_DEVICE_TOUCH,
|
|
|
|
WLR_INPUT_DEVICE_TABLET_TOOL,
|
|
|
|
WLR_INPUT_DEVICE_TABLET_PAD
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Note: these are circular dependencies */
|
|
|
|
#include <wlr/types/wlr_keyboard.h>
|
|
|
|
#include <wlr/types/wlr_pointer.h>
|
|
|
|
#include <wlr/types/wlr_touch.h>
|
|
|
|
#include <wlr/types/wlr_tablet_tool.h>
|
|
|
|
#include <wlr/types/wlr_tablet_pad.h>
|
|
|
|
|
|
|
|
struct wlr_input_device_impl;
|
|
|
|
|
|
|
|
struct wlr_input_device {
|
|
|
|
struct wlr_input_device_impl *impl;
|
|
|
|
|
|
|
|
enum wlr_input_device_type type;
|
|
|
|
int vendor, product;
|
|
|
|
char *name;
|
|
|
|
|
|
|
|
/* wlr_input_device.type determines which of these is valid */
|
|
|
|
union {
|
|
|
|
void *_device;
|
|
|
|
struct wlr_keyboard *keyboard;
|
|
|
|
struct wlr_pointer *pointer;
|
|
|
|
struct wlr_touch *touch;
|
|
|
|
struct wlr_tablet_tool *tablet_tool;
|
|
|
|
struct wlr_tablet_pad *tablet_pad;
|
|
|
|
};
|
2017-08-11 20:23:53 +02:00
|
|
|
|
2017-08-28 16:29:53 +02:00
|
|
|
struct {
|
|
|
|
struct wl_signal destroy;
|
|
|
|
} events;
|
|
|
|
|
2017-08-11 20:23:53 +02:00
|
|
|
void *data;
|
2017-06-20 00:41:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|