aboutsummaryrefslogtreecommitdiff
path: root/src/core/window.cc
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.cc
parent105732dde10b317a81d5a10a3f66b315d6f85015 (diff)
downloadsrdwm-e4a0432383331e013808a97b7c24707e4ddc4726.tar.gz
srdwm-e4a0432383331e013808a97b7c24707e4ddc4726.zip
Initial Commit
Diffstat (limited to 'src/core/window.cc')
-rw-r--r--src/core/window.cc82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/core/window.cc b/src/core/window.cc
new file mode 100644
index 0000000..cefc131
--- /dev/null
+++ b/src/core/window.cc
@@ -0,0 +1,82 @@
+#include "window.h"
+
+SRDWindow::SRDWindow(int id, const std::string& title)
+ : id_(id), title_(title), x_(0), y_(0), width_(0), height_(0), decorated_(true) {
+}
+
+int SRDWindow::getId() const {
+ return id_;
+}
+
+const std::string& SRDWindow::getTitle() const {
+ return title_;
+}
+
+int SRDWindow::getX() const {
+ return x_;
+}
+
+int SRDWindow::getY() const {
+ return y_;
+}
+
+int SRDWindow::getWidth() const {
+ return width_;
+}
+
+int SRDWindow::getHeight() const {
+ return height_;
+}
+
+bool SRDWindow::isDecorated() const {
+ return decorated_;
+}
+
+void SRDWindow::setPosition(int x, int y) {
+ x_ = x;
+ y_ = y;
+}
+
+void SRDWindow::setSize(int width, int height) {
+ width_ = width;
+ height_ = height;
+}
+
+void SRDWindow::setGeometry(int x, int y, int width, int height) {
+ x_ = x;
+ y_ = y;
+ width_ = width;
+ height_ = height;
+}
+
+void SRDWindow::setDimensions(int x, int y, int width, int height) {
+ x_ = x;
+ y_ = y;
+ width_ = width;
+ height_ = height;
+}
+
+void SRDWindow::setDecorated(bool decorated) {
+ decorated_ = decorated;
+}
+
+void SRDWindow::setId(int id) {
+ id_ = id;
+}
+
+// Basic methods for managing window state (will be platform-specific)
+void SRDWindow::map() {
+ // Platform-specific implementation to show the window
+}
+
+void SRDWindow::unmap() {
+ // Platform-specific implementation to hide the window
+}
+
+void SRDWindow::focus() {
+ // Platform-specific implementation to give focus to the window
+}
+
+void SRDWindow::close() {
+ // Platform-specific implementation to close the window
+}