diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-09 02:06:04 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-09 02:06:04 +0100 |
commit | 9963da900583dc54f46c649978aa8a574a0bd508 (patch) | |
tree | f1cf7e9bd17f37cb6bc02d98cd255652c6ab4c64 /Widgets/Widget.h | |
parent | 2735b7e50da8c979e413042a1dc8023a5dba28c4 (diff) | |
download | serenity-9963da900583dc54f46c649978aa8a574a0bd508.zip |
Start refactoring graphics system to have per-window backing stores.
It was fun for everyone to share a single framebuffer but it was also
kinda really awful. Let's move towards having a "GraphicsBitmap" as the
backing store for each Window.
This is going to need a lot of refactoring so let's get started.
Diffstat (limited to 'Widgets/Widget.h')
-rw-r--r-- | Widgets/Widget.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Widgets/Widget.h b/Widgets/Widget.h index 132baa595c..90dd8850a2 100644 --- a/Widgets/Widget.h +++ b/Widgets/Widget.h @@ -6,8 +6,8 @@ #include "Color.h" #include "Font.h" #include <AK/AKString.h> -#include <functional> +class GraphicsBitmap; class Window; class Widget : public Object { @@ -15,7 +15,7 @@ public: explicit Widget(Widget* parent = nullptr); virtual ~Widget(); - virtual void event(Event&); + virtual void event(Event&) override; virtual void paintEvent(PaintEvent&); virtual void showEvent(ShowEvent&); virtual void hideEvent(HideEvent&); @@ -83,6 +83,8 @@ public: const Font& font() const { return *m_font; } void setFont(RetainPtr<Font>&&); + virtual GraphicsBitmap* backing(); + private: Window* m_window { nullptr }; |