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 __BBDOCK_H
32: #define __BBDOCK_H
33:
34: #ifndef _WIN32_IE
35: #define _WIN32_IE 0x0500 // Enables all the needed define's in ShellAPI.h
36: #endif
37:
38: #include "..\API\BBApi.h"
39: #include "..\Graphics\BImage.h"
40: #include "..\Settings\Settings.h"
41: #include "..\Menu\MenuCommon.h"
42: #include "..\Plugins\PluginManager.h"
43: #include "..\Toolbar\Taskbar.h"
44:
45: #include <windows.h>
46: #include <string>
47: #include <vector>
48: #include <ShellAPI.h>
49:
50: using namespace std;
51:
52: #define DOCK_RECONFIGURE_LOCK_TIMER 1
53:
54: //====================
55:
56: typedef struct
57: {
58: HWND hwndPlugin;
59: int x;
60: int y;
61: int width;
62: int height;
63: } dockPluginItem;
64:
65: typedef vector<dockPluginItem> DockPluginsVector;
66:
67: //===========================================================================
68:
69: class Dock
70: {
71: public:
72: Dock(HINSTANCE hInstance);
73: ~Dock();
74:
75: friend LRESULT CALLBACK DockWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
76:
77: void UpdateDockWindow();
78: void UpdatePosition();
79: void ReconfigureLock(bool enable);
80: void ToggleAlwaysOnTop();
81: bool CheckIfMouseHover();
82:
83: void FullscreenDetected(bool fullscreen);
84:
85: //====================
86:
87: HINSTANCE hDockInstance;
88: HWND hDockWnd;
89: HWND hBlackboxWnd;
90:
91: int DockX, DockY, DockWidth, DockHeight;
92:
93: HDC cachedBackground;
94: bool cachedBackgroundExists;
95:
96: bool reconfigureLock;
97: bool positioningInProgress;
98:
99: bool fullscreenDetected;
100:
101: DockPluginsVector DockPlugins;
102: vector<dockPluginItem>::iterator plugin, member, firstInGroup, lastInGroup;
103: };
104:
105: //===========================================================================
106:
107: #endif /* __BBDOCK_H */
108: