summaryrefslogtreecommitdiff
path: root/rhtvision/include/tv/wingr/key.h
blob: 4e90bfccd144a001f3b2a63934da4ddc4f290fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * Windows screen routines header.
 *
 *  Copyright (c) 2002 by Jose Angel Sanchez Caso (JASC)
 *
 *  Squeleton based in code by Salvador E. Tropea (SET)
 *  Covered by the GPL license. 
 */
 
#if defined(TVOS_Win32) && !defined(TV_Disable_WinGr_Driver) \
    && !defined(WINGRKEY_HEADER_INCLUDED)
#define WINGRKEY_HEADER_INCLUDED

typedef struct
{ int   win;
  short key;
} ConvKeyRec;


struct TEvent;

struct TGKeyWinGr: virtual public TDisplayWinGr // Access to display attributes
		         , virtual public TGKey         // A class to encapsulate the globals, all is static!
                 , virtual public TVCodePage    // Trick to access codepage mappings
{ TGKeyWinGr(): TVCodePage(0,0,0) {};          // Only need access to protected members of TVCodePage

  static void init();
  static int testEvents( UINT   message
                       , WPARAM wParam
                       , LPARAM lParam );


// Function replacements
// static void     Suspend();
// static void     Resume();
// static void     Clear();
// static ushort   GKey();
// static void     SetKbdMapping(int version);
 

 static int      KbHit        (); 
 static unsigned GetShiftState();
 static void     Init         ();                // Setup the pointers to point our members
 static void     FillTEvent   ( TEvent &e );
 

protected:  // For this driver
 
 friend class THWMouseWinGr;
 friend class TScreenWinGr;

private:


// Support variables

 static ushort     keyMask;
 static CodePage * remapKey;  // Multilingual keyboard support

// Support methods

 static int setKey( const ConvKeyRec * xlate 
                  , int vcode );


};

#endif // WINDOWSKEY_HEADER_INCLUDED