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.

207 lines
5.9 KiB

  1. #ifndef _WINCONP_
  2. #define _WINCONP_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define ALTNUMPAD_BIT 0x04000000 // AltNumpad OEM char (copied from ntuser\inc\kbd.h)
  7. #define CONSOLE_SELECTION_INVERTED 0x0010 // selection is inverted (turned off)
  8. #define CONSOLE_SELECTION_VALID (CONSOLE_SELECTION_IN_PROGRESS | \
  9. CONSOLE_SELECTION_NOT_EMPTY | \
  10. CONSOLE_MOUSE_SELECTION | \
  11. CONSOLE_MOUSE_DOWN)
  12. #define ENABLE_INSERT_MODE 0x0020
  13. #define ENABLE_QUICK_EDIT_MODE 0x0040
  14. #define ENABLE_PRIVATE_FLAGS 0x0080
  15. WINBASEAPI
  16. BOOL
  17. WINAPI
  18. GetConsoleKeyboardLayoutNameA( OUT LPSTR );
  19. WINBASEAPI
  20. BOOL
  21. WINAPI
  22. GetConsoleKeyboardLayoutNameW( OUT LPWSTR );
  23. #ifdef UNICODE
  24. #define GetConsoleKeyboardLayoutName GetConsoleKeyboardLayoutNameW
  25. #else
  26. #define GetConsoleKeyboardLayoutName GetConsoleKeyboardLayoutNameA
  27. #endif // !UNICODE
  28. //
  29. // Registry strings
  30. //
  31. #define CONSOLE_REGISTRY_STRING (L"Console")
  32. #define CONSOLE_REGISTRY_FONTSIZE (L"FontSize")
  33. #define CONSOLE_REGISTRY_FONTFAMILY (L"FontFamily")
  34. #define CONSOLE_REGISTRY_BUFFERSIZE (L"ScreenBufferSize")
  35. #define CONSOLE_REGISTRY_CURSORSIZE (L"CursorSize")
  36. #define CONSOLE_REGISTRY_WINDOWSIZE (L"WindowSize")
  37. #define CONSOLE_REGISTRY_WINDOWPOS (L"WindowPosition")
  38. #define CONSOLE_REGISTRY_FILLATTR (L"ScreenColors")
  39. #define CONSOLE_REGISTRY_POPUPATTR (L"PopupColors")
  40. #define CONSOLE_REGISTRY_FULLSCR (L"FullScreen")
  41. #define CONSOLE_REGISTRY_QUICKEDIT (L"QuickEdit")
  42. #define CONSOLE_REGISTRY_FACENAME (L"FaceName")
  43. #define CONSOLE_REGISTRY_FONTWEIGHT (L"FontWeight")
  44. #define CONSOLE_REGISTRY_INSERTMODE (L"InsertMode")
  45. #define CONSOLE_REGISTRY_HISTORYSIZE (L"HistoryBufferSize")
  46. #define CONSOLE_REGISTRY_HISTORYBUFS (L"NumberOfHistoryBuffers")
  47. #define CONSOLE_REGISTRY_HISTORYNODUP (L"HistoryNoDup")
  48. #define CONSOLE_REGISTRY_COLORTABLE (L"ColorTable%02u")
  49. #define CONSOLE_REGISTRY_EXTENDEDEDITKEY L"ExtendedEditKey"
  50. #define CONSOLE_REGISTRY_EXTENDEDEDITKEY_CUSTOM L"ExtendedEditkeyCustom"
  51. #define CONSOLE_REGISTRY_WORD_DELIM L"WordDelimiters"
  52. #define CONSOLE_REGISTRY_TRIMZEROHEADINGS L"TrimLeadingZeros"
  53. #define CONSOLE_REGISTRY_LOAD_CONIME L"LoadConIme"
  54. #define CONSOLE_REGISTRY_ENABLE_COLOR_SELECTION L"EnableColorSelection"
  55. #if defined(FE_SB) // scotthsu
  56. /*
  57. * Starting code page
  58. */
  59. #define CONSOLE_REGISTRY_CODEPAGE (L"CodePage")
  60. #endif
  61. #if defined(FE_SB)
  62. //
  63. // registry strings on HKEY_LOCAL_MACHINE
  64. //
  65. #define MACHINE_REGISTRY_CONSOLE (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console")
  66. #define MACHINE_REGISTRY_CONSOLEIME (L"ConsoleIME")
  67. #define MACHINE_REGISTRY_CONSOLE_TTFONT (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\TrueTypeFont")
  68. #define MACHINE_REGISTRY_CONSOLE_NLS (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\Nls")
  69. #define MACHINE_REGISTRY_CONSOLE_FULLSCREEN (L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Console\\FullScreen")
  70. #define MACHINE_REGISTRY_INITIAL_PALETTE (L"InitialPalette")
  71. #define MACHINE_REGISTRY_COLOR_BUFFER (L"ColorBuffer")
  72. #define MACHINE_REGISTRY_COLOR_BUFFER_NO_TRANSLATE (L"ColorBufferNoTranslate")
  73. #define MACHINE_REGISTRY_MODE_FONT_PAIRS (L"ModeFontPairs")
  74. #define MACHINE_REGISTRY_FS_CODEPAGE (L"CodePage")
  75. #define MACHINE_REGISTRY_EUDC (L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\CodePage\\EUDCCodeRange")
  76. //
  77. // TrueType font list
  78. //
  79. // doesn't available bold when add BOLD_MARK on first of face name.
  80. #define BOLD_MARK (L'*')
  81. typedef struct _TT_FONT_LIST {
  82. SINGLE_LIST_ENTRY List;
  83. UINT CodePage;
  84. BOOL fDisableBold;
  85. TCHAR FaceName1[LF_FACESIZE];
  86. TCHAR FaceName2[LF_FACESIZE];
  87. } TTFONTLIST, *LPTTFONTLIST;
  88. #endif // FE_SB
  89. //
  90. // State information structure
  91. //
  92. typedef struct _CONSOLE_STATE_INFO {
  93. UINT Length;
  94. COORD ScreenBufferSize;
  95. COORD WindowSize;
  96. INT WindowPosX;
  97. INT WindowPosY;
  98. COORD FontSize;
  99. UINT FontFamily;
  100. UINT FontWeight;
  101. WCHAR FaceName[LF_FACESIZE];
  102. UINT CursorSize;
  103. BOOL FullScreen;
  104. BOOL QuickEdit;
  105. BOOL AutoPosition;
  106. BOOL InsertMode;
  107. WORD ScreenAttributes;
  108. WORD PopupAttributes;
  109. BOOL HistoryNoDup;
  110. UINT HistoryBufferSize;
  111. UINT NumberOfHistoryBuffers;
  112. COLORREF ColorTable[ 16 ];
  113. #if defined(FE_SB)
  114. /*
  115. * Startting code page
  116. */
  117. UINT CodePage;
  118. #endif // FE_SB
  119. HWND hWnd;
  120. WCHAR ConsoleTitle[1];
  121. } CONSOLE_STATE_INFO, *PCONSOLE_STATE_INFO;
  122. //
  123. // Messages sent from properties applet to console server
  124. //
  125. #define CM_PROPERTIES_START (WM_USER+200)
  126. #define CM_PROPERTIES_UPDATE (WM_USER+201)
  127. #define CM_PROPERTIES_END (WM_USER+202)
  128. //
  129. // Extended Line Edit
  130. //
  131. #define EK_INVALID ' '
  132. //
  133. // Special key for previous word erase
  134. //
  135. #define EXTKEY_ERASE_PREV_WORD (0x7f)
  136. //
  137. // Ensure the alignment is WORD boundary
  138. //
  139. #include <pshpack2.h>
  140. typedef struct {
  141. WORD wMod;
  142. WORD wVirKey;
  143. WCHAR wUnicodeChar;
  144. } ExtKeySubst;
  145. typedef struct {
  146. ExtKeySubst keys[3]; // 0: Ctrl
  147. // 1: Alt
  148. // 2: Ctrl+Alt
  149. } ExtKeyDef;
  150. typedef ExtKeyDef ExtKeyDefTable['Z' - 'A' + 1];
  151. typedef struct {
  152. DWORD dwVersion;
  153. DWORD dwCheckSum;
  154. ExtKeyDefTable table;
  155. } ExtKeyDefBuf;
  156. //
  157. // Restore the previous alignment
  158. //
  159. #include <poppack.h>
  160. #ifdef __cplusplus
  161. }
  162. #endif
  163. #endif // _WINCONP_