reactos/win32ss/user/consrv/settings.h
Hermès Bélusca-Maïto 53eba1ba5f [CONSOLE.DLL-CONSRV]
- Further separate properties of the GUI terminal front-end and those independent of the UI.
- Fix some console initialization steps.

svn path=/branches/ros-csrss/; revision=58605
2013-03-24 17:08:10 +00:00

96 lines
2.9 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Console Server DLL
* FILE: win32ss/user/consrv/settings.h
* PURPOSE: Consoles settings management
* PROGRAMMERS: Hermes Belusca - Maito
*
* NOTE: Adapted from existing code.
*/
#pragma once
/* STRUCTURES *****************************************************************/
/*
* Structure used to hold terminal-specific information
*/
typedef struct _TERMINAL_INFO
{
ULONG Size; /* Size of the memory buffer pointed by TermInfo */
PVOID TermInfo; /* Address (or offset when talking to console.dll) of the memory buffer holding terminal information */
} TERMINAL_INFO, *PTERMINAL_INFO;
/*
* Structure used to hold console information
*/
typedef struct _CONSOLE_INFO
{
ULONG HistoryBufferSize;
ULONG NumberOfHistoryBuffers;
BOOLEAN HistoryNoDup;
/* BOOLEAN */ ULONG FullScreen; /* Give the type of console: GUI (windowed) or TUI (fullscreen) */
BOOLEAN QuickEdit;
BOOLEAN InsertMode;
ULONG InputBufferSize;
COORD ScreenBufferSize;
/* SIZE */ COORD ConsoleSize; /* The size of the console */
BOOLEAN CursorBlinkOn;
BOOLEAN ForceCursorOff;
ULONG CursorSize;
USHORT ScreenAttrib; // CHAR_INFO ScreenFillAttrib
USHORT PopupAttrib;
COLORREF Colors[16]; /* Color palette */
ULONG CodePage;
WCHAR ConsoleTitle[MAX_PATH + 1];
} CONSOLE_INFO, *PCONSOLE_INFO;
#define RGBFromAttrib(Console, Attribute) ((Console)->Colors[(Attribute) & 0xF])
#define TextAttribFromAttrib(Attribute) ((Attribute) & 0xF)
#define BkgdAttribFromAttrib(Attribute) (((Attribute) >> 4) & 0xF)
#define MakeAttrib(TextAttrib, BkgdAttrib) (DWORD)((((BkgdAttrib) & 0xF) << 4) | ((TextAttrib) & 0xF))
/*
* Structure used to communicate with console.dll
*/
typedef struct _CONSOLE_PROPS
{
HWND hConsoleWindow;
BOOL ShowDefaultParams;
BOOLEAN AppliedConfig;
DWORD ActiveStaticControl;
CONSOLE_INFO ci; /* Console-specific informations */
TERMINAL_INFO TerminalInfo; /* Frontend-specific parameters */
} CONSOLE_PROPS, *PCONSOLE_PROPS;
/* FUNCTIONS ******************************************************************/
#ifndef CONSOLE_H__ // If we aren't included by console.dll
BOOL ConSrvOpenUserSettings(DWORD ProcessId,
LPCWSTR ConsoleTitle,
PHKEY hSubKey,
REGSAM samDesired,
BOOL bCreate);
BOOL ConSrvReadUserSettings(IN OUT PCONSOLE_INFO ConsoleInfo,
IN DWORD ProcessId);
BOOL ConSrvWriteUserSettings(IN PCONSOLE_INFO ConsoleInfo,
IN DWORD ProcessId);
VOID ConSrvGetDefaultSettings(IN OUT PCONSOLE_INFO ConsoleInfo,
IN DWORD ProcessId);
VOID ConSrvApplyUserSettings(IN PCONSOLE Console,
IN PCONSOLE_INFO ConsoleInfo);
#endif
/* EOF */