Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers...
[reactos.git] / sdk / lib / conutils / screen.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Utilities Library
4 * FILE: sdk/lib/conutils/screen.h
5 * PURPOSE: Console/terminal screen management.
6 * PROGRAMMERS: - Hermes Belusca-Maito (for the library);
7 * - All programmers who wrote the different console applications
8 * from which I took those functions and improved them.
9 */
10
11 #ifndef __SCREEN_H__
12 #define __SCREEN_H__
13
14 #ifndef _UNICODE
15 #error The ConUtils library at the moment only supports compilation with _UNICODE defined!
16 #endif
17
18
19 #if 0
20
21 VOID
22 ConClearLine(IN PCON_STREAM Stream);
23
24 #endif
25
26
27
28 #include <wincon.h>
29
30 typedef struct _CON_SCREEN
31 {
32 PCON_STREAM Stream; // Out
33 // PCON_STREAM In;
34 CONSOLE_SCREEN_BUFFER_INFO csbi;
35 CONSOLE_CURSOR_INFO cci;
36 } CON_SCREEN, *PCON_SCREEN;
37
38 #define INIT_CON_SCREEN(pStream) {(pStream)} /* {(pStream), {{}}, {{}}} */
39
40 #define InitializeConScreen(pScreen, pStream) \
41 do { \
42 (pScreen)->Stream = (pStream); \
43 RtlZeroMemory(&(pScreen)->csbi, sizeof((pScreen)->csbi)); \
44 RtlZeroMemory(&(pScreen)->cci , sizeof((pScreen)->cci )); \
45 } while (0)
46
47 BOOL
48 ConGetScreenInfo(
49 IN PCON_SCREEN Screen,
50 OUT PCONSOLE_SCREEN_BUFFER_INFO pcsbi);
51
52 VOID
53 ConClearScreen(IN PCON_SCREEN Screen);
54
55
56 #endif /* __SCREEN_H__ */