| 1 | /* |
| 2 | * akbd.h |
| 3 | * |
| 4 | * [Generated from akbd, 25 September 1996] |
| 5 | */ |
| 6 | |
| 7 | #if !defined(__CC_NORCROFT) || !defined(__arm) |
| 8 | #error You must use the Norcroft ARM Compiler for Sapphire programs |
| 9 | #endif |
| 10 | |
| 11 | #pragma include_only_once |
| 12 | #pragma force_top_level |
| 13 | |
| 14 | #ifndef __akbd_h |
| 15 | #define __akbd_h |
| 16 | |
| 17 | #ifndef __sapphire_h |
| 18 | #include "sapphire.h" |
| 19 | #endif |
| 20 | |
| 21 | /*----- Overview ----------------------------------------------------------* |
| 22 | * |
| 23 | * Functions provided: |
| 24 | * |
| 25 | * akbd_test |
| 26 | * akbd_translate |
| 27 | * akbd_pollKey |
| 28 | */ |
| 29 | |
| 30 | /* --- akbd_test --- * |
| 31 | * |
| 32 | * On entry: R0 == internal key number to test |
| 33 | * |
| 34 | * On exit: CS if key was pressed, CC otherwise |
| 35 | * |
| 36 | * Use: Informs you whether a given key is currently being pressed. |
| 37 | */ |
| 38 | |
| 39 | extern routine akbd_test; |
| 40 | |
| 41 | /* --- akbd_translate --- * |
| 42 | * |
| 43 | * On entry: R0 == Wimp key number |
| 44 | * |
| 45 | * On exit: R0 == Straylight extended keyset key number |
| 46 | * |
| 47 | * Use: Translates a Wimp key number into one of the more specific |
| 48 | * Straylight key numbers. |
| 49 | */ |
| 50 | |
| 51 | extern routine akbd_translate; |
| 52 | |
| 53 | /* --- akbd_pollKey --- * |
| 54 | * |
| 55 | * On entry: -- |
| 56 | * |
| 57 | * On exit: CC if a key was in the buffer and |
| 58 | * R0 == wimp translated key code |
| 59 | * else CS and |
| 60 | * R0 corrupted |
| 61 | * |
| 62 | * Use: Reports whether the user has typed ahead, and if so what the ; keypress. Note that the keypresses returned are WIMP-type, |
| 63 | * not Straylight extended ones so you will have to use |
| 64 | * akbd_translate if you need the extended type. |
| 65 | * |
| 66 | * This call could be used to allow buffering of keypresses: |
| 67 | * on a Key_Pressed event you would call this routine until |
| 68 | * it returns FALSE and store the codes it returns in a buffer |
| 69 | * along with the code from the event. |
| 70 | */ |
| 71 | |
| 72 | extern routine akbd_pollKey; |
| 73 | |
| 74 | /*----- That's all, folks -------------------------------------------------*/ |
| 75 | |
| 76 | #endif |