[CONUTILS] Make the headers C++ compatible.
[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 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22
23 #if 0
24
25 VOID
26 ConClearLine(IN PCON_STREAM Stream);
27
28 #endif
29
30
31
32 #include <wincon.h>
33
34 typedef struct _CON_SCREEN
35 {
36 PCON_STREAM Stream; // Out
37 // PCON_STREAM In;
38 CONSOLE_SCREEN_BUFFER_INFO csbi;
39 CONSOLE_CURSOR_INFO cci;
40 } CON_SCREEN, *PCON_SCREEN;
41
42 #define INIT_CON_SCREEN(pStream) {(pStream)} /* {(pStream), {{}}, {{}}} */
43
44 #define InitializeConScreen(pScreen, pStream) \
45 do { \
46 (pScreen)->Stream = (pStream); \
47 RtlZeroMemory(&(pScreen)->csbi, sizeof((pScreen)->csbi)); \
48 RtlZeroMemory(&(pScreen)->cci , sizeof((pScreen)->cci )); \
49 } while (0)
50
51 BOOL
52 ConGetScreenInfo(
53 IN PCON_SCREEN Screen,
54 OUT PCONSOLE_SCREEN_BUFFER_INFO pcsbi);
55
56 VOID
57 ConClearScreen(IN PCON_SCREEN Screen);
58
59
60 #ifdef __cplusplus
61 }
62 #endif
63 #endif /* __SCREEN_H__ */