summaryrefslogtreecommitdiff
path: root/Widgets/Window.h
diff options
context:
space:
mode:
Diffstat (limited to 'Widgets/Window.h')
-rw-r--r--Widgets/Window.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/Widgets/Window.h b/Widgets/Window.h
index be53f0fccc..2d311c82c7 100644
--- a/Widgets/Window.h
+++ b/Widgets/Window.h
@@ -7,13 +7,16 @@
#include <AK/InlineLinkedList.h>
#include <AK/WeakPtr.h>
+class Process;
class Widget;
class Window final : public Object, public InlineLinkedListNode<Window> {
public:
- explicit Window(Object* parent = nullptr);
+ Window(Process&, int window_id);
virtual ~Window() override;
+ int window_id() const { return m_window_id; }
+
String title() const { return m_title; }
void setTitle(String&&);
@@ -30,11 +33,6 @@ public:
void setPosition(const Point& position) { setRect({ position.x(), position.y(), width(), height() }); }
void setPositionWithoutRepaint(const Point& position) { setRectWithoutRepaint({ position.x(), position.y(), width(), height() }); }
- Widget* mainWidget() { return m_mainWidget; }
- const Widget* mainWidget() const { return m_mainWidget; }
-
- void setMainWidget(Widget*);
-
virtual void event(Event&) override;
bool isBeingDragged() const { return m_isBeingDragged; }
@@ -45,10 +43,6 @@ public:
bool isActive() const;
- Widget* focusedWidget() { return m_focusedWidget.ptr(); }
- const Widget* focusedWidget() const { return m_focusedWidget.ptr(); }
- void setFocusedWidget(Widget*);
-
bool isVisible() const;
void close();
@@ -65,11 +59,10 @@ public:
private:
String m_title;
Rect m_rect;
- Widget* m_mainWidget { nullptr };
bool m_isBeingDragged { false };
- WeakPtr<Widget> m_focusedWidget;
-
RetainPtr<GraphicsBitmap> m_backing;
+ Process& m_process;
+ int m_window_id { -1 };
};