1 /* Sarien - A Sierra AGI resource interpreter engine 2 * Copyright (C) 1999-2001 Stuart George and Claudio Matsuoka 3 * 4 * $Id: keyboard.h,v 1.21 2001/09/08 23:39:54 cmatsuoka Exp $ 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; see docs/COPYING for further details. 9 */ 10 11 #ifndef __AGI_KEYBOARD_H 12 #define __AGI_KEYBOARD_H 13 14 #ifdef __cplusplus 15 extern "C"{ 16 #endif 17 18 #define KEY_BACKSPACE 0x08 19 #define KEY_ESCAPE 0x1B 20 #define KEY_ENTER 0x0D 21 #define KEY_UP 0x4800 22 #define KEY_DOWN 0x5000 23 #define KEY_LEFT 0x4B00 24 #define KEY_STATIONARY 0x4C00 25 #define KEY_RIGHT 0x4D00 26 27 #define KEY_DOWN_LEFT 0x4F00 28 #define KEY_DOWN_RIGHT 0x5100 29 #define KEY_UP_LEFT 0x4700 30 #define KEY_UP_RIGHT 0x4900 31 32 #define KEY_STATUSLN 0xff61 /* F11 */ 33 #define KEY_PRIORITY 0xffc8 /* F12 */ 34 35 #define KEY_PGUP 0x4900 /* Page Up (fixed by Ziv Barber) */ 36 #define KEY_PGDN 0x5100 /* Page Down */ 37 #define KEY_HOME 0x4700 /* Home */ 38 #define KEY_END 0x4f00 /* End * */ 39 40 #ifdef USE_MOUSE 41 #define BUTTON_LEFT 0xF101 /* Left mouse button */ 42 #define BUTTON_RIGHT 0xF202 /* Right mouse button */ 43 #endif 44 45 #define KEY_SCAN(k) (k >> 8) 46 #define KEY_ASCII(k) (k & 0xff) 47 48 extern UINT8 scancode_table[]; 49 50 51 void init_words (void); 52 void clean_input (void); 53 int do_poll_keyboard (void); 54 void clean_keyboard (void); 55 void handle_keys (int); 56 void handle_getstring(int); 57 int handle_controller(int); 58 void get_string (int, int, int, int); 59 UINT16 agi_get_keypress(void); 60 int wait_key (void); 61 int wait_any_key (void); 62 63 #ifdef __cplusplus 64 }; 65 #endif 66 67 #endif /* __AGI_KEYBOARD_H */ 68