update for HEAD-2003021201
[reactos.git] / 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 #if 0
64 NTSTATUS
65 SetConsoleMode(HANDLE hConsoleHandle,
66                ULONG dwMode);
67 #endif
68
69 VOID
70 ConInKey(PINPUT_RECORD Buffer);
71
72 VOID
73 ConOutChar(CHAR c);
74
75 VOID
76 ConOutPuts(LPSTR szText);
77
78 VOID
79 ConOutPrintf(LPSTR szFormat, ...);
80
81 SHORT
82 GetCursorX(VOID);
83
84 SHORT
85 GetCursorY(VOID);
86
87 VOID
88 GetScreenSize(SHORT *maxx,
89               SHORT *maxy);
90
91
92 VOID
93 SetCursorType(BOOL bInsert,
94               BOOL bVisible);
95
96 VOID
97 SetCursorXY(SHORT x,
98             SHORT y);
99
100
101 VOID
102 ClearScreen(VOID);
103
104 VOID
105 SetStatusText(PCHAR Text);
106
107 VOID
108 SetTextXY(SHORT x, SHORT y, PCHAR Text);
109
110 VOID
111 SetInputTextXY(SHORT x, SHORT y, SHORT len, PWCHAR Text);
112
113 VOID
114 SetUnderlinedTextXY(SHORT x, SHORT y, PCHAR Text);
115
116 VOID
117 SetInvertedTextXY(SHORT x, SHORT y, PCHAR Text);
118
119 VOID
120 SetHighlightedTextXY(SHORT x, SHORT y, PCHAR Text);
121
122 VOID
123 PrintTextXY(SHORT x, SHORT y, char* fmt, ...);
124
125 VOID
126 PrintTextXYN(SHORT x, SHORT y, SHORT len, char* fmt, ...);
127
128 #endif /* __CONSOLE_H__*/
129
130 /* EOF */