diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-26 12:23:19 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-26 12:23:19 +0200 |
| commit | e4a0432383331e013808a97b7c24707e4ddc4726 (patch) | |
| tree | 3ef4465be03bc7b92a0b048f02f76475045404b6 /src/layouts/layout.h | |
| parent | 105732dde10b317a81d5a10a3f66b315d6f85015 (diff) | |
| download | srdwm-e4a0432383331e013808a97b7c24707e4ddc4726.tar.gz srdwm-e4a0432383331e013808a97b7c24707e4ddc4726.zip | |
Initial Commit
Diffstat (limited to 'src/layouts/layout.h')
| -rw-r--r-- | src/layouts/layout.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/layouts/layout.h b/src/layouts/layout.h new file mode 100644 index 0000000..00c002f --- /dev/null +++ b/src/layouts/layout.h @@ -0,0 +1,33 @@ +#ifndef SRDWM_LAYOUT_H +#define SRDWM_LAYOUT_H + +#include <vector> +#include "../core/window.h" + +struct Monitor { + int id; + int x; + int y; + int width; + int height; + std::string name; + int refresh_rate; + + Monitor() : id(0), x(0), y(0), width(0), height(0), refresh_rate(60) {} + Monitor(int id, int x, int y, int width, int height, const std::string& name = "", int refresh = 60) + : id(id), x(x), y(y), width(width), height(height), name(name), refresh_rate(refresh) {} +}; + +class Layout { +public: + virtual ~Layout() = default; + + // Pure virtual method to arrange windows on a given monitor + virtual void arrange_windows(const std::vector<SRDWindow*>& windows, const Monitor& monitor) = 0; + + // You might add other common layout methods here later, e.g.: + // virtual void add_window(SRDWindow* window) = 0; + // virtual void remove_window(SRDWindow* window) = 0; +}; + +#endif // SRDWM_LAYOUT_H |
