1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _WINCON_ 7 #define _WINCON_ 8 9 #include <_mingw_unicode.h> 10 11 #include <winapifamily.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 typedef struct _COORD { 18 SHORT X; 19 SHORT Y; 20 } COORD,*PCOORD; 21 22 typedef struct _SMALL_RECT { 23 SHORT Left; 24 SHORT Top; 25 SHORT Right; 26 SHORT Bottom; 27 } SMALL_RECT,*PSMALL_RECT; 28 29 typedef struct _KEY_EVENT_RECORD { 30 WINBOOL bKeyDown; 31 WORD wRepeatCount; 32 WORD wVirtualKeyCode; 33 WORD wVirtualScanCode; 34 union { 35 WCHAR UnicodeChar; 36 CHAR AsciiChar; 37 } uChar; 38 DWORD dwControlKeyState; 39 } KEY_EVENT_RECORD,*PKEY_EVENT_RECORD; 40 41 #define RIGHT_ALT_PRESSED 0x1 42 #define LEFT_ALT_PRESSED 0x2 43 #define RIGHT_CTRL_PRESSED 0x4 44 #define LEFT_CTRL_PRESSED 0x8 45 #define SHIFT_PRESSED 0x10 46 #define NUMLOCK_ON 0x20 47 #define SCROLLLOCK_ON 0x40 48 #define CAPSLOCK_ON 0x80 49 #define ENHANCED_KEY 0x100 50 #define NLS_DBCSCHAR 0x10000 51 #define NLS_ALPHANUMERIC 0x0 52 #define NLS_KATAKANA 0x20000 53 #define NLS_HIRAGANA 0x40000 54 #define NLS_ROMAN 0x400000 55 #define NLS_IME_CONVERSION 0x800000 56 #define NLS_IME_DISABLE 0x20000000 57 58 typedef struct _MOUSE_EVENT_RECORD { 59 COORD dwMousePosition; 60 DWORD dwButtonState; 61 DWORD dwControlKeyState; 62 DWORD dwEventFlags; 63 } MOUSE_EVENT_RECORD,*PMOUSE_EVENT_RECORD; 64 65 #define FROM_LEFT_1ST_BUTTON_PRESSED 0x1 66 #define RIGHTMOST_BUTTON_PRESSED 0x2 67 #define FROM_LEFT_2ND_BUTTON_PRESSED 0x4 68 #define FROM_LEFT_3RD_BUTTON_PRESSED 0x8 69 #define FROM_LEFT_4TH_BUTTON_PRESSED 0x10 70 71 #define MOUSE_MOVED 0x1 72 #define DOUBLE_CLICK 0x2 73 #define MOUSE_WHEELED 0x4 74 #if (_WIN32_WINNT >= 0x0600) 75 #define MOUSE_HWHEELED 0x8 76 #endif 77 78 typedef struct _WINDOW_BUFFER_SIZE_RECORD { 79 COORD dwSize; 80 } WINDOW_BUFFER_SIZE_RECORD,*PWINDOW_BUFFER_SIZE_RECORD; 81 82 typedef struct _MENU_EVENT_RECORD { 83 UINT dwCommandId; 84 } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD; 85 86 typedef struct _FOCUS_EVENT_RECORD { 87 WINBOOL bSetFocus; 88 } FOCUS_EVENT_RECORD,*PFOCUS_EVENT_RECORD; 89 90 typedef struct _INPUT_RECORD { 91 WORD EventType; 92 union { 93 KEY_EVENT_RECORD KeyEvent; 94 MOUSE_EVENT_RECORD MouseEvent; 95 WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent; 96 MENU_EVENT_RECORD MenuEvent; 97 FOCUS_EVENT_RECORD FocusEvent; 98 } Event; 99 } INPUT_RECORD,*PINPUT_RECORD; 100 101 #define KEY_EVENT 0x1 102 #define MOUSE_EVENT 0x2 103 #define WINDOW_BUFFER_SIZE_EVENT 0x4 104 #define MENU_EVENT 0x8 105 #define FOCUS_EVENT 0x10 106 107 typedef struct _CHAR_INFO { 108 union { 109 WCHAR UnicodeChar; 110 CHAR AsciiChar; 111 } Char; 112 WORD Attributes; 113 } CHAR_INFO,*PCHAR_INFO; 114 115 #define FOREGROUND_BLUE 0x1 116 #define FOREGROUND_GREEN 0x2 117 #define FOREGROUND_RED 0x4 118 #define FOREGROUND_INTENSITY 0x8 119 #define BACKGROUND_BLUE 0x10 120 #define BACKGROUND_GREEN 0x20 121 #define BACKGROUND_RED 0x40 122 #define BACKGROUND_INTENSITY 0x80 123 #define COMMON_LVB_LEADING_BYTE 0x100 124 #define COMMON_LVB_TRAILING_BYTE 0x200 125 #define COMMON_LVB_GRID_HORIZONTAL 0x400 126 #define COMMON_LVB_GRID_LVERTICAL 0x800 127 #define COMMON_LVB_GRID_RVERTICAL 0x1000 128 #define COMMON_LVB_REVERSE_VIDEO 0x4000 129 #define COMMON_LVB_UNDERSCORE 0x8000 130 131 #define COMMON_LVB_SBCSDBCS 0x300 132 133 typedef struct _CONSOLE_SCREEN_BUFFER_INFO { 134 COORD dwSize; 135 COORD dwCursorPosition; 136 WORD wAttributes; 137 SMALL_RECT srWindow; 138 COORD dwMaximumWindowSize; 139 } CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO; 140 141 typedef struct _CONSOLE_CURSOR_INFO { 142 DWORD dwSize; 143 WINBOOL bVisible; 144 } CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO; 145 146 typedef struct _CONSOLE_FONT_INFO { 147 DWORD nFont; 148 COORD dwFontSize; 149 } CONSOLE_FONT_INFO,*PCONSOLE_FONT_INFO; 150 151 typedef struct _CONSOLE_SELECTION_INFO { 152 DWORD dwFlags; 153 COORD dwSelectionAnchor; 154 SMALL_RECT srSelection; 155 } CONSOLE_SELECTION_INFO,*PCONSOLE_SELECTION_INFO; 156 157 #define CONSOLE_NO_SELECTION 0x0 158 #define CONSOLE_SELECTION_IN_PROGRESS 0x1 159 #define CONSOLE_SELECTION_NOT_EMPTY 0x2 160 #define CONSOLE_MOUSE_SELECTION 0x4 161 #define CONSOLE_MOUSE_DOWN 0x8 162 163 typedef WINBOOL (WINAPI *PHANDLER_ROUTINE)(DWORD CtrlType); 164 165 #define CTRL_C_EVENT 0 166 #define CTRL_BREAK_EVENT 1 167 #define CTRL_CLOSE_EVENT 2 168 169 #define CTRL_LOGOFF_EVENT 5 170 #define CTRL_SHUTDOWN_EVENT 6 171 172 #define ENABLE_PROCESSED_INPUT 0x1 173 #define ENABLE_LINE_INPUT 0x2 174 #define ENABLE_ECHO_INPUT 0x4 175 #define ENABLE_WINDOW_INPUT 0x8 176 #define ENABLE_MOUSE_INPUT 0x10 177 #define ENABLE_INSERT_MODE 0x20 178 #define ENABLE_QUICK_EDIT_MODE 0x40 179 #define ENABLE_EXTENDED_FLAGS 0x80 180 #define ENABLE_AUTO_POSITION 0x100 181 #define ENABLE_VIRTUAL_TERMINAL_INPUT 0x200 182 183 #define ENABLE_PROCESSED_OUTPUT 0x1 184 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x2 185 #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4 186 #define DISABLE_NEWLINE_AUTO_RETURN 0x8 187 #define ENABLE_LVB_GRID_WORLDWIDE 0x10 188 189 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 190 191 #define PeekConsoleInput __MINGW_NAME_AW(PeekConsoleInput) 192 #define ReadConsoleInput __MINGW_NAME_AW(ReadConsoleInput) 193 #define WriteConsoleInput __MINGW_NAME_AW(WriteConsoleInput) 194 #define ReadConsoleOutput __MINGW_NAME_AW(ReadConsoleOutput) 195 #define WriteConsoleOutput __MINGW_NAME_AW(WriteConsoleOutput) 196 #define ReadConsoleOutputCharacter __MINGW_NAME_AW(ReadConsoleOutputCharacter) 197 #define WriteConsoleOutputCharacter __MINGW_NAME_AW(WriteConsoleOutputCharacter) 198 #define FillConsoleOutputCharacter __MINGW_NAME_AW(FillConsoleOutputCharacter) 199 #define ScrollConsoleScreenBuffer __MINGW_NAME_AW(ScrollConsoleScreenBuffer) 200 #define GetConsoleTitle __MINGW_NAME_AW(GetConsoleTitle) 201 #define SetConsoleTitle __MINGW_NAME_AW(SetConsoleTitle) 202 #define ReadConsole __MINGW_NAME_AW(ReadConsole) 203 #define WriteConsole __MINGW_NAME_AW(WriteConsole) 204 #define AddConsoleAlias __MINGW_NAME_AW(AddConsoleAlias) 205 #define GetConsoleAlias __MINGW_NAME_AW(GetConsoleAlias) 206 #define GetConsoleAliasesLength __MINGW_NAME_AW(GetConsoleAliasesLength) 207 #define GetConsoleAliasExesLength __MINGW_NAME_AW(GetConsoleAliasExesLength) 208 #define GetConsoleAliases __MINGW_NAME_AW(GetConsoleAliases) 209 #define GetConsoleAliasExes __MINGW_NAME_AW(GetConsoleAliasExes) 210 211 WINBASEAPI WINBOOL WINAPI PeekConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); 212 WINBASEAPI WINBOOL WINAPI PeekConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); 213 WINBASEAPI WINBOOL WINAPI ReadConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); 214 WINBASEAPI WINBOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead); 215 WINBASEAPI WINBOOL WINAPI WriteConsoleInputA(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten); 216 WINBASEAPI WINBOOL WINAPI WriteConsoleInputW(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten); 217 WINBASEAPI WINBOOL WINAPI ReadConsoleOutputA(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion); 218 WINBASEAPI WINBOOL WINAPI ReadConsoleOutputW(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion); 219 WINBASEAPI WINBOOL WINAPI WriteConsoleOutputA(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion); 220 WINBASEAPI WINBOOL WINAPI WriteConsoleOutputW(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion); 221 WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput,LPSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead); 222 WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterW(HANDLE hConsoleOutput,LPWSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead); 223 WINBASEAPI WINBOOL WINAPI ReadConsoleOutputAttribute(HANDLE hConsoleOutput,LPWORD lpAttribute,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfAttrsRead); 224 WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput,LPCSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); 225 WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterW(HANDLE hConsoleOutput,LPCWSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); 226 WINBASEAPI WINBOOL WINAPI WriteConsoleOutputAttribute(HANDLE hConsoleOutput,CONST WORD *lpAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten); 227 WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterA(HANDLE hConsoleOutput,CHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); 228 WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterW(HANDLE hConsoleOutput,WCHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten); 229 WINBASEAPI WINBOOL WINAPI FillConsoleOutputAttribute(HANDLE hConsoleOutput,WORD wAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten); 230 WINBASEAPI WINBOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle,LPDWORD lpMode); 231 WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE hConsoleInput,LPDWORD lpNumberOfEvents); 232 WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo); 233 WINBASEAPI COORD WINAPI GetLargestConsoleWindowSize(HANDLE hConsoleOutput); 234 WINBASEAPI WINBOOL WINAPI GetConsoleCursorInfo(HANDLE hConsoleOutput,PCONSOLE_CURSOR_INFO lpConsoleCursorInfo); 235 WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFont(HANDLE hConsoleOutput,WINBOOL bMaximumWindow,PCONSOLE_FONT_INFO lpConsoleCurrentFont); 236 WINBASEAPI COORD WINAPI GetConsoleFontSize(HANDLE hConsoleOutput,DWORD nFont); 237 WINBASEAPI WINBOOL WINAPI GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo); 238 WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons); 239 WINBASEAPI WINBOOL WINAPI SetConsoleMode(HANDLE hConsoleHandle,DWORD dwMode); 240 WINBASEAPI WINBOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput); 241 WINBASEAPI WINBOOL WINAPI FlushConsoleInputBuffer(HANDLE hConsoleInput); 242 WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput,COORD dwSize); 243 WINBASEAPI WINBOOL WINAPI SetConsoleCursorPosition(HANDLE hConsoleOutput,COORD dwCursorPosition); 244 WINBASEAPI WINBOOL WINAPI SetConsoleCursorInfo(HANDLE hConsoleOutput,CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo); 245 WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill); 246 WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill); 247 WINBASEAPI WINBOOL WINAPI SetConsoleWindowInfo(HANDLE hConsoleOutput,WINBOOL bAbsolute,CONST SMALL_RECT *lpConsoleWindow); 248 WINBASEAPI WINBOOL WINAPI SetConsoleTextAttribute(HANDLE hConsoleOutput,WORD wAttributes); 249 WINBASEAPI WINBOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine,WINBOOL Add); 250 WINBASEAPI WINBOOL WINAPI GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,DWORD dwProcessGroupId); 251 WINBASEAPI WINBOOL WINAPI AllocConsole(VOID); 252 WINBASEAPI WINBOOL WINAPI FreeConsole(VOID); 253 WINBASEAPI WINBOOL WINAPI AttachConsole(DWORD dwProcessId); 254 255 #define ATTACH_PARENT_PROCESS ((DWORD)-1) 256 257 WINBASEAPI DWORD WINAPI GetConsoleTitleA(LPSTR lpConsoleTitle,DWORD nSize); 258 WINBASEAPI DWORD WINAPI GetConsoleTitleW(LPWSTR lpConsoleTitle,DWORD nSize); 259 WINBASEAPI WINBOOL WINAPI SetConsoleTitleA(LPCSTR lpConsoleTitle); 260 WINBASEAPI WINBOOL WINAPI SetConsoleTitleW(LPCWSTR lpConsoleTitle); 261 WINBASEAPI WINBOOL WINAPI ReadConsoleA(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved); 262 WINBASEAPI WINBOOL WINAPI ReadConsoleW(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved); 263 WINBASEAPI WINBOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved); 264 WINBASEAPI WINBOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved); 265 266 #define CONSOLE_TEXTMODE_BUFFER 1 267 268 WINBASEAPI HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess,DWORD dwShareMode,CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,DWORD dwFlags,LPVOID lpScreenBufferData); 269 WINBASEAPI UINT WINAPI GetConsoleCP(VOID); 270 WINBASEAPI WINBOOL WINAPI SetConsoleCP(UINT wCodePageID); 271 WINBASEAPI UINT WINAPI GetConsoleOutputCP(VOID); 272 WINBASEAPI WINBOOL WINAPI SetConsoleOutputCP(UINT wCodePageID); 273 274 #define CONSOLE_FULLSCREEN 1 275 #define CONSOLE_FULLSCREEN_HARDWARE 2 276 WINBASEAPI WINBOOL WINAPI GetConsoleDisplayMode(LPDWORD lpModeFlags); 277 278 #define CONSOLE_FULLSCREEN_MODE 1 279 #define CONSOLE_WINDOWED_MODE 2 280 WINBASEAPI WINBOOL WINAPI SetConsoleDisplayMode(HANDLE hConsoleOutput, DWORD dwFlags, PCOORD lpNewScreenBufferDimensions); 281 282 WINBASEAPI HWND WINAPI GetConsoleWindow(VOID); 283 WINBASEAPI DWORD WINAPI GetConsoleProcessList(LPDWORD lpdwProcessList,DWORD dwProcessCount); 284 WINBASEAPI WINBOOL WINAPI AddConsoleAliasA(LPSTR Source,LPSTR Target,LPSTR ExeName); 285 WINBASEAPI WINBOOL WINAPI AddConsoleAliasW(LPWSTR Source,LPWSTR Target,LPWSTR ExeName); 286 WINBASEAPI DWORD WINAPI GetConsoleAliasA(LPSTR Source,LPSTR TargetBuffer,DWORD TargetBufferLength,LPSTR ExeName); 287 WINBASEAPI DWORD WINAPI GetConsoleAliasW(LPWSTR Source,LPWSTR TargetBuffer,DWORD TargetBufferLength,LPWSTR ExeName); 288 WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthA(LPSTR ExeName); 289 WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthW(LPWSTR ExeName); 290 WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthA(VOID); 291 WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthW(VOID); 292 WINBASEAPI DWORD WINAPI GetConsoleAliasesA(LPSTR AliasBuffer,DWORD AliasBufferLength,LPSTR ExeName); 293 WINBASEAPI DWORD WINAPI GetConsoleAliasesW(LPWSTR AliasBuffer,DWORD AliasBufferLength,LPWSTR ExeName); 294 WINBASEAPI DWORD WINAPI GetConsoleAliasExesA(LPSTR ExeNameBuffer,DWORD ExeNameBufferLength); 295 WINBASEAPI DWORD WINAPI GetConsoleAliasExesW(LPWSTR ExeNameBuffer,DWORD ExeNameBufferLength); 296 297 #ifndef LF_FACESIZE 298 #define LF_FACESIZE 32 299 #endif 300 301 typedef struct _CONSOLE_FONT_INFOEX { 302 ULONG cbSize; 303 DWORD nFont; 304 COORD dwFontSize; 305 UINT FontFamily; 306 UINT FontWeight; 307 WCHAR FaceName[LF_FACESIZE]; 308 } CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX; 309 310 typedef struct _CONSOLE_HISTORY_INFO { 311 UINT cbSize; 312 UINT HistoryBufferSize; 313 UINT NumberOfHistoryBuffers; 314 DWORD dwFlags; 315 } CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO; 316 317 typedef struct _CONSOLE_READCONSOLE_CONTROL { 318 ULONG nLength; 319 ULONG nInitialChars; 320 ULONG dwCtrlWakeupMask; 321 ULONG dwControlKeyState; 322 } CONSOLE_READCONSOLE_CONTROL, *PCONSOLE_READCONSOLE_CONTROL; 323 324 typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { 325 ULONG cbSize; 326 COORD dwSize; 327 COORD dwCursorPosition; 328 WORD wAttributes; 329 SMALL_RECT srWindow; 330 COORD dwMaximumWindowSize; 331 WORD wPopupAttributes; 332 WINBOOL bFullscreenSupported; 333 COLORREF ColorTable[16]; 334 } CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX; 335 336 WINBOOL WINAPI GetConsoleHistoryInfo( 337 PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo 338 ); 339 340 #if (_WIN32_WINNT >= 0x0600) 341 #define GetConsoleOriginalTitle __MINGW_NAME_AW(GetConsoleOriginalTitle) 342 343 WINBASEAPI DWORD WINAPI GetConsoleOriginalTitleA( 344 LPSTR lpConsoleTitle, 345 DWORD nSize 346 ); 347 348 WINBASEAPI DWORD WINAPI GetConsoleOriginalTitleW( 349 LPWSTR lpConsoleTitle, 350 DWORD nSize 351 ); 352 #endif /* (_WIN32_WINNT >= 0x0600) */ 353 354 WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfoEx( 355 HANDLE hConsoleOutput, 356 PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx 357 ); 358 359 WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFontEx( 360 HANDLE hConsoleOutput, 361 WINBOOL bMaximumWindow, 362 PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx 363 ); 364 365 WINBASEAPI WINBOOL WINAPI SetConsoleHistoryInfo( 366 PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo 367 ); 368 369 WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferInfoEx( 370 HANDLE hConsoleOutput, 371 PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx 372 ); 373 374 WINBASEAPI WINBOOL WINAPI SetCurrentConsoleFontEx( 375 HANDLE hConsoleOutput, 376 WINBOOL bMaximumWindow, 377 PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx 378 ); 379 380 #if (NTDDI_VERSION >= 0x0A000006) 381 382 /* CreatePseudoConsole Flags */ 383 #define PSEUDOCONSOLE_INHERIT_CURSOR 1 384 385 typedef VOID* HPCON; 386 387 WINBASEAPI HRESULT WINAPI CreatePseudoConsole(COORD size, HANDLE hInput, HANDLE hOutput, DWORD dwFlags, HPCON* phPC); 388 WINBASEAPI HRESULT WINAPI ResizePseudoConsole(HPCON hPC, COORD size); 389 WINBASEAPI VOID WINAPI ClosePseudoConsole(HPCON hPC); 390 391 #endif /* NTDDI_WIN10_RS5 */ 392 393 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ 394 395 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && defined(WINSTORECOMPAT) 396 WINBASEAPI UINT WINAPI GetConsoleOutputCP(VOID); 397 #endif 398 399 #ifdef __cplusplus 400 } 401 #endif 402 #endif 403