diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-10 16:08:14 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-20 15:17:56 +1000 |
commit | 4cc6a96d7171e567a9bd5a10f552bb953077aafb (patch) | |
tree | 332195d0122f66753a046e9736e38bf7b0d80b2d /include/events.h | |
parent | a668d91e28d5a3042a8ce0d087474883b046869a (diff) |
input: add support for RawDeviceEvents.
Diffstat (limited to 'include/events.h')
-rw-r--r-- | include/events.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/events.h b/include/events.h index c6eeae4d4..a289662d4 100644 --- a/include/events.h +++ b/include/events.h @@ -59,6 +59,7 @@ enum { #if XFreeXDGA ET_DGAEvent, #endif + ET_Raw, ET_Internal = 0xFF /* First byte */ } EventType; @@ -171,6 +172,30 @@ typedef struct #endif /** + * Raw event, contains the data as posted by the device. + */ +typedef struct +{ + unsigned char header; /**< Always ET_Internal */ + int type; /**< ET_Raw */ + int length; /**< Length in bytes */ + Time time; /**< Time in ms */ + int subtype; /**< KeyPress, KeyRelease, ButtonPress, + ButtonRelease, MotionNotify */ + int deviceid; /**< Device to post this event for */ + int sourceid; /**< The physical source device */ + union { + uint32_t button; /**< Button number */ + uint32_t key; /**< Key code */ + } detail; + struct { + uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */ + int32_t data[MAX_VALUATORS]; /**< Valuator data */ + int32_t data_raw[MAX_VALUATORS]; /**< Valuator data as posted */ + } valuators; +} RawDeviceEvent; + +/** * Event type used inside the X server for input event * processing. */ @@ -188,6 +213,7 @@ typedef struct #if XFreeXDGA DGAEvent dga; #endif + RawDeviceEvent raw; } u; } InternalEvent; |