// // Created by aurailus on 26/11/18. // #pragma once #include #include "util/GL.h" #include #include "util/Types.h" #include "util/EventEmitter.h" #include "Input.h" namespace { enum class WinEvt { Resize }; } class Window : public EventEmitter> { public: typedef WinEvt Event; Window(); Window(ivec2 win); void update(); bool shouldClose(); void swapBuffers(); ivec2 getSize(); void setCursorHand(bool hand); ~Window(); Input input; GLFWwindow* mainWindow = nullptr; private: static void resizeCallback(GLFWwindow* window, i32 width, i32 height); GLFWcursor* handCursor = nullptr; ivec2 win; };