aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 5b95369..23ee003 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -54,6 +54,7 @@
#endif
#define EVDEV_MAXBUTTONS 32
+#define EVDEV_MAXQUEUE 32
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
#define HAVE_PROPERTIES 1
@@ -87,6 +88,16 @@ typedef struct {
int traveled_distance;
} WheelAxis, *WheelAxisPtr;
+/* Event queue used to defer keyboard/button events until EV_SYN time. */
+typedef struct {
+ enum {
+ EV_QUEUE_KEY, /* xf86PostKeyboardEvent() */
+ EV_QUEUE_BTN, /* xf86PostButtonEvent() */
+ } type;
+ int key; /* May be either a key code or button number. */
+ int val; /* State of the key/button; pressed or released. */
+} EventQueueRec, *EventQueuePtr;
+
typedef struct {
const char *device;
int grabDevice; /* grab the event device? */
@@ -103,6 +114,9 @@ typedef struct {
BOOL invert_x;
BOOL invert_y;
+ int delta[REL_CNT];
+ unsigned int abs, rel;
+
/* XKB stuff has to be per-device rather than per-driver */
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
XkbComponentNamesRec xkbnames;
@@ -159,6 +173,10 @@ typedef struct {
/* minor/major number */
dev_t min_maj;
+
+ /* Event queue used to defer keyboard/button events until EV_SYN time. */
+ int num_queue;
+ EventQueueRec queue[EVDEV_MAXQUEUE];
} EvdevRec, *EvdevPtr;
unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);