62 lines
864 B
C++
62 lines
864 B
C++
|
#pragma once
|
||
|
|
||
|
#include "window.hpp"
|
||
|
#include "monitor.hpp"
|
||
|
#include "../hyplib/array/array.hpp"
|
||
|
|
||
|
#include <string>
|
||
|
|
||
|
|
||
|
namespace hpr::gpu
|
||
|
{
|
||
|
|
||
|
class WindowSystem : WindowContext
|
||
|
{
|
||
|
|
||
|
protected:
|
||
|
|
||
|
darray<Window> p_windows;
|
||
|
darray<Monitor> p_monitors;
|
||
|
|
||
|
protected:
|
||
|
|
||
|
WindowSystem();
|
||
|
|
||
|
WindowSystem(Provider provider);
|
||
|
|
||
|
virtual
|
||
|
~WindowSystem();
|
||
|
|
||
|
public:
|
||
|
|
||
|
// Global functions
|
||
|
|
||
|
static
|
||
|
void create(WindowSystem** ws, Provider provider);
|
||
|
|
||
|
static
|
||
|
void destroy(WindowSystem*& ws);
|
||
|
|
||
|
// Window interface
|
||
|
|
||
|
virtual
|
||
|
void newWindow(Window** window) = 0;
|
||
|
|
||
|
Window& window(int index);
|
||
|
|
||
|
void closeWindow(Window* window);
|
||
|
|
||
|
void destroyWindow(Window* window);
|
||
|
|
||
|
// Monitor interface
|
||
|
|
||
|
virtual
|
||
|
void newMonitor(Monitor** monitor) = 0;
|
||
|
|
||
|
Monitor& monitor(int index);
|
||
|
|
||
|
void destroyMonitor(Monitor* monitor);
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|