2016-10-22 21:54:29 +00:00
|
|
|
/*
|
2017-10-16 21:58:23 +00:00
|
|
|
* 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
|
2016-10-22 21:54:29 +00:00
|
|
|
*/
|
|
|
|
|
2018-02-01 23:35:08 +00:00
|
|
|
/**
|
|
|
|
* @file screen.h
|
|
|
|
* @ingroup ConUtils
|
|
|
|
*
|
|
|
|
* @brief Console/terminal screen management.
|
|
|
|
**/
|
|
|
|
|
2016-10-22 21:54:29 +00:00
|
|
|
#ifndef __SCREEN_H__
|
|
|
|
#define __SCREEN_H__
|
|
|
|
|
2017-10-16 21:58:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-10-22 21:54:29 +00:00
|
|
|
#ifndef _UNICODE
|
|
|
|
#error The ConUtils library at the moment only supports compilation with _UNICODE defined!
|
|
|
|
#endif
|
|
|
|
|
2018-01-27 14:48:59 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-10-22 21:54:29 +00:00
|
|
|
|
|
|
|
#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;
|
|
|
|
|
2017-10-01 16:03:44 +00:00
|
|
|
#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)
|
|
|
|
|
2016-10-22 21:54:29 +00:00
|
|
|
BOOL
|
|
|
|
ConGetScreenInfo(
|
|
|
|
IN PCON_SCREEN Screen,
|
|
|
|
OUT PCONSOLE_SCREEN_BUFFER_INFO pcsbi);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
ConClearScreen(IN PCON_SCREEN Screen);
|
|
|
|
|
|
|
|
|
2018-01-27 14:48:59 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2017-10-16 21:58:23 +00:00
|
|
|
|
2016-10-22 21:54:29 +00:00
|
|
|
#endif /* __SCREEN_H__ */
|
2017-10-16 21:58:23 +00:00
|
|
|
|
|
|
|
/* EOF */
|