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
;
55 * BYTE Foreground = LOBYTE(Attributes) & 0x0F;
56 * BYTE Background = (LOBYTE(Attributes) & 0xF0) >> 4;
58 #define RGBFromAttrib(Console, Attribute) ((Console)->Colors[(Attribute) & 0xF])
59 #define TextAttribFromAttrib(Attribute) ( !((Attribute) & COMMON_LVB_REVERSE_VIDEO) ? (Attribute) & 0xF : ((Attribute) >> 4) & 0xF )
60 #define BkgdAttribFromAttrib(Attribute) ( !((Attribute) & COMMON_LVB_REVERSE_VIDEO) ? ((Attribute) >> 4) & 0xF : (Attribute) & 0xF )
61 #define MakeAttrib(TextAttrib, BkgdAttrib) (USHORT)((((BkgdAttrib) & 0xF) << 4) | ((TextAttrib) & 0xF))
64 * Structure used to communicate with console.dll
66 * FIXME: It should overlap with the Windows' CONSOLE_STATE_INFO structure
69 typedef struct _CONSOLE_PROPS
72 BOOL ShowDefaultParams
;
74 BOOLEAN AppliedConfig
;
75 DWORD ActiveStaticControl
;
77 CONSOLE_INFO ci
; /* Console-specific informations */
78 TERMINAL_INFO TerminalInfo
; /* Frontend-specific parameters */
79 } CONSOLE_PROPS
, *PCONSOLE_PROPS
;
83 /* FUNCTIONS ******************************************************************/
85 #ifndef CONSOLE_H__ // If we aren't included by console.dll
87 BOOL
ConSrvOpenUserSettings(DWORD ProcessId
,
93 BOOL
ConSrvReadUserSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
95 BOOL
ConSrvWriteUserSettings(IN PCONSOLE_INFO ConsoleInfo
,
97 VOID
ConSrvGetDefaultSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
99 VOID
ConSrvApplyUserSettings(IN PCONSOLE Console
,
100 IN PCONSOLE_INFO ConsoleInfo
);