2022-03-20 15:55:47 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../defines.hpp"
|
2022-05-12 11:27:31 +02:00
|
|
|
#include "AnimatedVariable.hpp"
|
2022-03-20 15:55:47 +01:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
enum eFullscreenMode : uint8_t
|
|
|
|
{
|
2022-05-29 15:44:30 +02:00
|
|
|
FULLSCREEN_FULL = 0,
|
|
|
|
FULLSCREEN_MAXIMIZED
|
|
|
|
};
|
|
|
|
|
2022-08-31 17:02:44 +02:00
|
|
|
class CWindow;
|
|
|
|
|
2022-04-11 19:51:37 +02:00
|
|
|
class CWorkspace {
|
2022-12-16 18:17:31 +01:00
|
|
|
public:
|
2022-06-28 12:39:56 +02:00
|
|
|
CWorkspace(int monitorID, std::string name, bool special = false);
|
2022-04-11 19:51:37 +02:00
|
|
|
~CWorkspace();
|
|
|
|
|
2022-04-21 16:38:48 +02:00
|
|
|
// Workspaces ID-based have IDs > 0
|
|
|
|
// and workspaces name-based have IDs starting with -1337
|
2022-12-16 18:17:31 +01:00
|
|
|
int m_iID = -1;
|
|
|
|
std::string m_szName = "";
|
|
|
|
uint64_t m_iMonitorID = -1;
|
2022-08-21 12:21:21 +02:00
|
|
|
// Previous workspace ID is stored during a workspace change, allowing travel
|
|
|
|
// to the previous workspace.
|
2023-03-13 16:19:25 +01:00
|
|
|
struct SPrevWorkspaceData {
|
|
|
|
int iID = -1;
|
|
|
|
std::string name = "";
|
|
|
|
} m_sPrevWorkspace;
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
bool m_bHasFullscreenWindow = false;
|
|
|
|
eFullscreenMode m_efFullscreenMode = FULLSCREEN_FULL;
|
2022-04-11 19:51:37 +02:00
|
|
|
|
|
|
|
wlr_ext_workspace_handle_v1* m_pWlrHandle = nullptr;
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
wl_array m_wlrCoordinateArr;
|
2022-05-12 11:27:31 +02:00
|
|
|
|
|
|
|
// for animations
|
|
|
|
CAnimatedVariable m_vRenderOffset;
|
2022-05-16 23:13:32 +02:00
|
|
|
CAnimatedVariable m_fAlpha;
|
2022-07-08 09:43:55 +02:00
|
|
|
bool m_bForceRendering = false;
|
2022-05-16 23:13:32 +02:00
|
|
|
|
2022-05-31 14:01:00 +02:00
|
|
|
// "scratchpad"
|
2022-12-16 18:17:31 +01:00
|
|
|
bool m_bIsSpecialWorkspace = false;
|
2022-05-31 14:01:00 +02:00
|
|
|
|
2022-08-31 17:02:44 +02:00
|
|
|
// last window
|
2022-12-16 18:17:31 +01:00
|
|
|
CWindow* m_pLastFocusedWindow = nullptr;
|
2022-08-31 17:02:44 +02:00
|
|
|
|
2022-05-26 19:05:32 +02:00
|
|
|
// user-set
|
2022-12-16 18:17:31 +01:00
|
|
|
bool m_bDefaultFloating = false;
|
|
|
|
bool m_bDefaultPseudo = false;
|
2022-05-26 19:05:32 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
void startAnim(bool in, bool left, bool instant = false);
|
|
|
|
void setActive(bool on);
|
2022-05-30 20:51:45 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
void moveToMonitor(const int&);
|
2022-09-01 11:46:36 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
CWindow* getLastFocusedWindow();
|
2022-12-10 22:59:16 +01:00
|
|
|
};
|