2017-09-30 15:09:38 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-10-01 16:30:39 +00:00
|
|
|
/* Cache codepage for text streams */
|
2017-09-30 15:09:38 +00:00
|
|
|
extern UINT InputCodePage;
|
|
|
|
extern UINT OutputCodePage;
|
|
|
|
|
2017-10-01 16:30:39 +00:00
|
|
|
/* Global console Screen and Pager */
|
|
|
|
extern CON_SCREEN StdOutScreen;
|
|
|
|
extern CON_PAGER StdOutPager;
|
|
|
|
|
2017-09-30 15:09:38 +00:00
|
|
|
// /* Global variables */
|
|
|
|
// extern BOOL bCtrlBreak;
|
|
|
|
// extern BOOL bIgnoreEcho;
|
|
|
|
// extern BOOL bExit;
|
|
|
|
|
|
|
|
VOID ConInDisable (VOID);
|
|
|
|
VOID ConInEnable (VOID);
|
|
|
|
VOID ConInFlush (VOID);
|
|
|
|
VOID ConInKey (PINPUT_RECORD);
|
|
|
|
VOID ConInString (LPTSTR, DWORD);
|
|
|
|
|
2017-09-30 19:52:30 +00:00
|
|
|
|
2017-10-01 16:30:39 +00:00
|
|
|
VOID ConOutChar(TCHAR);
|
|
|
|
VOID ConErrChar(TCHAR);
|
2017-09-30 19:52:30 +00:00
|
|
|
|
2017-10-01 16:30:39 +00:00
|
|
|
VOID __cdecl ConFormatMessage(PCON_STREAM Stream, DWORD MessageId, ...);
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConOutPuts(szStr) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConPuts(StdOut, (szStr))
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConErrPuts(szStr) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConPuts(StdErr, (szStr))
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConOutResPuts(uID) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConResPuts(StdOut, (uID))
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConErrResPuts(uID) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConResPuts(StdErr, (uID))
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConOutPrintf(szStr, ...) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConPrintf(StdOut, (szStr), ##__VA_ARGS__)
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConErrPrintf(szStr, ...) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConPrintf(StdErr, (szStr), ##__VA_ARGS__)
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConOutResPrintf(uID, ...) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConResPrintf(StdOut, (uID), ##__VA_ARGS__)
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConErrResPrintf(uID, ...) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConResPrintf(StdErr, (uID), ##__VA_ARGS__)
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConOutFormatMessage(MessageId, ...) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConFormatMessage(StdOut, (MessageId), ##__VA_ARGS__)
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
#define ConErrFormatMessage(MessageId, ...) \
|
2017-10-01 16:30:39 +00:00
|
|
|
ConFormatMessage(StdErr, (MessageId), ##__VA_ARGS__)
|
2017-09-30 19:52:30 +00:00
|
|
|
|
|
|
|
|
2017-10-01 16:30:39 +00:00
|
|
|
BOOL ConPrintfVPaging(PCON_PAGER Pager, BOOL StartPaging, LPTSTR szFormat, va_list arg_ptr);
|
|
|
|
BOOL __cdecl ConOutPrintfPaging(BOOL StartPaging, LPTSTR szFormat, ...);
|
|
|
|
VOID ConOutResPaging(BOOL StartPaging, UINT resID);
|
2017-09-30 15:09:38 +00:00
|
|
|
|
|
|
|
SHORT GetCursorX (VOID);
|
|
|
|
SHORT GetCursorY (VOID);
|
|
|
|
VOID GetCursorXY (PSHORT, PSHORT);
|
|
|
|
VOID SetCursorXY (SHORT, SHORT);
|
|
|
|
|
|
|
|
VOID GetScreenSize (PSHORT, PSHORT);
|
|
|
|
VOID SetCursorType (BOOL, BOOL);
|
|
|
|
|
|
|
|
|
2017-09-30 21:37:34 +00:00
|
|
|
#ifdef INCLUDE_CMD_COLOR
|
|
|
|
BOOL ConGetDefaultAttributes(PWORD pwDefAttr);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2017-09-30 15:09:38 +00:00
|
|
|
BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle);
|
|
|
|
|
|
|
|
#ifdef INCLUDE_CMD_BEEP
|
|
|
|
VOID ConRingBell(HANDLE hOutput);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef INCLUDE_CMD_COLOR
|
2017-09-30 21:05:49 +00:00
|
|
|
BOOL ConSetScreenColor(HANDLE hOutput, WORD wColor, BOOL bFill);
|
2017-09-30 15:09:38 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// TCHAR cgetchar (VOID);
|
|
|
|
// BOOL CheckCtrlBreak (INT);
|
|
|
|
|
|
|
|
// #define PROMPT_NO 0
|
|
|
|
// #define PROMPT_YES 1
|
|
|
|
// #define PROMPT_ALL 2
|
|
|
|
// #define PROMPT_BREAK 3
|
|
|
|
|
|
|
|
// INT FilePromptYN (UINT);
|
|
|
|
// INT FilePromptYNA (UINT);
|
2023-07-16 22:03:22 +00:00
|
|
|
|
|
|
|
SIZE_T ConGetTextWidthA(PCSTR pszText);
|
|
|
|
SIZE_T ConGetTextWidthW(PCWSTR pszText);
|
|
|
|
|
|
|
|
#ifdef UNICODE
|
|
|
|
#define ConGetTextWidth ConGetTextWidthW
|
|
|
|
#else
|
|
|
|
#define ConGetTextWidth ConGetTextWidthA
|
|
|
|
#endif
|