- Update address of Free Software Foundation.
[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 #ifndef __CONSUP_H__
28 #define __CONSUP_H__
29
30 #define FOREGROUND_WHITE (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
31 #define FOREGROUND_YELLOW (FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN)
32 #define BACKGROUND_WHITE (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE)
33
34 /* Text style */
35 #define TEXT_STYLE_NORMAL 0x00000001
36 #define TEXT_STYLE_HIGHLIGHT 0x00000002
37 #define TEXT_STYLE_UNDERLINE 0x00000004
38
39 /* Text type */
40 #define TEXT_TYPE_REGULAR 0x00000008
41 #define TEXT_TYPE_STATUS 0x00000010
42
43 /* Text align */
44 #define TEXT_ALIGN_DEFAULT 0x00000020
45 #define TEXT_ALIGN_RIGHT 0x00000040
46 #define TEXT_ALIGN_LEFT 0x00000080
47 #define TEXT_ALIGN_CENTER 0x00000100
48
49 /* Text padding */
50 #define TEXT_PADDING_SMALL 0x00000200 /* One space */
51 #define TEXT_PADDING_MEDIUM 0x00000400 /* Two spaces */
52 #define TEXT_PADDING_BIG 0x00000800 /* Three spaces */
53
54 extern HANDLE StdInput, StdOutput;
55 extern SHORT xScreen, yScreen;
56
57 BOOLEAN
58 CONSOLE_Init(
59 VOID);
60
61 VOID
62 CONSOLE_ClearScreen(VOID);
63
64 VOID
65 CONSOLE_ConInKey(
66 OUT PINPUT_RECORD Buffer);
67
68 VOID
69 CONSOLE_ConOutChar(
70 IN CHAR c);
71
72 VOID
73 CONSOLE_ConOutPrintf(
74 IN LPCSTR szFormat, ...);
75
76 VOID
77 CONSOLE_ConOutPuts(
78 IN LPCSTR szText);
79
80 BOOL
81 CONSOLE_Flush(VOID);
82
83 SHORT
84 CONSOLE_GetCursorX(VOID);
85
86 SHORT
87 CONSOLE_GetCursorY(VOID);
88
89 VOID
90 CONSOLE_InvertTextXY(
91 IN SHORT x,
92 IN SHORT y,
93 IN SHORT col,
94 IN SHORT row);
95
96 VOID
97 CONSOLE_NormalTextXY(
98 IN SHORT x,
99 IN SHORT y,
100 IN SHORT col,
101 IN SHORT row);
102
103 VOID
104 CONSOLE_PrintTextXY(
105 IN SHORT x,
106 IN SHORT y,
107 IN LPCSTR fmt, ...);
108
109 VOID
110 CONSOLE_PrintTextXYN(
111 IN SHORT x,
112 IN SHORT y,
113 IN SHORT len,
114 IN LPCSTR fmt, ...);
115
116 VOID
117 CONSOLE_SetCursorType(
118 IN BOOL bInsert,
119 IN BOOL bVisible);
120
121 VOID
122 CONSOLE_SetCursorXY(
123 IN SHORT x,
124 IN SHORT y);
125
126 VOID
127 CONSOLE_SetCursorXY(
128 IN SHORT x,
129 IN SHORT y);
130
131 VOID
132 CONSOLE_SetHighlightedTextXY(
133 IN SHORT x,
134 IN SHORT y,
135 IN LPCSTR Text);
136
137 VOID
138 CONSOLE_SetInputTextXY(
139 IN SHORT x,
140 IN SHORT y,
141 IN SHORT len,
142 IN LPCWSTR Text);
143
144 VOID
145 CONSOLE_SetInputTextXY(
146 IN SHORT x,
147 IN SHORT y,
148 IN SHORT len,
149 IN LPCWSTR Text);
150
151 VOID
152 CONSOLE_SetInvertedTextXY(
153 IN SHORT x,
154 IN SHORT y,
155 IN LPCSTR Text);
156
157 VOID
158 CONSOLE_SetStatusText(
159 IN LPCSTR fmt, ...);
160
161 VOID
162 CONSOLE_SetStatusTextX(
163 IN SHORT x,
164 IN LPCSTR fmt, ...);
165
166 VOID
167 CONSOLE_SetStatusTextAutoFitX(
168 IN SHORT x,
169 IN LPCSTR fmt, ...);
170
171 VOID
172 CONSOLE_SetTextXY(
173 IN SHORT x,
174 IN SHORT y,
175 IN LPCSTR Text);
176
177 VOID
178 CONSOLE_SetUnderlinedTextXY(
179 IN SHORT x,
180 IN SHORT y,
181 IN LPCSTR Text);
182
183 VOID
184 CONSOLE_SetStyledText(
185 IN SHORT x,
186 IN SHORT y,
187 IN INT Flags,
188 IN LPCSTR Text);
189
190 #endif /* __CONSOLE_H__*/
191
192 /* EOF */