ReactOS 0.4.16-dev-91-g764881a
settings.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: win32ss/user/winsrv/concfg/settings.h
5 * PURPOSE: Public Console Settings Management Interface
6 * PROGRAMMERS: Johannes Anderwald
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 */
9
10#pragma once
11
12/* STRUCTURES *****************************************************************/
13
14/*
15 * Undocumented message and structure used by Windows' console.dll
16 * for setting console info.
17 * See http://www.catch22.net/sites/default/source/files/setconsoleinfo.c
18 * and http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf
19 * for more information.
20 */
21#define WM_SETCONSOLEINFO (WM_USER + 201)
22
23// This shared structure has alignment requirements
24// in order to be compatible with the Windows one.
25#pragma pack(push, 4)
26
27typedef struct _CONSOLE_STATE_INFO
28{
29 ULONG cbSize; // Real length of this structure, at least sizeof(_CONSOLE_STATE_INFO).
30 // The real length takes into account for the real size of the console title.
31
35
40
46
52
54
57
60
61#ifdef _M_IX86
62C_ASSERT(sizeof(CONSOLE_STATE_INFO) == 0xD0);
63#endif
64
65#pragma pack(pop)
66
67/*
68 * BYTE Foreground = LOBYTE(Attributes) & 0x0F;
69 * BYTE Background = (LOBYTE(Attributes) & 0xF0) >> 4;
70 */
71#define RGBFromAttrib(Console, Attribute) ((Console)->Colors[(Attribute) & 0xF])
72#define TextAttribFromAttrib(Attribute) ( !((Attribute) & COMMON_LVB_REVERSE_VIDEO) ? (Attribute) & 0xF : ((Attribute) >> 4) & 0xF )
73#define BkgdAttribFromAttrib(Attribute) ( !((Attribute) & COMMON_LVB_REVERSE_VIDEO) ? ((Attribute) >> 4) & 0xF : (Attribute) & 0xF )
74#define MakeAttrib(TextAttrib, BkgdAttrib) (USHORT)((((BkgdAttrib) & 0xF) << 4) | ((TextAttrib) & 0xF))
75
76/* FUNCTIONS ******************************************************************/
77
80 IN LPCWSTR ConsoleTitle,
81 OUT PHKEY phSubKey,
82 IN REGSAM samDesired,
84
88 IN BOOLEAN DefaultSettings);
89
93 IN BOOLEAN DefaultSettings);
94
95VOID
98
99VOID
102
103/* EOF */
unsigned char BOOLEAN
@ Create
Definition: registry.c:563
#define LF_FACESIZE
Definition: dimm.idl:39
unsigned int BOOL
Definition: ntddk_ex.h:94
#define C_ASSERT(e)
Definition: intsafe.h:73
unsigned short USHORT
Definition: pedump.c:61
ULONG NumberOfHistoryBuffers
Definition: settings.h:51
ULONG HistoryBufferSize
Definition: settings.h:50
COORD ScreenBufferSize
Definition: settings.h:32
WCHAR ConsoleTitle[ANYSIZE_ARRAY]
Definition: settings.h:58
POINT WindowPosition
Definition: settings.h:34
COLORREF ColorTable[16]
Definition: settings.h:53
USHORT PopupAttributes
Definition: settings.h:48
WCHAR FaceName[LF_FACESIZE]
Definition: settings.h:39
USHORT ScreenAttributes
Definition: settings.h:47
Definition: bl.h:1338
static CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo
Definition: video.c:47
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
VOID ConCfgInitDefaultSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo)
Definition: settings.c:436
VOID ConCfgGetDefaultSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo)
Definition: settings.c:491
struct _CONSOLE_STATE_INFO * PCONSOLE_STATE_INFO
BOOLEAN ConCfgOpenUserSettings(IN LPCWSTR ConsoleTitle, OUT PHKEY phSubKey, IN REGSAM samDesired, IN BOOLEAN Create)
Definition: settings.c:93
BOOLEAN ConCfgWriteUserSettings(IN PCONSOLE_STATE_INFO ConsoleInfo, IN BOOLEAN DefaultSettings)
Definition: settings.c:344
BOOLEAN ConCfgReadUserSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo, IN BOOLEAN DefaultSettings)
Definition: settings.c:167
struct _CONSOLE_STATE_INFO CONSOLE_STATE_INFO
DWORD COLORREF
Definition: windef.h:300
ACCESS_MASK REGSAM
Definition: winreg.h:69
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185