#ifndef DEVICES_INPUTEVENT_H
#define DEVICES_INPUTEVENT_H
#ifndef DEVICES_TIMER_H
#include "devices/timer.h"
#endif
#define IECLASS_NULL 0x00L
#define IECLASS_RAWKEY 0x01L
#define IECLASS_RAWMOUSE 0x02L
#define IECLASS_EVENT 0x03L
#define IECLASS_POINTERPOS 0x04L
#define IECLASS_TIMER 0x06L
#define IECLASS_GADGETDOWN 0x07L
#define IECLASS_GADGETUP 0x08L
#define IECLASS_REQUESTER 0x09L
#define IECLASS_MENULIST 0x0AL
#define IECLASS_CLOSEWINDOW 0x0BL
#define IECLASS_SIZEWINDOW 0x0CL
#define IECLASS_REFRESHWINDOW 0x0DL
#define IECLASS_NEWPREFS 0x0EL
#define IECLASS_DISKREMOVED 0x0FL
#define IECLASS_DISKINSERTED 0x10L
#define IECLASS_ACTIVEWINDOW 0x11L
#define IECLASS_INACTIVEWINDOW 0x12L
#define IECLASS_MAX 0x12L
#define IECODE_UP_PREFIX 0x80L
#define IECODE_KEY_CODE_FIRST 0x00L
#define IECODE_KEY_CODE_LAST 0x77L
#define IECODE_COMM_CODE_FIRST 0x78L
#define IECODE_COMM_CODE_LAST 0x7FL
#define IECODE_C0_FIRST 0x00L
#define IECODE_C0_LAST 0x1FL
#define IECODE_ASCII_FIRST 0x20L
#define IECODE_ASCII_LAST 0x7EL
#define IECODE_ASCII_DEL 0x7FL
#define IECODE_C1_FIRST 0x80L
#define IECODE_C1_LAST 0x9FL
#define IECODE_LATIN1_FIRST 0xA0L
#define IECODE_LATIN1_LAST 0xFFL
#define IECODE_LBUTTON 0x68L
#define IECODE_RBUTTON 0x69L
#define IECODE_MBUTTON 0x6AL
#define IECODE_NOBUTTON 0xFFL
#define IECODE_NEWACTIVE 0x01L
#define IECODE_REQSET 0x01L
#define IECODE_REQCLEAR 0x00L
#define IEQUALIFIER_LSHIFT 0x0001L
#define IEQUALIFIER_RSHIFT 0x0002L
#define IEQUALIFIER_CAPSLOCK 0x0004L
#define IEQUALIFIER_CONTROL 0x0008L
#define IEQUALIFIER_LALT 0x0010L
#define IEQUALIFIER_RALT 0x0020L
#define IEQUALIFIER_LCOMMAND 0x0040L
#define IEQUALIFIER_RCOMMAND 0x0080L
#define IEQUALIFIER_NUMERICPAD 0x0100L
#define IEQUALIFIER_REPEAT 0x0200L
#define IEQUALIFIER_INTERRUPT 0x0400L
#define IEQUALIFIER_MULTIBROADCAST 0x0800L
#define IEQUALIFIER_MIDBUTTON 0x1000L
#define IEQUALIFIER_RBUTTON 0x2000L
#define IEQUALIFIER_LEFTBUTTON 0x4000L
#define IEQUALIFIER_RELATIVEMOUSE 0x8000L
#define IEQUALIFIERB_LSHIFT 0L
#define IEQUALIFIERB_RSHIFT 1L
#define IEQUALIFIERB_CAPSLOCK 2L
#define IEQUALIFIERB_CONTROL 3L
#define IEQUALIFIERB_LALT 4L
#define IEQUALIFIERB_RALT 5L
#define IEQUALIFIERB_LCOMMAND 6L
#define IEQUALIFIERB_RCOMMAND 7L
#define IEQUALIFIERB_NUMERICPAD 8L
#define IEQUALIFIERB_REPEAT 9L
#define IEQUALIFIERB_INTERRUPT 10L
#define IEQUALIFIERB_MULTIBROADCAST 11L
#define IEQUALIFIERB_MIDBUTTON 12L
#define IEQUALIFIERB_RBUTTON 13L
#define IEQUALIFIERB_LEFTBUTTON 14L
#define IEQUALIFIERB_RELATIVEMOUSE 15L
struct InputEvent {
struct InputEvent *ie_NextEvent;
UBYTE ie_Class;
UBYTE ie_SubClass;
UWORD ie_Code;
UWORD ie_Qualifier;
union {
struct {
WORD ie_x;
WORD ie_y;
} ie_xy;
APTR ie_addr;
} ie_position;
struct timeval ie_TimeStamp;
};
#define ie_X ie_position.ie_xy.ie_x
#define ie_Y ie_position.ie_xy.ie_y
#define ie_EventAddress ie_position.ie_addr
#endif
