Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / base / setup / usetup / interface / consup.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2002 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: subsys/system/usetup/console.h
23 * PURPOSE: Console support functions
24 * PROGRAMMER: Eric Kohl
25 */
26
27 #pragma once
28
29 #define FOREGROUND_WHITE (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
30 #define FOREGROUND_YELLOW (FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN)
31 #define BACKGROUND_WHITE (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE)
32
33 /* Text style */
34 #define TEXT_STYLE_NORMAL 0x00000001
35 #define TEXT_STYLE_HIGHLIGHT 0x00000002
36 #define TEXT_STYLE_UNDERLINE 0x00000004
37
38 /* Text type */
39 #define TEXT_TYPE_REGULAR 0x00000008
40 #define TEXT_TYPE_STATUS 0x00000010
41
42 /* Text align */
43 #define TEXT_ALIGN_DEFAULT 0x00000020
44 #define TEXT_ALIGN_RIGHT 0x00000040
45 #define TEXT_ALIGN_LEFT 0x00000080
46 #define TEXT_ALIGN_CENTER 0x00000100
47
48 /* Text padding */
49 #define TEXT_PADDING_SMALL 0x00000200 /* One space */
50 #define TEXT_PADDING_MEDIUM 0x00000400 /* Two spaces */
51 #define TEXT_PADDING_BIG 0x00000800 /* Three spaces */
52
53 extern HANDLE StdInput, StdOutput;
54 extern SHORT xScreen, yScreen;
55
56 BOOLEAN
57 CONSOLE_Init(
58 VOID);
59
60 VOID
61 CONSOLE_ClearScreen(VOID);
62
63 VOID
64 CONSOLE_ConInKey(
65 OUT PINPUT_RECORD Buffer);
66
67 VOID
68 CONSOLE_ConOutChar(
69 IN CHAR c);
70
71 VOID
72 CONSOLE_ConOutPrintf(
73 IN LPCSTR szFormat, ...);
74
75 VOID
76 CONSOLE_ConOutPuts(
77 IN LPCSTR szText);
78
79 BOOL
80 CONSOLE_Flush(VOID);
81
82 SHORT
83 CONSOLE_GetCursorX(VOID);
84
85 SHORT
86 CONSOLE_GetCursorY(VOID);
87
88 VOID
89 CONSOLE_InvertTextXY(
90 IN SHORT x,
91 IN SHORT y,
92 IN SHORT col,
93 IN SHORT row);
94
95 VOID
96 CONSOLE_NormalTextXY(
97 IN SHORT x,
98 IN SHORT y,
99 IN SHORT col,
100 IN SHORT row);
101
102 VOID
103 CONSOLE_PrintTextXY(
104 IN SHORT x,
105 IN SHORT y,
106 IN LPCSTR fmt, ...);
107
108 VOID
109 CONSOLE_PrintTextXYN(
110 IN SHORT x,
111 IN SHORT y,
112 IN SHORT len,
113 IN LPCSTR fmt, ...);
114
115 VOID
116 CONSOLE_SetCursorType(
117 IN BOOL bInsert,
118 IN BOOL bVisible);
119
120 VOID
121 CONSOLE_SetCursorXY(
122 IN SHORT x,
123 IN SHORT y);
124
125 VOID
126 CONSOLE_SetCursorXY(
127 IN SHORT x,
128 IN SHORT y);
129
130 VOID
131 CONSOLE_SetHighlightedTextXY(
132 IN SHORT x,
133 IN SHORT y,
134 IN LPCSTR Text);
135
136 VOID
137 CONSOLE_SetInputTextXY(
138 IN SHORT x,
139 IN SHORT y,
140 IN SHORT len,
141 IN LPCWSTR Text);
142
143 VOID
144 CONSOLE_SetInputTextXY(
145 IN SHORT x,
146 IN SHORT y,
147 IN SHORT len,
148 IN LPCWSTR Text);
149
150 VOID
151 CONSOLE_SetInvertedTextXY(
152 IN SHORT x,
153 IN SHORT y,
154 IN LPCSTR Text);
155
156 VOID
157 CONSOLE_SetStatusText(
158 IN LPCSTR fmt, ...);
159
160 VOID
161 CONSOLE_SetStatusTextX(
162 IN SHORT x,
163 IN LPCSTR fmt, ...);
164
165 VOID
166 CONSOLE_SetStatusTextAutoFitX(
167 IN SHORT x,
168 IN LPCSTR fmt, ...);
169
170 VOID
171 CONSOLE_SetTextXY(
172 IN SHORT x,
173 IN SHORT y,
174 IN LPCSTR Text);
175
176 VOID
177 CONSOLE_SetUnderlinedTextXY(
178 IN SHORT x,
179 IN SHORT y,
180 IN LPCSTR Text);
181
182 VOID
183 CONSOLE_SetStyledText(
184 IN SHORT x,
185 IN SHORT y,
186 IN INT Flags,
187 IN LPCSTR Text);
188
189 VOID
190 CONSOLE_ClearStyledText(IN SHORT x,
191 IN SHORT y,
192 IN INT Flags,
193 IN SHORT Length);
194
195 /* EOF */