diff options
Diffstat (limited to 'src/layout/LayoutManager.hpp')
| -rw-r--r-- | src/layout/LayoutManager.hpp | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/src/layout/LayoutManager.hpp b/src/layout/LayoutManager.hpp index 2660cf28..ef886daa 100644 --- a/src/layout/LayoutManager.hpp +++ b/src/layout/LayoutManager.hpp @@ -40,43 +40,48 @@ namespace Layout { SNAP_RIGHT = (1 << 3), }; + enum eFullscreenRequestResult : uint8_t { + FULLSCREEN_REQUEST_DEFAULT = 0, + FULLSCREEN_REQUEST_HANDLED_BY_LAYOUT, + }; + class CLayoutManager { public: CLayoutManager(); ~CLayoutManager() = default; - void newTarget(SP<ITarget> target, SP<CSpace> space); - void removeTarget(SP<ITarget> target); + void newTarget(SP<ITarget> target, SP<CSpace> space); + void removeTarget(SP<ITarget> target); - void changeFloatingMode(SP<ITarget> target); + void changeFloatingMode(SP<ITarget> target); - void beginDragTarget(SP<ITarget> target, eMouseBindMode mode); - void moveMouse(const Vector2D& mousePos); - void resizeTarget(const Vector2D& Δ, SP<ITarget> target, eRectCorner corner = CORNER_NONE); - void moveTarget(const Vector2D& Δ, SP<ITarget> target); - void setTargetGeom(const CBox& box, SP<ITarget> target); // floats only - void endDragTarget(); + void beginDragTarget(SP<ITarget> target, eMouseBindMode mode); + void moveMouse(const Vector2D& mousePos); + void resizeTarget(const Vector2D& Δ, SP<ITarget> target, eRectCorner corner = CORNER_NONE); + void moveTarget(const Vector2D& Δ, SP<ITarget> target); + void setTargetGeom(const CBox& box, SP<ITarget> target); // floats only + void endDragTarget(); - Config::ErrorResult layoutMsg(const std::string_view& sv); + Config::ErrorResult layoutMsg(const std::string_view& sv); - void fullscreenRequestForTarget(SP<ITarget> target, eFullscreenMode currentEffectiveMode, eFullscreenMode effectiveMode); + eFullscreenRequestResult fullscreenRequestForTarget(SP<ITarget> target, eFullscreenMode currentEffectiveMode, eFullscreenMode effectiveMode); - void switchTargets(SP<ITarget> a, SP<ITarget> b, bool preserveFocus = true); + void switchTargets(SP<ITarget> a, SP<ITarget> b, bool preserveFocus = true); - void moveInDirection(SP<ITarget> target, const std::string& direction, bool silent = false); + void moveInDirection(SP<ITarget> target, const std::string& direction, bool silent = false); - SP<ITarget> getNextCandidate(SP<CSpace> space, SP<ITarget> from); + SP<ITarget> getNextCandidate(SP<CSpace> space, SP<ITarget> from); - bool isReachable(SP<ITarget> target); + bool isReachable(SP<ITarget> target); - void bringTargetToTop(SP<ITarget> target); + void bringTargetToTop(SP<ITarget> target); - std::optional<Vector2D> predictSizeForNewTiledTarget(); + std::optional<Vector2D> predictSizeForNewTiledTarget(); - void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, SP<ITarget> target, eMouseBindMode mode, int corner, const Vector2D& beginSize); + void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, SP<ITarget> target, eMouseBindMode mode, int corner, const Vector2D& beginSize); - void invalidateMonitorGeometries(PHLMONITOR); - void recalculateMonitor(PHLMONITOR); + void invalidateMonitorGeometries(PHLMONITOR); + void recalculateMonitor(PHLMONITOR); const UP<Supplementary::CDragStateController>& dragController(); |
