quakeforge/tools/qwaq/event.h
Bill Currie a3ed5926b9 [qwaq] Remove unnecessary fields from mouse events
id and z seem to always be 0.

Ironically, it turns out that the work needed for "int id" and "large"
struct nil init wasn't strictly necessary to get to this point, but
without having done that work, I wouldn't know :)
2020-02-27 21:08:12 +09:00

24 lines
414 B
C

#ifndef __qwaq_event_h
#define __qwaq_event_h
typedef enum {
qe_idle,
qe_key,
qe_mouse,
} qwaq_etype;
// right now, this is just a copy of ncurses MEVENT, but all int
typedef struct qwaq_mevent_s {
int x, y;
int buttons;
} qwaq_mevent_t;
typedef struct qwaq_event_s {
qwaq_etype event_type;
union {
int key;
qwaq_mevent_t mouse;
} e;
} qwaq_event_t;
#endif//__qwaq_event_h