1 #ifndef LIBRARIES_LOWLEVEL_H 2 #define LIBRARIES_LOWLEVEL_H 3 4 /* 5 lowlevel.library include 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef EXEC_TYPES_H 11 # include <exec/types.h> 12 #endif 13 14 #ifndef UTILITY_TAGITEM_H 15 # include <utility/tagitem.h> 16 #endif 17 18 #pragma pack(2) 19 20 21 struct KeyQuery 22 { 23 UWORD kq_KeyCode; 24 BOOL kq_Pressed; 25 }; 26 27 28 #define LLKB_LSHIFT 16 29 #define LLKB_RSHIFT 17 30 #define LLKB_CAPSLOCK 18 31 #define LLKB_CONTROL 19 32 #define LLKB_LALT 20 33 #define LLKB_RALT 21 34 #define LLKB_LAMIGA 22 35 #define LLKB_RAMIGA 23 36 37 #define LLKF_LSHIFT (1<<LLKB_LSHIFT) 38 #define LLKF_RSHIFT (1<<LLKB_RSHIFT) 39 #define LLKF_CAPSLOCK (1<<LLKB_CAPSLOCK) 40 #define LLKF_CONTROL (1<<LLKB_CONTROL) 41 #define LLKF_LALT (1<<LLKB_LALT) 42 #define LLKF_RALT (1<<LLKB_RALT) 43 #define LLKF_LAMIGA (1<<LLKB_LAMIGA) 44 #define LLKF_RAMIGA (1<<LLKB_RAMIGA) 45 46 47 #define SJA_Dummy (TAG_USER + 0xC00100) 48 #define SJA_Type (SJA_Dummy + 1) 49 #define SJA_Reinitialize (SJA_Dummy + 2) 50 51 #define SJA_TYPE_AUTOSENSE 0 52 #define SJA_TYPE_GAMECTLR 1 53 #define SJA_TYPE_MOUSE 2 54 #define SJA_TYPE_JOYSTK 3 55 56 57 #define JP_TYPE_NOTAVAIL (00<<28) 58 #define JP_TYPE_GAMECTLR (01<<28) 59 #define JP_TYPE_MOUSE (02<<28) 60 #define JP_TYPE_JOYSTK (03<<28) 61 #define JP_TYPE_UNKNOWN (04<<28) 62 #define JP_TYPE_MASK (15<<28) 63 64 65 #define JPB_BUTTON_BLUE 23 66 #define JPB_BUTTON_RED 22 67 #define JPB_BUTTON_YELLOW 21 68 #define JPB_BUTTON_GREEN 20 69 #define JPB_BUTTON_FORWARD 19 70 #define JPB_BUTTON_REVERSE 18 71 #define JPB_BUTTON_PLAY 17 72 #define JPF_BUTTON_BLUE (1<<JPB_BUTTON_BLUE) 73 #define JPF_BUTTON_RED (1<<JPB_BUTTON_RED) 74 #define JPF_BUTTON_YELLOW (1<<JPB_BUTTON_YELLOW) 75 #define JPF_BUTTON_GREEN (1<<JPB_BUTTON_GREEN) 76 #define JPF_BUTTON_FORWARD (1<<JPB_BUTTON_FORWARD) 77 #define JPF_BUTTON_REVERSE (1<<JPB_BUTTON_REVERSE) 78 #define JPF_BUTTON_PLAY (1<<JPB_BUTTON_PLAY) 79 80 #define JP_BUTTON_MASK (JPF_BUTTON_BLUE|JPF_BUTTON_RED|JPF_BUTTON_YELLOW|JPF_BUTTON_GREEN|JPF_BUTTON_FORWARD|JPF_BUTTON_REVERSE|JPF_BUTTON_PLAY) 81 82 83 #define JPB_JOY_UP 3 84 #define JPB_JOY_DOWN 2 85 #define JPB_JOY_LEFT 1 86 #define JPB_JOY_RIGHT 0 87 #define JPF_JOY_UP (1<<JPB_JOY_UP) 88 #define JPF_JOY_DOWN (1<<JPB_JOY_DOWN) 89 #define JPF_JOY_LEFT (1<<JPB_JOY_LEFT) 90 #define JPF_JOY_RIGHT (1<<JPB_JOY_RIGHT) 91 92 #define JP_DIRECTION_MASK (JPF_JOY_UP|JPF_JOY_DOWN|JPF_JOY_LEFT|JPF_JOY_RIGHT) 93 94 95 #define JP_MHORZ_MASK (255<<0) 96 #define JP_MVERT_MASK (255<<8) 97 #define JP_MOUSE_MASK (JP_MHORZ_MASK|JP_MVERT_MASK) 98 99 100 /*** OBSOLETE ***/ 101 102 #define JPB_BTN1 JPB_BUTTON_BLUE 103 #define JPF_BTN1 JPF_BUTTON_BLUE 104 #define JPB_BTN2 JPB_BUTTON_RED 105 #define JPF_BTN2 JPF_BUTTON_RED 106 #define JPB_BTN3 JPB_BUTTON_YELLOW 107 #define JPF_BTN3 JPF_BUTTON_YELLOW 108 #define JPB_BTN4 JPB_BUTTON_GREEN 109 #define JPF_BTN4 JPF_BUTTON_GREEN 110 #define JPB_BTN5 JPB_BUTTON_FORWARD 111 #define JPF_BTN5 JPF_BUTTON_FORWARD 112 #define JPB_BTN6 JPB_BUTTON_REVERSE 113 #define JPF_BTN6 JPF_BUTTON_REVERSE 114 #define JPB_BTN7 JPB_BUTTON_PLAY 115 #define JPF_BTN7 JPF_BUTTON_PLAY 116 #define JPB_UP JPB_JOY_UP 117 #define JPF_UP JPF_JOY_UP 118 #define JPB_DOWN JPB_JOY_DOWN 119 #define JPF_DOWN JPF_JOY_DOWN 120 #define JPB_LEFT JPB_JOY_LEFT 121 #define JPF_LEFT JPF_JOY_LEFT 122 #define JPB_RIGHT JPB_JOY_RIGHT 123 #define JPF_RIGHT JPF_JOY_RIGHT 124 125 126 #define SCON_Dummy (TAG_USER + 0x00C00000) 127 #define SCON_TakeOverSys (SCON_Dummy + 0) 128 #define SCON_KillReq (SCON_Dummy + 1) 129 #define SCON_CDReboot (SCON_Dummy + 2) 130 #define SCON_StopInput (SCON_Dummy + 3) 131 #define SCON_AddCreateKeys (SCON_Dummy + 4) 132 #define SCON_RemCreateKeys (SCON_Dummy + 5) 133 134 135 #define CDReboot_On 1 136 #define CDReboot_Off 0 137 #define CDReboot_Default 2 138 139 140 #define RAWKEY_PORT0_BUTTON_BLUE 0x72 141 #define RAWKEY_PORT0_BUTTON_RED 0x78 142 #define RAWKEY_PORT0_BUTTON_YELLOW 0x77 143 #define RAWKEY_PORT0_BUTTON_GREEN 0x76 144 #define RAWKEY_PORT0_BUTTON_FORWARD 0x75 145 #define RAWKEY_PORT0_BUTTON_REVERSE 0x74 146 #define RAWKEY_PORT0_BUTTON_PLAY 0x73 147 #define RAWKEY_PORT0_JOY_UP 0x79 148 #define RAWKEY_PORT0_JOY_DOWN 0x7A 149 #define RAWKEY_PORT0_JOY_LEFT 0x7C 150 #define RAWKEY_PORT0_JOY_RIGHT 0x7B 151 152 #define RAWKEY_PORT1_BUTTON_BLUE 0x172 153 #define RAWKEY_PORT1_BUTTON_RED 0x178 154 #define RAWKEY_PORT1_BUTTON_YELLOW 0x177 155 #define RAWKEY_PORT1_BUTTON_GREEN 0x176 156 #define RAWKEY_PORT1_BUTTON_FORWARD 0x175 157 #define RAWKEY_PORT1_BUTTON_REVERSE 0x174 158 #define RAWKEY_PORT1_BUTTON_PLAY 0x173 159 #define RAWKEY_PORT1_JOY_UP 0x179 160 #define RAWKEY_PORT1_JOY_DOWN 0x17A 161 #define RAWKEY_PORT1_JOY_LEFT 0x17C 162 #define RAWKEY_PORT1_JOY_RIGHT 0x17B 163 164 #define RAWKEY_PORT2_BUTTON_BLUE 0x272 165 #define RAWKEY_PORT2_BUTTON_RED 0x278 166 #define RAWKEY_PORT2_BUTTON_YELLOW 0x277 167 #define RAWKEY_PORT2_BUTTON_GREEN 0x276 168 #define RAWKEY_PORT2_BUTTON_FORWARD 0x275 169 #define RAWKEY_PORT2_BUTTON_REVERSE 0x274 170 #define RAWKEY_PORT2_BUTTON_PLAY 0x273 171 #define RAWKEY_PORT2_JOY_UP 0x279 172 #define RAWKEY_PORT2_JOY_DOWN 0x27A 173 #define RAWKEY_PORT2_JOY_LEFT 0x27C 174 #define RAWKEY_PORT2_JOY_RIGHT 0x27B 175 176 #define RAWKEY_PORT3_BUTTON_BLUE 0x372 177 #define RAWKEY_PORT3_BUTTON_RED 0x378 178 #define RAWKEY_PORT3_BUTTON_YELLOW 0x377 179 #define RAWKEY_PORT3_BUTTON_GREEN 0x376 180 #define RAWKEY_PORT3_BUTTON_FORWARD 0x375 181 #define RAWKEY_PORT3_BUTTON_REVERSE 0x374 182 #define RAWKEY_PORT3_BUTTON_PLAY 0x373 183 #define RAWKEY_PORT3_JOY_UP 0x379 184 #define RAWKEY_PORT3_JOY_DOWN 0x37A 185 #define RAWKEY_PORT3_JOY_LEFT 0x37C 186 #define RAWKEY_PORT3_JOY_RIGHT 0x37B 187 188 189 #define LANG_UNKNOWN 0 190 #define LANG_AMERICAN 1 191 #define LANG_ENGLISH 2 192 #define LANG_GERMAN 3 193 #define LANG_FRENCH 4 194 #define LANG_SPANISH 5 195 #define LANG_ITALIAN 6 196 #define LANG_PORTUGUESE 7 197 #define LANG_DANISH 8 198 #define LANG_DUTCH 9 199 #define LANG_NORWEGIAN 10 200 #define LANG_FINNISH 11 201 #define LANG_SWEDISH 12 202 #define LANG_JAPANESE 13 203 #define LANG_CHINESE 14 204 #define LANG_ARABIC 15 205 #define LANG_GREEK 16 206 #define LANG_HEBREW 17 207 #define LANG_KOREAN 18 208 209 210 #pragma pack() 211 212 #endif /* LIBRARIES_LOWLEVEL_H */