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 __BBWORKSPACES_H 
    32: #define __BBWORKSPACES_H 
    33: 
    34: #include <vector> 
    35: #include <string> 
    36: 
    37: using namespace std;
    38: 
    39: //===========================================================================
    40: 
    41: class Workspaces
    42: {
    43: public:
    44:     Workspaces(HINSTANCE hMainInstance);
    45:     ~Workspaces();
    46: 
    47:     friend LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
    48:     friend BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam);
    49: 
    50:     //====================
    51: 
    52:     void PreviousWorkspace();
    53:     void NextWorkspace();
    54:     void LastWorkspace();
    55:     void SwitchToWorkspace(int workspace);
    56: 
    57:     void NewWorkspace();
    58:     void RemoveLastWorkspace();
    59:     void UpdateWorkspaceNames();
    60: 
    61:     int GetWorkspaceByWindow(HWND window);
    62:     int GetWorkspaceByRect(RECT r);
    63: 
    64:     //====================
    65: 
    66:     void GatherWindows();
    67:     void MoveWindowToWorkspace(HWND window, int workspace);
    68:     void MoveWindowToPreviousWorkspace(HWND window);
    69:     void MoveWindowToNextWorkspace(HWND window);
    70: 
    71:     //====================
    72: 
    73:     HINSTANCE hWorkspacesInstance;
    74:     HWND hWorkspacesWnd;
    75: 
    76:     typedef vector<string> WorkspaceNamesVector;
    77:     WorkspaceNamesVector workspaceNames;
    78:     typedef vector<string> StickyListVector;
    79:     StickyListVector stickyList;
    80: 
    81:     int ScreenWidth, ScreenHeight;
    82:     HDWP dwp;
    83: };
    84: 
    85: //===========================================================================
    86: 
    87: #endif /* __BBWORKSPACES_H */ 
    88: