1
0
Fork 0
mirror of https://github.com/rfc2822/GfxTablet synced 2025-10-03 01:29:17 +02:00
GfxTablet/driver-uinput/protocol.h
2014-11-14 03:10:26 +01:00

39 lines
643 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
typedef struct
{
int x;
int y;
unsigned width;
unsigned height;
unsigned long mm_height;
unsigned long mm_width;
} gfx_host_monitor;
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)