home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 320.lha / HPIIc / hpsrc / kbd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-05  |  714 b   |  21 lines

  1. /* Define type Decoder which is a function with a short * argument and which
  2.   return an enum KeyTypes. These functions do the keyboard decoding for prefixes */
  3. typedef enum KeyTypes (*Decoder)(short *);
  4.  
  5. /* One key of the keyboard structure : */
  6. struct Key {
  7.    enum KeyTypes Sort; /* The type of key */
  8.    union { /* Different data for each type */
  9.       Decoder suffix; /* Prefix ==> decoder function */
  10.       LONG act; /* Action number */
  11.       LONG code; /* Instruction number */
  12.    } Data;
  13. };
  14.  
  15. /* These defines are done to simplify access to the components */
  16. #define Act Data.act
  17. #define Code Data.code
  18. #define Suffix Data.suffix
  19.  
  20. extern struct Key mainKbd[3 * NUMKEYS]; /* The main, f & g key sequences */
  21.