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 *****************************************************************/
15 * Structure used to hold terminal-specific information
17 typedef struct _TERMINAL_INFO
19 ULONG Size
; /* Size of the memory buffer pointed by TermInfo */
20 PVOID TermInfo
; /* Address (or offset when talking to console.dll) of the memory buffer holding terminal information */
21 } TERMINAL_INFO
, *PTERMINAL_INFO
;
24 * Structure used to hold console information
26 typedef struct _CONSOLE_INFO
28 ULONG HistoryBufferSize
;
29 ULONG NumberOfHistoryBuffers
;
34 ULONG InputBufferSize
;
35 COORD ScreenBufferSize
;
36 COORD ConsoleSize
; /* The size of the console */
38 BOOLEAN CursorBlinkOn
;
39 BOOLEAN ForceCursorOff
;
42 USHORT ScreenAttrib
; // CHAR_INFO ScreenFillAttrib
45 COLORREF Colors
[16]; /* Color palette */
49 WCHAR ConsoleTitle
[MAX_PATH
+ 1];
50 } CONSOLE_INFO
, *PCONSOLE_INFO
;
52 #define RGBFromAttrib(Console, Attribute) ((Console)->Colors[(Attribute) & 0xF])
53 #define TextAttribFromAttrib(Attribute) ((Attribute) & 0xF)
54 #define BkgdAttribFromAttrib(Attribute) (((Attribute) >> 4) & 0xF)
55 #define MakeAttrib(TextAttrib, BkgdAttrib) (DWORD)((((BkgdAttrib) & 0xF) << 4) | ((TextAttrib) & 0xF))
58 * Structure used to communicate with console.dll
60 typedef struct _CONSOLE_PROPS
63 BOOL ShowDefaultParams
;
65 BOOLEAN AppliedConfig
;
66 DWORD ActiveStaticControl
;
68 CONSOLE_INFO ci
; /* Console-specific informations */
69 TERMINAL_INFO TerminalInfo
; /* Frontend-specific parameters */
70 } CONSOLE_PROPS
, *PCONSOLE_PROPS
;
72 /* FUNCTIONS ******************************************************************/
74 #ifndef CONSOLE_H__ // If we aren't included by console.dll
76 BOOL
ConSrvOpenUserSettings(DWORD ProcessId
,
82 BOOL
ConSrvReadUserSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
84 BOOL
ConSrvWriteUserSettings(IN PCONSOLE_INFO ConsoleInfo
,
86 VOID
ConSrvGetDefaultSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
88 VOID
ConSrvApplyUserSettings(IN PCONSOLE Console
,
89 IN PCONSOLE_INFO ConsoleInfo
);