home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / txcl552 / inc / tcxlkey.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-08  |  3.9 KB  |  69 lines

  1. /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
  2.  | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
  3.  | All Rights Reserved.
  4.  |
  5.  | This Library is part of IDC's TesSeRact Development Tools product
  6.  | line. For information about other IDC products, call 1-215-443-9705.
  7.  *-V--------------------------------------------------------------------*
  8.  | $Header:   tcxlkey.h     552.3   05 Apr 1991 16:32:04  $
  9.  |
  10.  | $Log:   tcxlkey.h    $
  11.  *-D--------------------------------------------------------------------*
  12.  | <TCXLkey.h> : Public definitions and prototypes for TCXL Keyboard
  13.  | Access Subsystem (Bottom level).
  14.  *-N-----------------------[ Notes and Caveats ]------------------------*
  15.  | 1) Almost all of the keyboard-access functions are MS-DOS dependent.
  16.  *======================================================================*/
  17. #ifndef  _TCXLkey_
  18. #  define   _TCXLkey_ 1
  19. #  ifndef   _TCXLdef_
  20. #     include  <TCXLdef.h>             /* input system                  */
  21. #  endif
  22. #define  KEY_BRK  0xFFFF      /* ^Break return from _KeyHit()/_KeyGet() */
  23.                               /*- KeyStat() return bits (MS-DOS) -------*/
  24. #define  KEY_RSH  0x01        /* [Right Shift] pressed                  */
  25. #define  KEY_LSH  0x02        /* [Left Shift] pressed                   */
  26. #define  KEY_CTL  0x04        /* [Ctrl] pressed                         */
  27. #define  KEY_ALT  0x08        /* [Alt] pressed                          */
  28. #define  KEY_SCR  0x10        /* [Scroll Lock] toggled                  */
  29. #define  KEY_NUM  0x20        /* [Num Lock] toggled                     */
  30. #define  KEY_CAP  0x40        /* [Caps Lock] toggled                    */
  31. #define  KEY_INS  0x80        /* [Ins] toggled                          */
  32.                               /*- KctlFlg bits -------------------------*/
  33. #define  KEY_EXT  0x80        /* Extended BIOS functions                */
  34. #define  KEY_FIX  0x40        /* Translate extended (default)           */
  35.                               /*- KctlSrc bits -------------------------*/
  36. #define  KEY_KBD  0x00        /* Keyboard                               */
  37. #define  KEY_QUE  0x01        /* Key-queue                              */
  38. #define  KEY_MOU  0x02        /* Mouse                                  */
  39.  
  40. /*------------------------[ Function prototypes ]-----------------------*/
  41.  
  42. #ifdef __cplusplus                     /* no mangling, please           */
  43.    extern   "C"   {
  44. #endif
  45.                               /*- Keyboard access (MS-DOS) -------------*/
  46. WrdT  PAS   _KeySta(NOARG);            /* Get keyboard status via BIOS  */
  47. VOID  PAS   _KeySet(IntT b, IntT s);   /* Toggle BIOS keyboard state    */
  48. FlgT  PAS   _KeyExt(NOARG);            /* Test for extended BIOS        */
  49. KeyT  PAS   _KeyGet(NOARG);            /* Get waiting key via BIOS      */
  50. KeyT  PAS   _KeyHit(NOARG);            /* Test for waiting key via BIOS */
  51. VOID        KcapOff(NOARG);            /* CapsLock ON                   */
  52. VOID        KcapOn(NOARG);             /* CapsLock OFF                  */
  53. VOID        KinsOff(NOARG);            /* Insert OFF                    */
  54. VOID        KinsOn(NOARG);             /* Insert ON                     */
  55. VOID        KnumOff(NOARG);            /* NumLock OFF                   */
  56. VOID        KnumOn(NOARG);             /* NumLock ON                    */
  57. BytT  CTYP  KscnCod(ChrT c);           /* Return scan-code for ASCII    */
  58.                               /*- Implementation macros ----------------*/
  59. #define  KcapOff()   (_KeySet(KEY_CAP, 0))
  60. #define  KcapOn()    (_KeySet(KEY_CAP, 1))
  61. #define  KinsOff()   (_KeySet(KEY_INS, 0))
  62. #define  KinsOn()    (_KeySet(KEY_INS, 1))
  63. #define  KnumOff()   (_KeySet(KEY_NUM, 0))
  64. #define  KnumOn()    (_KeySet(KEY_NUM, 1))
  65. #ifdef __cplusplus
  66.    }
  67. #endif
  68. #endif   /* _TCXLkey_ : End of TCXLkey.h -------------------------------*/
  69.