hyporo-cpp/source/hyporo/window_system/window_system.hpp

62 lines
855 B
C++
Raw Normal View History

2022-10-27 22:27:50 +05:00
#pragma once
#include "window.hpp"
#include "monitor.hpp"
#include "../hyplib/array/array.hpp"
#include <string>
namespace hpr::gpu
{
2022-10-28 21:16:03 +05:00
class WindowSystem : public WindowContext
2022-10-27 22:27:50 +05:00
{
protected:
2022-10-28 21:16:03 +05:00
darray<Window*> p_windows;
darray<Monitor*> p_monitors;
2022-10-27 22:27:50 +05:00
protected:
WindowSystem();
WindowSystem(Provider provider);
virtual
~WindowSystem();
public:
// Global functions
static
2022-10-28 21:16:03 +05:00
WindowSystem* create(Provider provider);
2022-10-27 22:27:50 +05:00
static
void destroy(WindowSystem*& ws);
// Window interface
virtual
2022-10-28 21:16:03 +05:00
Window* newWindow() = 0;
2022-10-27 22:27:50 +05:00
2022-10-28 21:16:03 +05:00
Window* window(int index);
2022-10-27 22:27:50 +05:00
void closeWindow(Window* window);
void destroyWindow(Window* window);
// Monitor interface
2022-10-28 21:16:03 +05:00
//virtual
//void newMonitor(Monitor** monitor) = 0;
2022-10-27 22:27:50 +05:00
2022-10-28 21:16:03 +05:00
Monitor* monitor(int index);
2022-10-27 22:27:50 +05:00
void destroyMonitor(Monitor* monitor);
};
}