Leaked source code of windows server 2003
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.

125 lines
3.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // File: globals.h
  4. //
  5. // Contents: Global variable declarations.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef GLOBALS_H
  9. #define GLOBALS_H
  10. #include "private.h"
  11. #include "ciccs.h"
  12. extern HINSTANCE g_hInst;
  13. extern CCicCriticalSectionStatic g_cs;
  14. extern const CLSID CLSID_SoftkbdIMX;
  15. // extern const GUID GUID_ATTR_SOFTKBDIMX_INPUT;
  16. extern const GUID GUID_IC_PRIVATE;
  17. const TCHAR c_szIMXOwnerWndClass[] = TEXT("SoftkbdIMXOwnerWndClass");
  18. const TCHAR c_szCTFTIPKey[] = TEXT("SOFTWARE\\Microsoft\\CTF\\TIP\\");
  19. const TCHAR c_szLanguageProfileKey[] = TEXT("LanguageProfile");
  20. const TCHAR c_szSoftKbdUIWndClassName[] = TEXT("SoftkbdUIWndFrame");
  21. extern const GUID GUID_LBI_SOFTKBDIMX_MODE;
  22. extern const GUID GUID_COMPARTMENT_SOFTKBD_KBDLAYOUT;
  23. extern const GUID GUID_COMPARTMENT_SOFTKBD_WNDPOSITION;
  24. extern const GUID c_guidProfile;
  25. extern const GUID c_guidProfileSym;
  26. #define SafeFreePointer(pv) if ( (pv) != NULL ) { \
  27. cicMemFree(pv); \
  28. (pv) = NULL; }
  29. #define CHECKHR(x) {hr = x; if (FAILED(hr)) goto CleanUp;}
  30. #define NUM_PICTURE_KEYS 40
  31. // Type definition for picture keys in standard soft keyboards.
  32. typedef struct _tagPictureKey {
  33. UINT uScanCode; // same as KeyId in the XML file
  34. UINT uVkey;
  35. LPWSTR PictBitmap;
  36. } PICTUREKEY, FAR * LPPICTUREKEY;
  37. extern PICTUREKEY gPictureKeys[NUM_PICTURE_KEYS];
  38. extern PICTUREKEY gJpnPictureKeys[NUM_PICTURE_KEYS];
  39. #define KID_LWINLOGO 0xE05B
  40. #define KID_RWINLOGO 0xE05C
  41. #define KID_APPS 0xE05D
  42. #define KID_LEFT 0xE04B
  43. #define KID_RIGHT 0xE04D
  44. #define KID_UP 0xE048
  45. #define KID_DOWN 0xE050
  46. #define KID_ESC 0x01
  47. #define KID_BACK 0x0E
  48. #define KID_TAB 0x0F
  49. #define KID_CAPS 0x3A
  50. #define KID_ENTER 0x1C
  51. #define KID_LSHFT 0x2A
  52. #define KID_RSHFT 0x36
  53. #define KID_CTRL 0x1D
  54. #define KID_RCTRL 0xE01D
  55. #define KID_ALT 0x38
  56. #define KID_RALT 0xE038
  57. #define KID_SPACE 0x39
  58. #define KID_DELETE 0xE053
  59. #define KID_F1 0x3B
  60. #define KID_F2 0x3C
  61. #define KID_F3 0x3D
  62. #define KID_F4 0x3E
  63. #define KID_F5 0x3F
  64. #define KID_F6 0x40
  65. #define KID_F7 0x41
  66. #define KID_F8 0x42
  67. #define KID_F9 0x43
  68. #define KID_F10 0x44
  69. #define KID_F11 0x57
  70. #define KID_F12 0x58
  71. #define KID_CONVERT 0x79
  72. #define KID_NONCONVERT 0x7B
  73. #define KID_KANA 0x70
  74. #define KID_FULLHALF 0x29 // special used by Japan 106 Key
  75. // These defintions are for Transparency of soft keyboard window.
  76. // used by SetLayeredWindowAttributes( )
  77. #if(_WIN32_WINNT < 0x0500)
  78. #define WS_EX_LAYERED 0x00080000
  79. #define LWA_COLORKEY 0x00000001
  80. #define LWA_ALPHA 0x00000002
  81. #define ULW_COLORKEY 0x00000001
  82. #define ULW_ALPHA 0x00000002
  83. #define ULW_OPAQUE 0x00000004
  84. #endif /* _WIN32_WINNT < 0x0500 */
  85. typedef enum { none = 0, CapsLock, Shift, Ctrl, Alt, Kana, AltGr, NumLock} MODIFYTYPE;
  86. #define MODIFIER_CAPSLOCK 0x0002
  87. #define MODIFIER_SHIFT 0x0004
  88. #define MODIFIER_CTRL 0x0008
  89. #define MODIFIER_ALT 0x0010
  90. #define MODIFIER_KANA 0x0020
  91. #define MODIFIER_ALTGR 0x0040
  92. #define MODIFIER_NUMLOCK 0x0080
  93. #endif // GLOBALS_H