added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / compiler / include / devices / inputevent.h
blob4cd542c401d1c630266f2b5c5877a68a9abd5ac4
1 #ifndef DEVICES_INPUTEVENT_H
2 #define DEVICES_INPUTEVENT_H
4 /*
5 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Input events
9 Lang: english
12 #ifndef UTILITY_HOOKS_H
13 # include <utility/hooks.h>
14 #endif
15 #ifndef UTILITY_TAGITEM_H
16 # include <utility/tagitem.h>
17 #endif
18 #ifndef DEVICES_TIMER_H
19 # include <devices/timer.h>
20 #endif
22 struct InputEvent
24 struct InputEvent * ie_NextEvent;
26 UBYTE ie_Class; /* see below for definitions */
27 UBYTE ie_SubClass; /* see below for definitions */
28 UWORD ie_Code; /* see below for definitions */
29 UWORD ie_Qualifier; /* see below for definitions */
31 union
33 struct
35 WORD ie_x;
36 WORD ie_y;
37 } ie_xy;
39 APTR ie_addr;
41 struct
43 UBYTE ie_prev1DownCode;
44 UBYTE ie_prev1DownQual;
45 UBYTE ie_prev2DownCode;
46 UBYTE ie_prev2DownQual;
47 } ie_dead;
48 } ie_position;
50 struct timeval ie_TimeStamp;
52 #define ie_X ie_position.ie_xy.ie_x
53 #define ie_Y ie_position.ie_xy.ie_y
54 #define ie_EventAddress ie_position.ie_addr
55 #define ie_Prev1DownCode ie_position.ie_dead.ie_prev1DownCode
56 #define ie_Prev1DownQual ie_position.ie_dead.ie_prev1DownQual
57 #define ie_Prev2DownCode ie_position.ie_dead.ie_prev2DownCode
58 #define ie_Prev2DownQual ie_position.ie_dead.ie_prev2DownQual
60 /* InputEvent Classes */
61 #define IECLASS_NULL 0
62 #define IECLASS_RAWKEY 1
63 #define IECLASS_RAWMOUSE 2
64 #define IECLASS_EVENT 3
65 #define IECLASS_POINTERPOS 4
66 #define IECLASS_TIMER 6
67 #define IECLASS_GADGETDOWN 7
68 #define IECLASS_GADGETUP 8
69 #define IECLASS_REQUESTER 9
70 #define IECLASS_MENULIST 10
71 #define IECLASS_CLOSEWINDOW 11
72 #define IECLASS_SIZEWINDOW 12
73 #define IECLASS_REFRESHWINDOW 13
74 #define IECLASS_NEWPREFS 14
75 #define IECLASS_DISKREMOVED 15
76 #define IECLASS_DISKINSERTED 16
77 #define IECLASS_ACTIVEWINDOW 17
78 #define IECLASS_INACTIVEWINDOW 18
79 #define IECLASS_NEWPOINTERPOS 19 /* (IEPointerPixel *) */
80 #define IECLASS_MENUHELP 20
81 #define IECLASS_CHANGEWINDOW 21
83 /* NewMouse standard */
84 #define IECLASS_NEWMOUSE 22
86 #define IECLASS_MAX 22
88 /* InputEvent SubClasses */
89 #define IESUBCLASS_COMPATIBLE 0
90 #define IESUBCLASS_PIXEL 1 /* (IEPointerPixel *) */
91 #define IESUBCLASS_TABLET 2
92 #define IESUBCLASS_NEWTABLET 3
94 /* InputEvent Codes */
95 /* Used by IECLASS_RAWKEY */
96 #define IECODE_UP_PREFIX 0x80
97 #define IECODE_KEY_CODE_FIRST 0x00
98 #define IECODE_KEY_CODE_LAST 0x77
99 #define IECODE_COMM_CODE_FIRST 0x78
100 #define IECODE_COMM_CODE_LAST 0x7F
101 /* Used by IECLASS_ANSI */
102 #define IECODE_CO_FIRST 0x00
103 #define IECODE_CO_LAST 0x1F
104 #define IECODE_ASCII_FIRST 0x20
105 #define IECODE_ASCII_LAST 0x7E
106 #define IECODE_ASCII_DEL 0x7F
107 #define IECODE_C1_FIRST 0x80
108 #define IECODE_C1_LAST 0x9F
109 #define IECODE_LATIN1_FIRST 0xA0
110 #define IECODE_LATIN1_LAST 0xFF
111 /* Used by IECODE_RAWMOUSE */
112 #define IECODE_LBUTTON 0x68
113 #define IECODE_RBUTTON 0x69
114 #define IECODE_MBUTTON 0x6A
115 #define IECODE_NOBUTTON 0xFF
116 /* Used by IECLASS_REQUESTER */
117 #define IECODE_REQCLEAR 0x00
118 #define IECODE_REQSET 0x01
119 /* Used by IECLASS_EVENT */
120 #define IECODE_NEWACTIVE 0x01
121 #define IECODE_NEWSIZE 0x02
122 #define IECODE_REFRESH 0x03
124 /* InputEvent Qualifiers */
125 #define IEQUALIFIERB_LSHIFT 0
126 #define IEQUALIFIER_LSHIFT (1<<0)
127 #define IEQUALIFIERB_RSHIFT 1
128 #define IEQUALIFIER_RSHIFT (1<<1)
129 #define IEQUALIFIERB_CAPSLOCK 2
130 #define IEQUALIFIER_CAPSLOCK (1<<2)
131 #define IEQUALIFIERB_CONTROL 3
132 #define IEQUALIFIER_CONTROL (1<<3)
133 #define IEQUALIFIERB_LALT 4
134 #define IEQUALIFIER_LALT (1<<4)
135 #define IEQUALIFIERB_RALT 5
136 #define IEQUALIFIER_RALT (1<<5)
137 #define IEQUALIFIERB_LCOMMAND 6
138 #define IEQUALIFIER_LCOMMAND (1<<6)
139 #define IEQUALIFIERB_RCOMMAND 7
140 #define IEQUALIFIER_RCOMMAND (1<<7)
141 #define IEQUALIFIERB_NUMERICPAD 8
142 #define IEQUALIFIER_NUMERICPAD (1<<8)
143 #define IEQUALIFIERB_REPEAT 9
144 #define IEQUALIFIER_REPEAT (1<<9)
145 #define IEQUALIFIERB_INTERRUPT 10
146 #define IEQUALIFIER_INTERRUPT (1<<10)
147 #define IEQUALIFIERB_MULTIBROADCAST 11
148 #define IEQUALIFIER_MULTIBROADCAST (1<<11)
149 #define IEQUALIFIERB_MIDBUTTON 12
150 #define IEQUALIFIER_MIDBUTTON (1<<12)
151 #define IEQUALIFIERB_RBUTTON 13
152 #define IEQUALIFIER_RBUTTON (1<<13)
153 #define IEQUALIFIERB_LEFTBUTTON 14
154 #define IEQUALIFIER_LEFTBUTTON (1<<14)
155 #define IEQUALIFIERB_RELATIVEMOUSE 15
156 #define IEQUALIFIER_RELATIVEMOUSE (1<<15)
158 /* Pointed to by IECLASS_NEWPOINTERPOS and IESUBCLASS_PIXEL */
159 struct IEPointerPixel
161 struct Screen * iepp_Screen;
162 struct
164 WORD X;
165 WORD Y;
166 } iepp_Position;
169 /* Used for IECLASS_NEWPOINTERPOS and IESUBCLASS_TABLET
170 Pointed to by ie_EventAddress */
171 struct IEPointerTablet
173 struct
175 UWORD X;
176 UWORD Y;
177 } iept_Range;
178 struct
180 UWORD X;
181 UWORD Y;
182 } iept_Value;
183 WORD iept_Pressure;
186 /* Used for IECLASS_NEWPOINTERPOS with IESUBCLASS_NEWTABLET
187 Pointed to by ie_EventAddress */
188 struct IENewTablet
190 struct Hook * ient_CallBack;
192 UWORD ient_ScaledX;
193 UWORD ient_ScaledY;
194 UWORD ient_ScaledXFraction;
195 UWORD ient_ScaledYFraction;
196 ULONG ient_TabletX;
197 ULONG ient_TabletY;
198 ULONG ient_RangeX;
199 ULONG ient_RangeY;
201 struct TagItem * ient_TagList;
204 #endif /* DEVICES_INPUTEVENT_H */