3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-08-18 11:02:10 +00:00
Files
Hyprland/src/layout/algorithm/TiledAlgorithm.hpp
Vaxry 1681bea42d config/lua: add simple layout API (#14258)
Adds a simple layout lua api
2026-05-06 13:56:12 +01:00

36 lines
808 B
C++

#pragma once
#include "../../helpers/math/Math.hpp"
#include "../../helpers/memory/Memory.hpp"
#include "ModeAlgorithm.hpp"
#include <optional>
#include <string>
namespace Layout {
class ITarget;
class CAlgorithm;
class ITiledAlgorithm : public IModeAlgorithm {
public:
virtual ~ITiledAlgorithm() = default;
virtual SP<ITarget> getNextCandidate(SP<ITarget> old) = 0;
// Optional runtime layout name. Useful for generic adapter classes where
// typeid alone cannot identify the selected layout instance.
virtual std::optional<std::string> layoutName() const {
return std::nullopt;
}
protected:
ITiledAlgorithm() = default;
WP<CAlgorithm> m_parent;
friend class Layout::CAlgorithm;
};
}