added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / compiler / include / libraries / lowlevel.h
blobaec7916dac20665037000acb1e77e04f612d088b
1 #ifndef LIBRARIES_LOWLEVEL_H
2 #define LIBRARIES_LOWLEVEL_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Definitions for lowlevel.library
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
16 #ifndef UTILITY_TAGITEM_H
17 # include <utility/tagitem.h>
18 #endif
21 /********************* Keyboard Section *********************/
23 /* KeyQuery structure for use with QueryKeys() */
24 struct KeyQuery
26 UWORD kq_KeyCode;
27 BOOL kq_Pressed;
30 /* Bits in the return value of GetKey() */
31 #define LLKB_LSHIFT 16
32 #define LLKB_RSHIFT 17
33 #define LLKB_CAPSLOCK 18
34 #define LLKB_CONTROL 19
35 #define LLKB_LALT 20
36 #define LLKB_RALT 21
37 #define LLKB_LAMIGA 22
38 #define LLKB_RAMIGA 23
40 #define LLKF_LSHIFT (1<<LLKB_LSHIFT)
41 #define LLKF_RSHIFT (1<<LLKB_RSHIFT)
42 #define LLKF_CAPSLOCK (1<<LLKB_CAPSLOCK)
43 #define LLKF_CONTROL (1<<LLKB_CONTROL)
44 #define LLKF_LALT (1<<LLKB_LALT)
45 #define LLKF_RALT (1<<LLKB_RALT)
46 #define LLKF_LAMIGA (1<<LLKB_LAMIGA)
47 #define LLKF_RAMIGA (1<<LLKB_RAMIGA)
50 /********************* JoyPort Section *********************/
52 /* Tags for SetJoyPortAttrs() */
53 #define SJA_Dummy (TAG_USER+0xC00100)
54 #define SJA_Type (SJA_Dummy+1) /* Force type to Mouse, Joy, Game Controler */
55 #define SJA_Reinitialize (SJA_Dummy+2) /* Free potgo bits and reset to autosense */
57 /* Controller types for SJA_Type Tag */
58 #define SJA_TYPE_AUTOSENSE 0
59 #define SJA_TYPE_GAMECTLR 1
60 #define SJA_TYPE_MOUSE 2
61 #define SJA_TYPE_JOYSTK 3
63 /* Return value definitions for ReadJoyPort() */
65 /* Port types */
66 #define JP_TYPE_NOTAVAIL (00<<28) /* Port data unavailable */
67 #define JP_TYPE_GAMECTLR (01<<28) /* Port has Game Controller */
68 #define JP_TYPE_MOUSE (02<<28) /* Port has Mouse */
69 #define JP_TYPE_JOYSTK (03<<28) /* Port has Joystick */
70 #define JP_TYPE_UNKNOWN (04<<28) /* Port has Unknown Device */
71 #define JP_TYPE_MASK (15<<28) /* Controller Type */
73 /* Button types, valid for all types except JP_TYPE_NOTAVAIL */
74 #define JPB_BUTTON_PLAY 17 /* Grey - Play/Pause; Middle Mouse */
75 #define JPB_BUTTON_REVERSE 18 /* Charcoal - Reverse */
76 #define JPB_BUTTON_FORWARD 19 /* Charcoal - Forward */
77 #define JPB_BUTTON_GREEN 20 /* Green - Shuffle */
78 #define JPB_BUTTON_YELLOW 21 /* Yellow - Repeat */
79 #define JPB_BUTTON_RED 22 /* Red - Select; Left Mouse; Joystick Fire */
80 #define JPB_BUTTON_BLUE 23 /* Blue - Stop; Right Mouse */
82 #define JPF_BUTTON_PLAY (1<<JPB_BUTTON_PLAY)
83 #define JPF_BUTTON_REVERSE (1<<JPB_BUTTON_REVERSE)
84 #define JPF_BUTTON_FORWARD (1<<JPB_BUTTON_FORWARD)
85 #define JPF_BUTTON_GREEN (1<<JPB_BUTTON_GREEN)
86 #define JPF_BUTTON_YELLOW (1<<JPB_BUTTON_YELLOW)
87 #define JPF_BUTTON_RED (1<<JPB_BUTTON_RED)
88 #define JPF_BUTTON_BLUE (1<<JPB_BUTTON_BLUE)
90 #define JP_BUTTON_MASK (JPF_BUTTON_PLAY|JPF_BUTTON_REVERSE|JPF_BUTTON_FORWARD|JPF_BUTTON_GREEN|JPF_BUTTON_YELLOW|JPF_BUTTON_RED|JPF_BUTTON_BLUE)
92 /* Direction types, valid for JP_TYPE_GAMECTLR and JP_TYPE_JOYSTK */
93 #define JPB_JOY_RIGHT 0
94 #define JPB_JOY_LEFT 1
95 #define JPB_JOY_DOWN 2
96 #define JPB_JOY_UP 3
98 #define JPF_JOY_RIGHT (1<<JPB_JOY_RIGHT)
99 #define JPF_JOY_LEFT (1<<JPB_JOY_LEFT)
100 #define JPF_JOY_DOWN (1<<JPB_JOY_DOWN)
101 #define JPF_JOY_UP (1<<JPB_JOY_UP)
103 #define JP_DIRECTION_MASK (JPF_JOY_RIGHT|JPF_JOY_LEFT|JPF_JOY_DOWN|JPF_JOY_UP)
105 /* Mouse position reports, valid for JP_TYPE_MOUSE */
106 #define JP_MHORZ_MASK (255<<0) /* Horizontal position */
107 #define JP_MVERT_MASK (255<<8) /* Vertical position */
108 #define JP_MOUSE_MASK (JP_MHORZ_MASK|JP_MVERT_MASK)
111 /********************* SystemControl Section *********************/
113 /* Tags for SystemControl() */
114 #define SCON_Dummy (TAG_USER+0x00C00000)
115 #define SCON_TakeOverSys (SCON_Dummy+0)
116 #define SCON_KillReq (SCON_Dummy+1)
117 #define SCON_CDReboot (SCON_Dummy+2)
118 #define SCON_StopInput (SCON_Dummy+3)
119 #define SCON_AddCreateKeys (SCON_Dummy+4)
120 #define SCON_RemCreateKeys (SCON_Dummy+5)
122 /* Reboot control values for use with SCON_CDReboot Tag */
123 #define CDReboot_Off 0
124 #define CDReboot_On 1
125 #define CDReboot_Default 2
128 /********************* Rawkey Section *********************/
130 /* Rawkey codes returned when using SCON_AddCreateKeys with SystemControl() */
132 #define RAWKEY_PORT0_BUTTON_BLUE 0x072
133 #define RAWKEY_PORT0_BUTTON_PLAY 0x073
134 #define RAWKEY_PORT0_BUTTON_REVERSE 0x074
135 #define RAWKEY_PORT0_BUTTON_FORWARD 0x075
136 #define RAWKEY_PORT0_BUTTON_GREEN 0x076
137 #define RAWKEY_PORT0_BUTTON_YELLOW 0x077
138 #define RAWKEY_PORT0_BUTTON_RED 0x078
139 #define RAWKEY_PORT0_JOY_UP 0x079
140 #define RAWKEY_PORT0_JOY_DOWN 0x07A
141 #define RAWKEY_PORT0_JOY_RIGHT 0x07B
142 #define RAWKEY_PORT0_JOY_LEFT 0x07C
144 #define RAWKEY_PORT1_BUTTON_BLUE 0x172
145 #define RAWKEY_PORT1_BUTTON_BLUE 0x172
146 #define RAWKEY_PORT1_BUTTON_PLAY 0x173
147 #define RAWKEY_PORT1_BUTTON_REVERSE 0x174
148 #define RAWKEY_PORT1_BUTTON_FORWARD 0x175
149 #define RAWKEY_PORT1_BUTTON_GREEN 0x176
150 #define RAWKEY_PORT1_BUTTON_YELLOW 0x177
151 #define RAWKEY_PORT1_BUTTON_RED 0x178
152 #define RAWKEY_PORT1_JOY_UP 0x179
153 #define RAWKEY_PORT1_JOY_DOWN 0x17A
154 #define RAWKEY_PORT1_JOY_RIGHT 0x17B
155 #define RAWKEY_PORT1_JOY_LEFT 0x17C
157 #define RAWKEY_PORT2_BUTTON_PLAY 0x273
158 #define RAWKEY_PORT2_BUTTON_REVERSE 0x274
159 #define RAWKEY_PORT2_BUTTON_FORWARD 0x275
160 #define RAWKEY_PORT2_BUTTON_GREEN 0x276
161 #define RAWKEY_PORT2_BUTTON_YELLOW 0x277
162 #define RAWKEY_PORT2_BUTTON_RED 0x278
163 #define RAWKEY_PORT2_JOY_UP 0x279
164 #define RAWKEY_PORT2_JOY_DOWN 0x27A
165 #define RAWKEY_PORT2_JOY_RIGHT 0x27B
166 #define RAWKEY_PORT2_JOY_LEFT 0x27C
168 #define RAWKEY_PORT3_BUTTON_BLUE 0x372
169 #define RAWKEY_PORT3_BUTTON_PLAY 0x373
170 #define RAWKEY_PORT3_BUTTON_REVERSE 0x374
171 #define RAWKEY_PORT3_BUTTON_FORWARD 0x375
172 #define RAWKEY_PORT3_BUTTON_GREEN 0x376
173 #define RAWKEY_PORT3_BUTTON_YELLOW 0x377
174 #define RAWKEY_PORT3_BUTTON_RED 0x378
175 #define RAWKEY_PORT3_JOY_UP 0x379
176 #define RAWKEY_PORT3_JOY_DOWN 0x37A
177 #define RAWKEY_PORT3_JOY_RIGHT 0x37B
178 #define RAWKEY_PORT3_JOY_LEFT 0x37C
181 /********************* Language Section *********************/
183 /* Return values for GetLanguageSelection() */
185 #define LANG_UNKNOWN 0
186 #define LANG_AMERICAN 1 /* American English */
187 #define LANG_ENGLISH 2 /* British English */
188 #define LANG_GERMAN 3
189 #define LANG_FRENCH 4
190 #define LANG_SPANISH 5
191 #define LANG_ITALIAN 6
192 #define LANG_PORTUGUESE 7
193 #define LANG_DANISH 8
194 #define LANG_DUTCH 9
195 #define LANG_NORWEGIAN 10
196 #define LANG_FINNISH 11
197 #define LANG_SWEDISH 12
198 #define LANG_JAPANESE 13
199 #define LANG_CHINESE 14
200 #define LANG_ARABIC 15
201 #define LANG_GREEK 16
202 #define LANG_HEBREW 17
203 #define LANG_KOREAN 18
206 #endif /* LIBRARIES_LOWLEVEL_H */