991902b802792d6fc9018da30aca3823f56aaf0e
[reactos.git] / reactos / win32ss / user / winsrv / consrv / frontends / gui / conwnd.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: win32ss/user/winsrv/consrv/frontends/gui/conwnd.h
5 * PURPOSE: GUI Console Window Class
6 * PROGRAMMERS: Gé van Geldorp
7 * Johannes Anderwald
8 * Jeffrey Morlan
9 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
10 */
11
12 #pragma once
13
14 /* GUI Console Window Class name */
15 #define GUI_CONWND_CLASS L"ConsoleWindowClass"
16
17 #ifndef WM_APP
18 #define WM_APP 0x8000
19 #endif
20 #define PM_RESIZE_TERMINAL (WM_APP + 3)
21 #define PM_CONSOLE_BEEP (WM_APP + 4)
22 #define PM_CONSOLE_SET_TITLE (WM_APP + 5)
23
24 /*
25 typedef struct _CONSOLE_FONT
26 {
27 HFONT Font;
28 ULONG Flag;
29 } CONSOLE_FONT, *PCONSOLE_FONT;
30 */
31 #define FONT_NORMAL 0x00
32 #define FONT_BOLD 0x01
33 #define FONT_UNDERLINE 0x02
34 #define FONT_MAXNO 0x04
35
36 typedef struct _GUI_CONSOLE_DATA
37 {
38 CRITICAL_SECTION Lock;
39 BOOL WindowSizeLock;
40 HANDLE hGuiInitEvent;
41 HANDLE hGuiTermEvent;
42
43 // HANDLE InputThreadHandle;
44 ULONG_PTR InputThreadId;
45 HWINSTA WinSta;
46 HDESK Desktop;
47
48 BOOLEAN IsWindowVisible;
49
50 POINT OldCursor;
51
52 LONG_PTR WndStyle;
53 LONG_PTR WndStyleEx;
54 BOOL IsWndMax;
55 WINDOWPLACEMENT WndPl;
56
57 HWND hWindow; /* Handle to the console's window */
58 HDC hMemDC; /* Memory DC holding the console framebuffer */
59 HBITMAP hBitmap; /* Console framebuffer */
60 HPALETTE hSysPalette; /* Handle to the original system palette */
61
62 HICON hIcon; /* Handle to the console's icon (big) */
63 HICON hIconSm; /* Handle to the console's icon (small) */
64
65 /*** The following may be put per-screen-buffer !! ***/
66 HCURSOR hCursor; /* Handle to the mouse cursor */
67 INT MouseCursorRefCount; /* The reference counter associated with the mouse cursor. >= 0 and the cursor is shown; < 0 and the cursor is hidden. */
68 BOOL IgnoreNextMouseSignal; /* Used when we need to not process a mouse signal */
69
70 BOOL HackCORE8394IgnoreNextMove; /* HACK FOR CORE-8394. See conwnd.c!OnMouse for more details. */
71
72 BOOL IsCloseButtonEnabled; /* TRUE if the Close button and the corresponding system menu item are enabled (default), FALSE otherwise */
73 UINT CmdIdLow ; /* Lowest menu id of the user-reserved menu id range */
74 UINT CmdIdHigh; /* Highest menu id of the user-reserved menu id range */
75
76 // COLORREF Colors[16];
77
78 // PVOID ScreenBuffer; /* Hardware screen buffer */
79
80 HFONT Font[FONT_MAXNO];
81 UINT CharWidth; /* The character width and height should be the same for */
82 UINT CharHeight; /* both normal and bold/underlined fonts... */
83 /*****************************************************/
84
85 PCONSRV_CONSOLE Console; /* Pointer to the owned console */
86 PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to the active screen buffer (then maybe the previous Console member is redundant?? Or not...) */
87 CONSOLE_SELECTION_INFO Selection; /* Contains information about the selection */
88 COORD dwSelectionCursor; /* Selection cursor position, most of the time different from Selection.dwSelectionAnchor */
89 BOOL LineSelection; /* TRUE if line-oriented selection (a la *nix terminals), FALSE if block-oriented selection (default on Windows) */
90
91 GUI_CONSOLE_INFO GuiInfo; /* GUI terminal settings */
92 } GUI_CONSOLE_DATA, *PGUI_CONSOLE_DATA;