2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: win32ss/user/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
;
32 /* BOOLEAN */ ULONG FullScreen
; /* Give the type of console: GUI (windowed) or TUI (fullscreen) */
35 ULONG InputBufferSize
;
36 COORD ScreenBufferSize
;
37 /* SIZE */ COORD ConsoleSize
; /* The size of the console */
39 BOOLEAN CursorBlinkOn
;
40 BOOLEAN ForceCursorOff
;
43 USHORT ScreenAttrib
; // CHAR_INFO ScreenFillAttrib
46 COLORREF Colors
[16]; /* Color palette */
50 WCHAR ConsoleTitle
[MAX_PATH
+ 1];
51 } CONSOLE_INFO
, *PCONSOLE_INFO
;
53 #define RGBFromAttrib(Console, Attribute) ((Console)->Colors[(Attribute) & 0xF])
54 #define TextAttribFromAttrib(Attribute) ((Attribute) & 0xF)
55 #define BkgdAttribFromAttrib(Attribute) (((Attribute) >> 4) & 0xF)
56 #define MakeAttrib(TextAttrib, BkgdAttrib) (DWORD)((((BkgdAttrib) & 0xF) << 4) | ((TextAttrib) & 0xF))
59 * Structure used to communicate with console.dll
61 typedef struct _CONSOLE_PROPS
64 BOOL ShowDefaultParams
;
66 BOOLEAN AppliedConfig
;
67 DWORD ActiveStaticControl
;
69 CONSOLE_INFO ci
; /* Console-specific informations */
70 TERMINAL_INFO TerminalInfo
; /* Frontend-specific parameters */
71 } CONSOLE_PROPS
, *PCONSOLE_PROPS
;
73 /* FUNCTIONS ******************************************************************/
75 #ifndef CONSOLE_H__ // If we aren't included by console.dll
77 BOOL
ConSrvOpenUserSettings(DWORD ProcessId
,
83 BOOL
ConSrvReadUserSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
85 BOOL
ConSrvWriteUserSettings(IN PCONSOLE_INFO ConsoleInfo
,
87 VOID
ConSrvGetDefaultSettings(IN OUT PCONSOLE_INFO ConsoleInfo
,
89 VOID
ConSrvApplyUserSettings(IN PCONSOLE Console
,
90 IN PCONSOLE_INFO ConsoleInfo
);