Patch by Jonathon Wilson:
[reactos.git] / reactos / subsys / system / usetup / console.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
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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 __CONSOLE_H__
28 #define __CONSOLE_H__
29
30 #include <ntos/keyboard.h>
31
32
33 NTSTATUS
34 AllocConsole(VOID);
35
36 VOID
37 FreeConsole(VOID);
38
39
40 NTSTATUS
41 ReadConsoleOutputCharacters(LPSTR lpCharacter,
42 ULONG nLength,
43 COORD dwReadCoord,
44 PULONG lpNumberOfCharsRead);
45
46 NTSTATUS
47 ReadConsoleOutputAttributes(PUSHORT lpAttribute,
48 ULONG nLength,
49 COORD dwReadCoord,
50 PULONG lpNumberOfAttrsRead);
51
52 NTSTATUS
53 WriteConsoleOutputCharacters(LPCSTR lpCharacter,
54 ULONG nLength,
55 COORD dwWriteCoord);
56
57 NTSTATUS
58 WriteConsoleOutputAttributes(CONST USHORT *lpAttribute,
59 ULONG nLength,
60 COORD dwWriteCoord,
61 PULONG lpNumberOfAttrsWritten);
62
63 NTSTATUS
64 FillConsoleOutputAttribute(USHORT wAttribute,
65 ULONG nLength,
66 COORD dwWriteCoord,
67 PULONG lpNumberOfAttrsWritten);
68 NTSTATUS
69 FillConsoleOutputCharacter(CHAR Character,
70 ULONG Length,
71 COORD WriteCoord,
72 PULONG NumberOfCharsWritten);
73
74 #if 0
75 NTSTATUS
76 SetConsoleMode(HANDLE hConsoleHandle,
77 ULONG dwMode);
78 #endif
79
80 VOID
81 ConInKey(PINPUT_RECORD Buffer);
82
83 VOID
84 ConOutChar(CHAR c);
85
86 VOID
87 ConOutPuts(LPSTR szText);
88
89 VOID
90 ConOutPrintf(LPSTR szFormat, ...);
91
92 SHORT
93 GetCursorX(VOID);
94
95 SHORT
96 GetCursorY(VOID);
97
98 VOID
99 GetScreenSize(SHORT *maxx,
100 SHORT *maxy);
101
102
103 VOID
104 SetCursorType(BOOL bInsert,
105 BOOL bVisible);
106
107 VOID
108 SetCursorXY(SHORT x,
109 SHORT y);
110
111
112 VOID
113 ClearScreen(VOID);
114
115 VOID
116 SetStatusText(char* fmt, ...);
117
118 VOID
119 SetTextXY(SHORT x, SHORT y, PCHAR Text);
120
121 VOID
122 SetInputTextXY(SHORT x, SHORT y, SHORT len, PWCHAR Text);
123
124 VOID
125 SetUnderlinedTextXY(SHORT x, SHORT y, PCHAR Text);
126
127 VOID
128 SetInvertedTextXY(SHORT x, SHORT y, PCHAR Text);
129
130 VOID
131 SetHighlightedTextXY(SHORT x, SHORT y, PCHAR Text);
132
133 VOID
134 PrintTextXY(SHORT x, SHORT y, char* fmt, ...);
135
136 VOID
137 PrintTextXYN(SHORT x, SHORT y, SHORT len, char* fmt, ...);
138
139 #endif /* __CONSOLE_H__*/
140
141 /* EOF */