You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /**[txh]********************************************************************
  2. Copyright (c) 2002 by Salvador E. Tropea
  3. Covered by the GPL license.
  4. Description:
  5. Keyboard `driver' classes for DOS.
  6. ***************************************************************************/
  7. #if defined(TVCompf_djgpp) && !defined(DOSKEY_HEADER_INCLUDED)
  8. #define DOSKEY_HEADER_INCLUDED
  9. struct TEvent;
  10. // A class to encapsulate the globals, all is static!
  11. class TGKeyDOS : public TGKey
  12. {
  13. public:
  14. TGKeyDOS() {};
  15. // Function replacements
  16. static unsigned GetShiftStateBIOS();
  17. static void ClearBIOS();
  18. static unsigned GetShiftStateDirect();
  19. static void ClearDirect();
  20. static ushort GKey();
  21. static void FillTEvent(TEvent &e);
  22. static void SetKbdMapping(int version);
  23. static int GetKbdMapping(int version);
  24. // Setup the pointers to point our members
  25. static void Init();
  26. protected:
  27. // Specific for this driver
  28. static void GetRawBIOS(void);
  29. static void GetRawDirect(void);
  30. static void (*GetRaw)(void);
  31. static int KbHitBIOS();
  32. static int KbHitDirect();
  33. static int InternationalToKey(uchar ascii);
  34. static int Abstract;
  35. static char ascii;
  36. static ushort sFlags;
  37. static KeyType rawCode;
  38. static int useBIOS;
  39. static int translateKeyPad;
  40. static const uchar kbWithASCII0[256];
  41. static const uchar kbWithASCIIE0[256];
  42. };
  43. #endif // DOSKEY_HEADER_INCLUDED