Reactos
at listview 106 lines 2.5 kB view raw
1 2#pragma once 3 4/* Cache codepage for text streams */ 5extern UINT InputCodePage; 6extern UINT OutputCodePage; 7 8/* Global console Screen and Pager */ 9extern CON_SCREEN StdOutScreen; 10extern CON_PAGER StdOutPager; 11 12// /* Global variables */ 13// extern BOOL bCtrlBreak; 14// extern BOOL bIgnoreEcho; 15// extern BOOL bExit; 16 17VOID ConInDisable (VOID); 18VOID ConInEnable (VOID); 19VOID ConInFlush (VOID); 20VOID ConInKey (PINPUT_RECORD); 21VOID ConInString (LPTSTR, DWORD); 22 23 24VOID ConOutChar(TCHAR); 25VOID ConErrChar(TCHAR); 26 27VOID __cdecl ConFormatMessage(PCON_STREAM Stream, DWORD MessageId, ...); 28 29#define ConOutPuts(szStr) \ 30 ConPuts(StdOut, (szStr)) 31 32#define ConErrPuts(szStr) \ 33 ConPuts(StdErr, (szStr)) 34 35#define ConOutResPuts(uID) \ 36 ConResPuts(StdOut, (uID)) 37 38#define ConErrResPuts(uID) \ 39 ConResPuts(StdErr, (uID)) 40 41#define ConOutPrintf(szStr, ...) \ 42 ConPrintf(StdOut, (szStr), ##__VA_ARGS__) 43 44#define ConErrPrintf(szStr, ...) \ 45 ConPrintf(StdErr, (szStr), ##__VA_ARGS__) 46 47#define ConOutResPrintf(uID, ...) \ 48 ConResPrintf(StdOut, (uID), ##__VA_ARGS__) 49 50#define ConErrResPrintf(uID, ...) \ 51 ConResPrintf(StdErr, (uID), ##__VA_ARGS__) 52 53#define ConOutFormatMessage(MessageId, ...) \ 54 ConFormatMessage(StdOut, (MessageId), ##__VA_ARGS__) 55 56#define ConErrFormatMessage(MessageId, ...) \ 57 ConFormatMessage(StdErr, (MessageId), ##__VA_ARGS__) 58 59 60BOOL ConPrintfVPaging(PCON_PAGER Pager, BOOL StartPaging, LPTSTR szFormat, va_list arg_ptr); 61BOOL __cdecl ConOutPrintfPaging(BOOL StartPaging, LPTSTR szFormat, ...); 62VOID ConOutResPaging(BOOL StartPaging, UINT resID); 63 64SHORT GetCursorX (VOID); 65SHORT GetCursorY (VOID); 66VOID GetCursorXY (PSHORT, PSHORT); 67VOID SetCursorXY (SHORT, SHORT); 68 69VOID GetScreenSize (PSHORT, PSHORT); 70VOID SetCursorType (BOOL, BOOL); 71 72 73#ifdef INCLUDE_CMD_COLOR 74BOOL ConGetDefaultAttributes(PWORD pwDefAttr); 75#endif 76 77 78BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle); 79 80#ifdef INCLUDE_CMD_BEEP 81VOID ConRingBell(HANDLE hOutput); 82#endif 83 84#ifdef INCLUDE_CMD_COLOR 85BOOL ConSetScreenColor(HANDLE hOutput, WORD wColor, BOOL bFill); 86#endif 87 88// TCHAR cgetchar (VOID); 89// BOOL CheckCtrlBreak (INT); 90 91// #define PROMPT_NO 0 92// #define PROMPT_YES 1 93// #define PROMPT_ALL 2 94// #define PROMPT_BREAK 3 95 96// INT FilePromptYN (UINT); 97// INT FilePromptYNA (UINT); 98 99SIZE_T ConGetTextWidthA(PCSTR pszText); 100SIZE_T ConGetTextWidthW(PCWSTR pszText); 101 102#ifdef UNICODE 103 #define ConGetTextWidth ConGetTextWidthW 104#else 105 #define ConGetTextWidth ConGetTextWidthA 106#endif