#pragma once #include "window.hpp" #include "monitor.hpp" #include "../hyplib/array/array.hpp" #include namespace hpr::gpu { class WindowSystem : WindowContext { protected: darray p_windows; darray 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); }; }