df95bdc28c23ea5989d6d22d44126bce8dff4bb7
[reactos.git] / win32ss / user / winsrv / consrv / frontends / gui / guisettings.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: win32ss/user/winsrv/consrv/guisettings.h
5 * PURPOSE: GUI front-end settings management
6 * PROGRAMMERS: Johannes Anderwald
7 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 *
9 * NOTE: Also used by console.dll
10 */
11
12 #pragma once
13
14 #ifndef WM_APP
15 #define WM_APP 0x8000
16 #endif
17 /* Message sent by ReactOS' console.dll for applying console info */
18 #define PM_APPLY_CONSOLE_INFO (WM_APP + 100)
19
20 /*
21 * Undocumented message sent by Windows' console.dll for applying console info.
22 * See http://www.catch22.net/sites/default/source/files/setconsoleinfo.c
23 * and http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf
24 * for more information.
25 */
26 #define WM_SETCONSOLEINFO (WM_USER + 201)
27
28 /* STRUCTURES *****************************************************************/
29
30 typedef struct _GUI_CONSOLE_INFO
31 {
32 // FONTSIGNATURE FontSignature;
33 WCHAR FaceName[LF_FACESIZE];
34 ULONG FontFamily;
35 COORD FontSize;
36 ULONG FontWeight;
37
38 BOOL FullScreen; /* Whether the console is displayed in full-screen or windowed mode */
39 // ULONG HardwareState; /* _GDI_MANAGED, _DIRECT */
40
41 WORD ShowWindow;
42 BOOL AutoPosition;
43 POINT WindowOrigin;
44 } GUI_CONSOLE_INFO, *PGUI_CONSOLE_INFO;
45
46 /*
47 * Undocumented structure used by Windows' console.dll for setting console info.
48 * See http://www.catch22.net/sites/default/source/files/setconsoleinfo.c
49 * and http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf
50 * for more information.
51 */
52 #pragma pack(push, 1)
53 typedef struct _CONSOLE_STATE_INFO
54 {
55 ULONG cbSize;
56 COORD ScreenBufferSize;
57 COORD WindowSize;
58 POINT WindowPosition; // WindowPosX and Y
59
60 COORD FontSize;
61 ULONG FontFamily;
62 ULONG FontWeight;
63 WCHAR FaceName[LF_FACESIZE];
64
65 ULONG CursorSize;
66 BOOL FullScreen;
67 BOOL QuickEdit;
68 BOOL AutoPosition;
69 BOOL InsertMode;
70
71 USHORT ScreenColors; // ScreenAttributes
72 USHORT PopupColors; // PopupAttributes
73 BOOL HistoryNoDup;
74 ULONG HistoryBufferSize;
75 ULONG NumberOfHistoryBuffers;
76
77 COLORREF ColorTable[16];
78
79 ULONG CodePage;
80 HWND HWnd;
81
82 WCHAR ConsoleTitle[256];
83 } CONSOLE_STATE_INFO, *PCONSOLE_STATE_INFO;
84 #pragma pack(pop)
85
86 #ifndef CONSOLE_H__ // If we aren't included by console.dll
87
88 #include "conwnd.h"
89
90 /* FUNCTIONS ******************************************************************/
91
92 BOOL
93 GuiConsoleReadUserSettings(IN OUT PGUI_CONSOLE_INFO TermInfo,
94 IN LPCWSTR ConsoleTitle,
95 IN DWORD ProcessId);
96 BOOL
97 GuiConsoleWriteUserSettings(IN OUT PGUI_CONSOLE_INFO TermInfo,
98 IN LPCWSTR ConsoleTitle,
99 IN DWORD ProcessId);
100 VOID
101 GuiConsoleGetDefaultSettings(IN OUT PGUI_CONSOLE_INFO TermInfo,
102 IN DWORD ProcessId);
103 VOID
104 GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData,
105 BOOL Defaults);
106 VOID
107 GuiApplyUserSettings(PGUI_CONSOLE_DATA GuiData,
108 HANDLE hClientSection,
109 BOOL SaveSettings);
110 VOID
111 GuiApplyWindowsConsoleSettings(PGUI_CONSOLE_DATA GuiData,
112 HANDLE hClientSection);
113
114 #endif
115
116 /* EOF */