aboutsummaryrefslogtreecommitdiff
path: root/src/core/window.h
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2025-09-26 12:23:19 +0200
committersrdusr <trevorgray@srdusr.com>2025-09-26 12:23:19 +0200
commite4a0432383331e013808a97b7c24707e4ddc4726 (patch)
tree3ef4465be03bc7b92a0b048f02f76475045404b6 /src/core/window.h
parent105732dde10b317a81d5a10a3f66b315d6f85015 (diff)
downloadsrdwm-e4a0432383331e013808a97b7c24707e4ddc4726.tar.gz
srdwm-e4a0432383331e013808a97b7c24707e4ddc4726.zip
Initial Commit
Diffstat (limited to 'src/core/window.h')
-rw-r--r--src/core/window.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/core/window.h b/src/core/window.h
new file mode 100644
index 0000000..6d7405a
--- /dev/null
+++ b/src/core/window.h
@@ -0,0 +1,49 @@
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <string>
+
+class SRDWindow {
+public:
+ // Constructor
+ SRDWindow(int id, const std::string& title);
+
+ // Getters
+ int getId() const;
+ const std::string& getTitle() const;
+ int getX() const;
+ int getY() const;
+ int getWidth() const;
+ int getHeight() const;
+ bool isDecorated() const;
+
+ // Setters
+ void setTitle(const std::string& title);
+ void setPosition(int x, int y);
+ void setSize(int width, int height);
+ void setGeometry(int x, int y, int width, int height);
+ void setDimensions(int x, int y, int width, int height);
+ void setDecorated(bool decorated);
+ void setId(int id);
+
+ // Window management methods
+ void map();
+ void unmap();
+ void focus();
+ void close();
+
+ // Comparison operators for use in containers
+ bool operator<(const SRDWindow& other) const { return id_ < other.id_; }
+ bool operator==(const SRDWindow& other) const { return id_ == other.id_; }
+
+private:
+ int id_;
+ std::string title_;
+ int x_;
+ int y_;
+ int width_;
+ int height_;
+ bool decorated_;
+};
+
+#endif // WINDOW_H