[CMD]: Continue refactoring to lay out the way to using the CONUTILS library in CMD...
[reactos.git] / reactos / base / shell / cmd / console.h
1
2 #pragma once
3
4 /* Cache codepage */
5 extern UINT InputCodePage;
6 extern UINT OutputCodePage;
7
8 // /* Global variables */
9 // extern BOOL bCtrlBreak;
10 // extern BOOL bIgnoreEcho;
11 // extern BOOL bExit;
12
13 VOID ConInDummy (VOID);
14 VOID ConInDisable (VOID);
15 VOID ConInEnable (VOID);
16 VOID ConInFlush (VOID);
17 VOID ConInKey (PINPUT_RECORD);
18 VOID ConInString (LPTSTR, DWORD);
19
20
21 VOID ConOutChar (TCHAR);
22 VOID ConErrChar (TCHAR);
23 VOID ConPrintfV(DWORD, LPTSTR, va_list);
24
25 VOID ConPuts(DWORD nStdHandle, LPTSTR szText);
26 VOID ConPrintf(DWORD nStdHandle, LPTSTR szFormat, ...);
27 VOID ConResPuts(DWORD nStdHandle, UINT resID);
28 VOID ConResPrintf(DWORD nStdHandle, UINT resID, ...);
29 VOID ConFormatMessage(DWORD nStdHandle, DWORD MessageId, ...);
30
31 #define ConOutPuts(szStr) \
32 ConPuts(STD_OUTPUT_HANDLE, (szStr))
33
34 #define ConErrPuts(szStr) \
35 ConPuts(STD_ERROR_HANDLE, (szStr))
36
37 #define ConOutResPuts(uID) \
38 ConResPuts(STD_OUTPUT_HANDLE, (uID))
39
40 #define ConErrResPuts(uID) \
41 ConResPuts(STD_ERROR_HANDLE, (uID))
42
43 #define ConOutPrintf(szStr, ...) \
44 ConPrintf(STD_OUTPUT_HANDLE, (szStr), ##__VA_ARGS__)
45
46 #define ConErrPrintf(szStr, ...) \
47 ConPrintf(STD_ERROR_HANDLE, (szStr), ##__VA_ARGS__)
48
49 #define ConOutResPrintf(uID, ...) \
50 ConResPrintf(STD_OUTPUT_HANDLE, (uID), ##__VA_ARGS__)
51
52 #define ConErrResPrintf(uID, ...) \
53 ConResPrintf(STD_ERROR_HANDLE, (uID), ##__VA_ARGS__)
54
55 #define ConOutFormatMessage(MessageId, ...) \
56 ConFormatMessage(STD_OUTPUT_HANDLE, (MessageId), ##__VA_ARGS__)
57
58 #define ConErrFormatMessage(MessageId, ...) \
59 ConFormatMessage(STD_ERROR_HANDLE, (MessageId), ##__VA_ARGS__)
60
61
62 INT ConPrintfVPaging(DWORD nStdHandle, BOOL, LPTSTR, va_list);
63 INT ConOutPrintfPaging (BOOL NewPage, LPTSTR, ...);
64 VOID ConOutResPaging(BOOL NewPage, UINT resID);
65
66 SHORT GetCursorX (VOID);
67 SHORT GetCursorY (VOID);
68 VOID GetCursorXY (PSHORT, PSHORT);
69 VOID SetCursorXY (SHORT, SHORT);
70
71 VOID GetScreenSize (PSHORT, PSHORT);
72 VOID SetCursorType (BOOL, BOOL);
73
74
75 BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle);
76
77 #ifdef INCLUDE_CMD_BEEP
78 VOID ConRingBell(HANDLE hOutput);
79 #endif
80
81 #ifdef INCLUDE_CMD_CLS
82 VOID ConClearScreen(HANDLE hOutput);
83 #endif
84
85 #ifdef INCLUDE_CMD_COLOR
86 BOOL ConSetScreenColor(WORD wColor, BOOL bFill);
87 #endif
88
89 // TCHAR cgetchar (VOID);
90 // BOOL CheckCtrlBreak (INT);
91
92 // #define PROMPT_NO 0
93 // #define PROMPT_YES 1
94 // #define PROMPT_ALL 2
95 // #define PROMPT_BREAK 3
96
97 // INT PagePrompt (VOID);
98 // INT FilePromptYN (UINT);
99 // INT FilePromptYNA (UINT);