1: /*
2: ============================================================================
3: xoblite™ -> an advanced "extended shell" for Microsoft® Windows® 11
4: Copyright © 2002-2026 Karl Henrik Henriksson [qwilk/@xoblite]
5: Copyright © 2001-2004 The Blackbox for Windows Development Team
6: http://xoblite.net/ + https://github.com/xoblite/
7: ============================================================================
8:
9: Blackbox for Windows is free software, released under the
10: GNU General Public License (GPL version 2 or later), with an extension
11: that allows linking of proprietary modules under a controlled interface.
12: What this means is that plugins etc. are allowed to be released
13: under any license the author wishes. Please note, however, that the
14: original Blackbox gradient math code used in Blackbox for Windows
15: is available under the BSD license.
16:
17: http://www.fsf.org/licenses/gpl.html
18: http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface
19: http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5
20:
21: This program is distributed in the hope that it will be useful,
22: but WITHOUT ANY WARRANTY; without even the implied warranty of
23: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24: GNU General Public License for more details.
25:
26: For additional license information, please read the included license.html.
27:
28: ============================================================================
29: */
30:
31: #ifndef __CONSOLE_H
32: #define __CONSOLE_H
33:
34: #include "..\API\BBApi.h"
35: #include "..\Graphics\BImage.h"
36: #include "..\Settings\Settings.h"
37: #include "..\Toolbar\Toolbar.h"
38: #include "..\Resources\resource.h"
39:
40: //===========================================================================
41:
42: typedef struct messageListItem
43: {
44: int type;
45: char msg[350]; // Aligned with [former] pTrayManager->BalloonTooltipText
46: HICON icon;
47: char url[256];
48: RECT r;
49: } messageListItem;
50:
51: //====================
52:
53: class Console
54: {
55: public:
56: Console(HINSTANCE hInstance);
57: ~Console();
58:
59: friend LRESULT CALLBACK ConsoleWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
60:
61: void UpdateConsoleWindow();
62: void DrawMessage(HDC hdc, RECT r, messageListItem* mLI);
63:
64: void GetDimensions();
65: void UpdatePosition();
66: void ToggleMaximized();
67: void BlockMessage(char* message);
68: void ClearHistory(bool redraw);
69:
70: void FullscreenDetected(bool fullscreen);
71:
72: //====================
73:
74: HINSTANCE hConsoleInstance;
75: HWND hBlackboxWnd;
76: HWND hConsoleWnd;
77:
78: HDC cachedBackground;
79:
80: int ScreenWidth, ScreenHeight;
81: int ConsoleX, ConsoleY, ConsoleWidth, ConsoleHeight;
82: int consoleTrueFontHeight;
83: int lineSpacing;
84: bool ConsoleHidden;
85: bool blockMessages;
86:
87: RECT consoleZoomButtonRect;
88: RECT consoleLockGlyphRect;
89:
90: bool fullscreenDetected;
91:
92: typedef vector<messageListItem*> messageListVector;
93: messageListVector messageList;
94:
95: char messageToBlock[MAX_LINE_LENGTH];
96: };
97:
98: //===========================================================================
99:
100: #endif /* __CONSOLE_H */
101: