c09a8082affdf678e3444b5e4b18661387dc48fb
[reactos.git] / reactos / 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 VOID
83 CONSOLE_GetCursorXY(
84 PSHORT x,
85 PSHORT y);
86
87 SHORT
88 CONSOLE_GetCursorX(VOID);
89
90 SHORT
91 CONSOLE_GetCursorY(VOID);
92
93 VOID
94 CONSOLE_InvertTextXY(
95 IN SHORT x,
96 IN SHORT y,
97 IN SHORT col,
98 IN SHORT row);
99
100 VOID
101 CONSOLE_NormalTextXY(
102 IN SHORT x,
103 IN SHORT y,
104 IN SHORT col,
105 IN SHORT row);
106
107 VOID
108 CONSOLE_PrintTextXY(
109 IN SHORT x,
110 IN SHORT y,
111 IN LPCSTR fmt, ...);
112
113 VOID
114 CONSOLE_PrintTextXYN(
115 IN SHORT x,
116 IN SHORT y,
117 IN SHORT len,
118 IN LPCSTR fmt, ...);
119
120 VOID
121 CONSOLE_SetCursorType(
122 IN BOOL bInsert,
123 IN BOOL bVisible);
124
125 VOID
126 CONSOLE_SetCursorXY(
127 IN SHORT x,
128 IN SHORT y);
129
130 VOID
131 CONSOLE_SetCursorXY(
132 IN SHORT x,
133 IN SHORT y);
134
135 VOID
136 CONSOLE_SetHighlightedTextXY(
137 IN SHORT x,
138 IN SHORT y,
139 IN LPCSTR Text);
140
141 VOID
142 CONSOLE_SetInputTextXY(
143 IN SHORT x,
144 IN SHORT y,
145 IN SHORT len,
146 IN LPCWSTR Text);
147
148 VOID
149 CONSOLE_SetInputTextXY(
150 IN SHORT x,
151 IN SHORT y,
152 IN SHORT len,
153 IN LPCWSTR Text);
154
155 VOID
156 CONSOLE_SetInvertedTextXY(
157 IN SHORT x,
158 IN SHORT y,
159 IN LPCSTR Text);
160
161 VOID
162 CONSOLE_SetStatusText(
163 IN LPCSTR fmt, ...);
164
165 VOID
166 CONSOLE_SetStatusTextX(
167 IN SHORT x,
168 IN LPCSTR fmt, ...);
169
170 VOID
171 CONSOLE_SetStatusTextAutoFitX(
172 IN SHORT x,
173 IN LPCSTR fmt, ...);
174
175 VOID
176 CONSOLE_SetTextXY(
177 IN SHORT x,
178 IN SHORT y,
179 IN LPCSTR Text);
180
181 VOID
182 CONSOLE_SetUnderlinedTextXY(
183 IN SHORT x,
184 IN SHORT y,
185 IN LPCSTR Text);
186
187 VOID
188 CONSOLE_SetStyledText(
189 IN SHORT x,
190 IN SHORT y,
191 IN INT Flags,
192 IN LPCSTR Text);
193
194 VOID
195 CONSOLE_ClearStyledText(IN SHORT x,
196 IN SHORT y,
197 IN INT Flags,
198 IN SHORT Length);
199
200 /* EOF */