Files
Seele/src/Engine/Window/Window.h
T

32 lines
589 B
C++
Raw Normal View History

2020-04-15 02:03:56 +02:00
#pragma once
2021-01-19 15:30:00 +01:00
#include "Graphics/GraphicsResources.h"
2020-04-15 02:03:56 +02:00
#include "View.h"
namespace Seele
{
2021-09-29 22:12:56 +02:00
struct WindowView
{
PView view;
std::thread worker;
std::mutex workerMutex;
};
DEFINE_REF(WindowView)
2020-04-15 02:03:56 +02:00
// The logical window, with the graphics proxy
class Window
{
public:
Window(Gfx::PWindow handle);
~Window();
void addView(PView view);
void render();
Gfx::PWindow getGfxHandle();
2020-10-29 02:22:01 +01:00
void setFocused(PView view);
2020-05-05 01:51:13 +02:00
2021-09-29 22:12:56 +02:00
protected:
Array<WindowView*> views;
2020-04-15 02:03:56 +02:00
Gfx::PWindow gfxHandle;
2021-09-29 22:12:56 +02:00
void viewWorker(WindowView* view);
2020-04-15 02:03:56 +02:00
};
2021-04-01 16:40:14 +02:00
DEFINE_REF(Window)
2020-05-05 01:51:13 +02:00
} // namespace Seele