mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 16:48:14 +00:00
![Hermès Bélusca-Maïto](/assets/img/avatar_default.png)
As code grows, this will allow for better maintenance of the console stream code. In particular the input stream module will contain special code for handling TTYs, and this is something not all console programs will need. Having this code in a separate module will allow for the linker to possibly remove this code when it is unused.
67 lines
1.2 KiB
C
67 lines
1.2 KiB
C
/*
|
|
* PROJECT: ReactOS Console Utilities Library
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
* PURPOSE: Console/terminal screen management.
|
|
* COPYRIGHT: Copyright 2017-2018 ReactOS Team
|
|
* Copyright 2017-2018 Hermes Belusca-Maito
|
|
*/
|
|
|
|
#ifndef __SCREEN_H__
|
|
#define __SCREEN_H__
|
|
|
|
#pragma once
|
|
|
|
#ifndef _UNICODE
|
|
#error The ConUtils library at the moment only supports compilation with _UNICODE defined!
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
#if 0
|
|
|
|
VOID
|
|
ConClearLine(IN PCON_STREAM Stream);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <wincon.h>
|
|
|
|
typedef struct _CON_SCREEN
|
|
{
|
|
PCON_STREAM Stream; // Out
|
|
// PCON_STREAM In;
|
|
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
|
CONSOLE_CURSOR_INFO cci;
|
|
} CON_SCREEN, *PCON_SCREEN;
|
|
|
|
#define INIT_CON_SCREEN(pStream) {(pStream)} /* {(pStream), {{}}, {{}}} */
|
|
|
|
#define InitializeConScreen(pScreen, pStream) \
|
|
do { \
|
|
(pScreen)->Stream = (pStream); \
|
|
RtlZeroMemory(&(pScreen)->csbi, sizeof((pScreen)->csbi)); \
|
|
RtlZeroMemory(&(pScreen)->cci , sizeof((pScreen)->cci )); \
|
|
} while (0)
|
|
|
|
BOOL
|
|
ConGetScreenInfo(
|
|
IN PCON_SCREEN Screen,
|
|
OUT PCONSOLE_SCREEN_BUFFER_INFO pcsbi);
|
|
|
|
VOID
|
|
ConClearScreen(IN PCON_SCREEN Screen);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __SCREEN_H__ */
|
|
|
|
/* EOF */
|