[CONSOLE][CONSRV]
[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 BOOL UseRasterFonts;
38
39 BOOL FullScreen; /* Whether the console is displayed in full-screen or windowed mode */
40 // ULONG HardwareState; /* _GDI_MANAGED, _DIRECT */
41
42 WORD ShowWindow;
43 BOOL AutoPosition;
44 POINT WindowOrigin;
45 } GUI_CONSOLE_INFO, *PGUI_CONSOLE_INFO;
46
47 /*
48 * Undocumented structure used by Windows' console.dll for setting console info.
49 * See http://www.catch22.net/sites/default/source/files/setconsoleinfo.c
50 * and http://www.scn.rain.com/~neighorn/PDF/MSBugPaper.pdf
51 * for more information.
52 */
53 #pragma pack(push, 1)
54 typedef struct _CONSOLE_STATE_INFO
55 {
56 ULONG cbSize;
57 COORD ScreenBufferSize;
58 COORD WindowSize;
59 POINT WindowPosition; // WindowPosX and Y
60
61 COORD FontSize;
62 ULONG FontFamily;
63 ULONG FontWeight;
64 WCHAR FaceName[LF_FACESIZE];
65
66 ULONG CursorSize;
67 BOOL FullScreen;
68 BOOL QuickEdit;
69 BOOL AutoPosition;
70 BOOL InsertMode;
71
72 USHORT ScreenColors; // ScreenAttributes
73 USHORT PopupColors; // PopupAttributes
74 BOOL HistoryNoDup;
75 ULONG HistoryBufferSize;
76 ULONG NumberOfHistoryBuffers;
77
78 COLORREF ColorTable[16];
79
80 ULONG CodePage;
81 HWND HWnd;
82
83 WCHAR ConsoleTitle[256];
84 } CONSOLE_STATE_INFO, *PCONSOLE_STATE_INFO;
85 #pragma pack(pop)
86
87 #ifndef CONSOLE_H__ // If we aren't included by console.dll
88
89 #include "conwnd.h"
90
91 /* FUNCTIONS ******************************************************************/
92
93 BOOL
94 GuiConsoleReadUserSettings(IN OUT PGUI_CONSOLE_INFO TermInfo,
95 IN LPCWSTR ConsoleTitle,
96 IN DWORD ProcessId);
97 BOOL
98 GuiConsoleWriteUserSettings(IN OUT PGUI_CONSOLE_INFO TermInfo,
99 IN LPCWSTR ConsoleTitle,
100 IN DWORD ProcessId);
101 VOID
102 GuiConsoleGetDefaultSettings(IN OUT PGUI_CONSOLE_INFO TermInfo,
103 IN DWORD ProcessId);
104 VOID
105 GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData,
106 BOOL Defaults);
107 VOID
108 GuiApplyUserSettings(PGUI_CONSOLE_DATA GuiData,
109 HANDLE hClientSection,
110 BOOL SaveSettings);
111 VOID
112 GuiApplyWindowsConsoleSettings(PGUI_CONSOLE_DATA GuiData,
113 HANDLE hClientSection);
114
115 #endif
116
117 /* EOF */