1
0
Fork 0
mirror of https://github.com/rfc2822/GfxTablet synced 2025-10-03 17:49:17 +02:00
GfxTablet/driver-uinput/protocol.h
Richard Hirner 5f1d8f29d8 * driver, app: new protocol
* new protocol specification that allows versioning (version 1)

* App: refactoring, version: 1.1
2013-02-05 04:04:40 +01:00

29 lines
501 B
C

#define GFXTABLET_PORT 40118
#define PROTOCOL_VERSION 1
#pragma pack(push)
#pragma pack(1)
#define EVENT_TYPE_MOTION 0
#define EVENT_TYPE_BUTTON 1
struct event_packet
{
char signature[9];
unsigned short version;
char type; /* EVENT_TYPE_... */
struct { /* required */
short x, y;
short pressure;
};
struct { /* only required for EVENT_TYPE_BUTTON */
char button; /* number of button, beginning with 1 */
char down; /* 1 = button down, 0 = button up */
};
};
#pragma pack(pop)