Clean project structure.
This commit is contained in:
parent
78a4fa99ff
commit
947bf937fd
496 changed files with 206 additions and 137 deletions
41
src/ui/ui_elements/desktop_elements/IPlatformWindow.h
Normal file
41
src/ui/ui_elements/desktop_elements/IPlatformWindow.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace mt
|
||||
{
|
||||
class Screen;
|
||||
class Window;
|
||||
}
|
||||
|
||||
class IPlatformSurface
|
||||
{
|
||||
public:
|
||||
virtual ~IPlatformSurface() = default;
|
||||
virtual void beforePaint(mt::Screen* screen) = 0;
|
||||
virtual void afterPaint(mt::Screen* screen) = 0;
|
||||
};
|
||||
|
||||
class IPlatformWindow : public IPlatformSurface
|
||||
{
|
||||
public:
|
||||
IPlatformWindow(mt::Window* window)
|
||||
: mWindow(window)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual ~IPlatformWindow() = default;
|
||||
|
||||
virtual void show() = 0;
|
||||
|
||||
virtual void map() = 0;
|
||||
|
||||
virtual void clear() = 0;
|
||||
|
||||
virtual void onResize(unsigned width, unsigned height) = 0;
|
||||
protected:
|
||||
mt::Window* mWindow{nullptr};
|
||||
};
|
||||
|
||||
using IPlatformWindowPtr = std::unique_ptr<IPlatformWindow>;
|
Loading…
Add table
Add a link
Reference in a new issue