[CONSRV]
[reactos.git] / 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: 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 _GUI_CONSOLE_DATA
26 {
27 CRITICAL_SECTION Lock;
28 BOOL WindowSizeLock;
29 HANDLE hGuiInitEvent;
30
31 POINT OldCursor;
32
33 LONG_PTR WndStyle;
34 LONG_PTR WndStyleEx;
35 BOOL IsWndMax;
36 WINDOWPLACEMENT WndPl;
37
38 HWND hWindow; /* Handle to the console's window */
39 HDC hMemDC; /* Memory DC holding the console framebuffer */
40 HBITMAP hBitmap; /* Console framebuffer */
41 HPALETTE hSysPalette; /* Handle to the original system palette */
42
43 HICON hIcon; /* Handle to the console's icon (big) */
44 HICON hIconSm; /* Handle to the console's icon (small) */
45
46 /*** The following may be put per-screen-buffer !! ***/
47 HCURSOR hCursor; /* Handle to the mouse cursor */
48 INT MouseCursorRefCount; /* The reference counter associated with the mouse cursor. >= 0 and the cursor is shown; < 0 and the cursor is hidden. */
49 BOOL IgnoreNextMouseSignal; /* Used in cases where we don't want to treat a mouse signal */
50
51 BOOL IsCloseButtonEnabled; /* TRUE if the Close button and the corresponding system menu item are enabled (default), FALSE otherwise */
52 UINT CmdIdLow ; /* Lowest menu id of the user-reserved menu id range */
53 UINT CmdIdHigh; /* Highest menu id of the user-reserved menu id range */
54
55 // COLORREF Colors[16];
56
57 // PVOID ScreenBuffer; /* Hardware screen buffer */
58
59 HFONT Font;
60 UINT CharWidth;
61 UINT CharHeight;
62 /*****************************************************/
63
64 PCONSOLE Console; /* Pointer to the owned console */
65 PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to the active screen buffer (then maybe the previous Console member is redundant?? Or not...) */
66 CONSOLE_SELECTION_INFO Selection; /* Contains information about the selection */
67 COORD dwSelectionCursor; /* Selection cursor position, most of the time different from Selection.dwSelectionAnchor */
68 BOOL LineSelection; /* TRUE if line-oriented selection (a la *nix terminals), FALSE if block-oriented selection (default on Windows) */
69
70 GUI_CONSOLE_INFO GuiInfo; /* GUI terminal settings */
71 } GUI_CONSOLE_DATA, *PGUI_CONSOLE_DATA;