34 #include "Utilities/Time/Time.h" 35 #include "Utilities/Math/Math.h" 36 #include "Core/Event/Events/KeyEvent.h" 58 using WindowHandle = GLFWwindow*;
61 GLFWwindow* window =
nullptr;
62 int width = 0, height = 0;
64 mutable std::bitset<350> keyHeld;
65 mutable std::bitset<350> keyPressed;
66 mutable std::bitset<350> keyReleased;
67 CursorMode cursorMode = CursorMode::NORMAL;
68 bool doubleBuffer =
false;
69 Vector2 windowPosition{ 0.0f, 0.0f };
70 Vector2 cursorPosition{ 0.0f, 0.0f };
73 void Move(
Window&& window);
76 Window(
int width,
int height,
const MxString& title);
83 int GetHeight()
const;
86 void PullEvents()
const;
88 Vector2 GetCursorPosition()
const;
89 Vector2 GetWindowPosition()
const;
90 CursorMode GetCursorMode()
const;
91 const MxString& GetTitle()
const;
92 bool IsKeyHeld(KeyCode key)
const;
93 bool IsKeyPressed(KeyCode key)
const;
94 bool IsKeyReleased(KeyCode key)
const;
95 WindowHandle GetNativeHandle();
97 bool IsCreated()
const;
101 Window& UseDebugging(
bool value =
true);
102 Window& UseDoubleBuffering(
bool value =
true);
103 Window& UseCursorMode(CursorMode cursor);
104 Window& UseCursorPosition(
const Vector2& pos);
105 Window& UseTitle(
const MxString& title);
106 Window& UseWindowPosition(
int xpos,
int ypos);
107 Window& UseWindowSize(
int width,
int height);
109 Window& UseProfile(
int majorVersion,
int minorVersion, Profile profile);
Definition: Application.cpp:49