ReactOS  0.4.13-dev-259-g5ca9c9c
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 
27 typedef 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
62 C_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 
78 BOOLEAN
80  IN LPCWSTR ConsoleTitle,
81  OUT PHKEY phSubKey,
82  IN REGSAM samDesired,
83  IN BOOLEAN Create);
84 
85 BOOLEAN
88  IN BOOLEAN DefaultSettings);
89 
90 BOOLEAN
93  IN BOOLEAN DefaultSettings);
94 
95 VOID
98 
99 VOID
102 
103 /* EOF */
#define IN
Definition: typedefs.h:38
#define LF_FACESIZE
Definition: dimm.idl:39
USHORT ScreenAttributes
Definition: settings.h:47
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
POINT WindowPosition
Definition: settings.h:34
#define ANYSIZE_ARRAY
Definition: typedefs.h:45
BOOLEAN ConCfgWriteUserSettings(IN PCONSOLE_STATE_INFO ConsoleInfo, IN BOOLEAN DefaultSettings)
Definition: settings.c:344
_In_ BOOLEAN Create
Definition: pstypes.h:511
VOID ConCfgGetDefaultSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo)
Definition: settings.c:491
struct _CONSOLE_STATE_INFO CONSOLE_STATE_INFO
BOOLEAN ConCfgReadUserSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo, IN BOOLEAN DefaultSettings)
Definition: settings.c:167
unsigned int BOOL
Definition: ntddk_ex.h:94
COLORREF ColorTable[16]
Definition: settings.h:53
unsigned char BOOLEAN
struct _CONSOLE_STATE_INFO * PCONSOLE_STATE_INFO
VOID ConCfgInitDefaultSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo)
Definition: settings.c:436
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD COLORREF
Definition: windef.h:285
ULONG HistoryBufferSize
Definition: settings.h:50
BOOLEAN ConCfgOpenUserSettings(IN LPCWSTR ConsoleTitle, OUT PHKEY phSubKey, IN REGSAM samDesired, IN BOOLEAN Create)
Definition: settings.c:93
WCHAR FaceName[LF_FACESIZE]
Definition: settings.h:39
Definition: bl.h:1338
ULONG NumberOfHistoryBuffers
Definition: settings.h:51
#define C_ASSERT(e)
Definition: ntstrsafe.h:22
unsigned short USHORT
Definition: pedump.c:61
static CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo
Definition: video.c:47
ACCESS_MASK REGSAM
Definition: winreg.h:69
WCHAR ConsoleTitle[ANYSIZE_ARRAY]
Definition: settings.h:58
#define OUT
Definition: typedefs.h:39
COORD ScreenBufferSize
Definition: settings.h:32
unsigned int ULONG
Definition: retypes.h:1
USHORT PopupAttributes
Definition: settings.h:48