| 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 |
|
| 7 |
#ifndef _APISETCONSOLEL3_ |
| 8 |
#define _APISETCONSOLEL3_ |
| 9 |
|
| 10 |
#include <_mingw_unicode.h> |
| 11 |
|
| 12 |
#include <apiset.h> |
| 13 |
#include <apisetcconv.h> |
| 14 |
#include <minwinbase.h> |
| 15 |
#include <minwindef.h> |
| 16 |
|
| 17 |
#include <wincontypes.h> |
| 18 |
#include <windef.h> |
| 19 |
|
| 20 |
#ifndef NOGDI |
| 21 |
#include <wingdi.h> |
| 22 |
#endif |
| 23 |
|
| 24 |
#ifdef __cplusplus |
| 25 |
extern "C" { |
| 26 |
#endif |
| 27 |
|
| 28 |
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
| 29 |
|
| 30 |
WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD number_of_mouse_buttons); |
| 31 |
|
| 32 |
#if (_WIN32_WINNT >= 0x0500) |
| 33 |
|
| 34 |
WINBASEAPI COORD WINAPI GetConsoleFontSize(HANDLE console_output, DWORD font); |
| 35 |
WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFont(HANDLE console_output, WINBOOL maximum_window, PCONSOLE_FONT_INFO console_current_font); |
| 36 |
|
| 37 |
#ifndef NOGDI |
| 38 |
|
| 39 |
typedef struct _CONSOLE_FONT_INFOEX { |
| 40 |
ULONG cbSize; |
| 41 |
DWORD nFont; |
| 42 |
COORD dwFontSize; |
| 43 |
UINT FontFamily; |
| 44 |
UINT FontWeight; |
| 45 |
WCHAR FaceName[LF_FACESIZE]; |
| 46 |
} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX; |
| 47 |
|
| 48 |
WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFontEx(HANDLE console_output, WINBOOL maximum_window, PCONSOLE_FONT_INFOEX console_current_font_ex); |
| 49 |
WINBASEAPI WINBOOL WINAPI SetCurrentConsoleFontEx(HANDLE console_output, WINBOOL maximum_window, PCONSOLE_FONT_INFOEX console_current_font_ex); |
| 50 |
|
| 51 |
#endif /* !NOGDI */ |
| 52 |
|
| 53 |
#define CONSOLE_NO_SELECTION 0x0000 |
| 54 |
#define CONSOLE_SELECTION_IN_PROGRESS 0x0001 |
| 55 |
#define CONSOLE_SELECTION_NOT_EMPTY 0x0002 |
| 56 |
#define CONSOLE_MOUSE_SELECTION 0x0004 |
| 57 |
#define CONSOLE_MOUSE_DOWN 0x0008 |
| 58 |
|
| 59 |
typedef struct _CONSOLE_SELECTION_INFO { |
| 60 |
DWORD dwFlags; |
| 61 |
COORD dwSelectionAnchor; |
| 62 |
SMALL_RECT srSelection; |
| 63 |
} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO; |
| 64 |
|
| 65 |
WINBASEAPI WINBOOL WINAPI GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO console_selection_info); |
| 66 |
|
| 67 |
#define HISTORY_NO_DUP_FLAG 0x1 |
| 68 |
|
| 69 |
typedef struct _CONSOLE_HISTORY_INFO { |
| 70 |
UINT cbSize; |
| 71 |
UINT HistoryBufferSize; |
| 72 |
UINT NumberOfHistoryBuffers; |
| 73 |
DWORD dwFlags; |
| 74 |
} CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO; |
| 75 |
|
| 76 |
WINBASEAPI WINBOOL WINAPI GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO console_history_info); |
| 77 |
WINBASEAPI WINBOOL WINAPI SetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO console_history_info); |
| 78 |
|
| 79 |
#define CONSOLE_FULLSCREEN 1 |
| 80 |
#define CONSOLE_FULLSCREEN_HARDWARE 2 |
| 81 |
|
| 82 |
WINBASEAPI WINBOOL APIENTRY GetConsoleDisplayMode(LPDWORD mode_flags); |
| 83 |
|
| 84 |
#define CONSOLE_FULLSCREEN_MODE 1 |
| 85 |
#define CONSOLE_WINDOWED_MODE 2 |
| 86 |
|
| 87 |
WINBASEAPI WINBOOL APIENTRY SetConsoleDisplayMode(HANDLE console_output, DWORD flags, PCOORD new_screen_buffer_dimensions); |
| 88 |
WINBASEAPI HWND APIENTRY GetConsoleWindow(void); |
| 89 |
|
| 90 |
#endif /* _WIN32_WINNT >= 0x0500 */ |
| 91 |
|
| 92 |
#if (_WIN32_WINNT >= 0x0501) |
| 93 |
|
| 94 |
WINBASEAPI WINBOOL APIENTRY AddConsoleAliasA(LPSTR source, LPSTR target, LPSTR exe_name); |
| 95 |
WINBASEAPI WINBOOL APIENTRY AddConsoleAliasW(LPWSTR source, LPWSTR target, LPWSTR exe_name); |
| 96 |
#define AddConsoleAlias __MINGW_NAME_AW(AddConsoleAlias) |
| 97 |
|
| 98 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasA(LPSTR source, LPSTR target_buffer, DWORD target_buffer_length, LPSTR exe_name); |
| 99 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasW(LPWSTR source, LPWSTR target_buffer, DWORD target_buffer_length, LPWSTR exe_name); |
| 100 |
#define GetConsoleAlias __MINGW_NAME_AW(GetConsoleAlias) |
| 101 |
|
| 102 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasesLengthA(LPSTR exe_name); |
| 103 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasesLengthW(LPWSTR exe_name); |
| 104 |
#define GetConsoleAliasesLength __MINGW_NAME_AW(GetConsoleAliasesLength) |
| 105 |
|
| 106 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasExesLengthA(void); |
| 107 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasExesLengthW(void); |
| 108 |
#define GetConsoleAliasExesLength __MINGW_NAME_AW(GetConsoleAliasExesLength) |
| 109 |
|
| 110 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasesA(LPSTR alias_buffer, DWORD alias_buffer_length, LPSTR exe_name); |
| 111 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasesW(LPWSTR alias_buffer, DWORD alias_buffer_length, LPWSTR exe_name); |
| 112 |
#define GetConsoleAliases __MINGW_NAME_AW(GetConsoleAliases) |
| 113 |
|
| 114 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasExesA(LPSTR exe_name_buffer, DWORD exe_name_buffer_length); |
| 115 |
WINBASEAPI DWORD APIENTRY GetConsoleAliasExesW(LPWSTR exe_name_buffer, DWORD exe_name_buffer_length); |
| 116 |
#define GetConsoleAliasExes __MINGW_NAME_AW(GetConsoleAliasExes) |
| 117 |
|
| 118 |
#endif /* _WIN32_WINNT >= 0x0501 */ |
| 119 |
|
| 120 |
WINBASEAPI void APIENTRY ExpungeConsoleCommandHistoryA(LPSTR exe_name); |
| 121 |
WINBASEAPI void APIENTRY ExpungeConsoleCommandHistoryW(LPWSTR exe_name); |
| 122 |
#define ExpungeConsoleCommandHistory __MINGW_NAME_AW(ExpungeConsoleCommandHistory) |
| 123 |
|
| 124 |
WINBASEAPI WINBOOL APIENTRY SetConsoleNumberOfCommandsA(DWORD number, LPSTR exe_name); |
| 125 |
WINBASEAPI WINBOOL APIENTRY SetConsoleNumberOfCommandsW(DWORD number, LPWSTR exe_name); |
| 126 |
#define SetConsoleNumberOfCommands __MINGW_NAME_AW(SetConsoleNumberOfCommands) |
| 127 |
|
| 128 |
WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryLengthA(LPSTR exe_name); |
| 129 |
WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryLengthW(LPWSTR exe_name); |
| 130 |
#define GetConsoleCommandHistoryLength __MINGW_NAME_AW(GetConsoleCommandHistoryLength) |
| 131 |
|
| 132 |
WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryA(LPSTR commands, DWORD command_buffer_length, LPSTR exe_name); |
| 133 |
WINBASEAPI DWORD APIENTRY GetConsoleCommandHistoryW(LPWSTR commands, DWORD command_buffer_length, LPWSTR exe_name); |
| 134 |
#define GetConsoleCommandHistory __MINGW_NAME_AW(GetConsoleCommandHistory) |
| 135 |
|
| 136 |
#if (_WIN32_WINNT >= 0x0501) |
| 137 |
WINBASEAPI DWORD APIENTRY GetConsoleProcessList(LPDWORD process_list, DWORD process_count); |
| 138 |
#endif /* _WIN32_WINNT >= 0x0501 */ |
| 139 |
|
| 140 |
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ |
| 141 |
|
| 142 |
#ifdef __cplusplus |
| 143 |
} |
| 144 |
#endif |
| 145 |
|
| 146 |
#endif /* _APISETCONSOLEL3_ */ |