Clean image types

This commit is contained in:
James Grogan 2022-11-11 16:32:55 +00:00
parent e7683cd94e
commit c6d03f16d0
18 changed files with 169 additions and 107 deletions

View file

@ -5,11 +5,25 @@
namespace mt
{
class Screen;
class Window;
}
class IPlatformWindow
class IPlatformSurface
{
public:
virtual ~IPlatformSurface() = default;
virtual void paint(mt::Screen* screen) = 0;
};
class IPlatformWindow : public IPlatformSurface
{
public:
IPlatformWindow(mt::Window* window)
: mWindow(window)
{
}
virtual ~IPlatformWindow() = default;
virtual void show() const = 0;
@ -17,8 +31,8 @@ public:
virtual void map() const = 0;
virtual void clear() const = 0;
virtual void paint(mt::Screen* screen) const = 0;
protected:
mt::Window* mWindow{nullptr};
};
using IPlatformWindowPtr = std::unique_ptr<IPlatformWindow>;