2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: win32ss/user/winsrv/consrv/include/settings.h
5 * PURPOSE: Public Console Settings Management Interface
6 * PROGRAMMERS: Johannes Anderwald
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
12 /* STRUCTURES *****************************************************************/
17 * Structure used to hold terminal-specific information
19 typedef struct _TERMINAL_INFO
21 ULONG Size
; /* Size of the memory buffer pointed by TermInfo */
22 PVOID TermInfo
; /* Address (or offset when talking to console.dll) of the memory buffer holding terminal information */
23 } TERMINAL_INFO
, *PTERMINAL_INFO
;
26 * Structure used to hold console information
28 typedef struct _CONSOLE_INFO
30 ULONG HistoryBufferSize
;
31 ULONG NumberOfHistoryBuffers
;
36 ULONG InputBufferSize
;
37 COORD ScreenBufferSize
;
38 COORD ConsoleSize
; /* The size of the console */
40 BOOLEAN CursorBlinkOn
;
41 BOOLEAN ForceCursorOff
;
44 USHORT ScreenAttrib
; // CHAR_INFO ScreenFillAttrib
47 COLORREF Colors
[16]; /* Color palette */
51 WCHAR ConsoleTitle
[MAX_PATH
+ 1];
52 } CONSOLE_INFO
, *PCONSOLE_INFO
;
54 #define RGBFromAttrib(Console, Attribute) ((Console)->Colors[(Attribute) & 0xF])
55 #define TextAttribFromAttrib(Attribute) ((Attribute) & 0xF)
56 #define BkgdAttribFromAttrib(Attribute) (((Attribute) >> 4) & 0xF)
57 #define MakeAttrib(TextAttrib, BkgdAttrib) (DWORD)((((BkgdAttrib) & 0xF) << 4) | ((TextAttrib) & 0xF))
60 * Structure used to communicate with console.dll
62 typedef struct _CONSOLE_PROPS
65 BOOL ShowDefaultParams
;
67 BOOLEAN AppliedConfig
;
68 DWORD ActiveStaticControl
;
70 CONSOLE_INFO ci
; /* Console-specific informations */
71 TERMINAL_INFO TerminalInfo
; /* Frontend-specific parameters */
72 } CONSOLE_PROPS
, *PCONSOLE_PROPS
;
76 /* FUNCTIONS ******************************************************************/
78 #ifndef CONSOLE_H__ // If we aren't included by console.dll
80 BOOL
ConSrvOpenUserSettings(DWORD ProcessId
,
86 BOOL
ConSrvReadUserSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
88 BOOL
ConSrvWriteUserSettings(IN PCONSOLE_INFO ConsoleInfo
,
90 VOID
ConSrvGetDefaultSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
92 VOID
ConSrvApplyUserSettings(IN PCONSOLE Console
,
93 IN PCONSOLE_INFO ConsoleInfo
);