source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/wincon.h@ 1167

Last change on this file since 1167 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

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