17 struct ApplicationSpecification;
22 enum class WindowState
43 unsigned int GetHeight() const noexcept
47 glm::ivec2 GetSize() const noexcept
49 return { m_Width, m_Height };
55 m_EventCallback = callback;
68 VkResult
CreateSurface(VkInstance instance,
const VkAllocationCallbacks* allocator,
69 VkSurfaceKHR* surface)
const;
94 GLFWwindow* m_Window =
nullptr;
96 unsigned int m_Width = 0, m_Height = 0;
97 std::function<
void(
Event&)> m_EventCallback;
99 bool m_Fullscreen = false;
100 glm::ivec2 m_Size{ 0, 0 };
101 glm::ivec2 m_FullscreenSize{ 0, 0 };
105 static uint8_t s_GLFWWindowCount;
106 static uint32_t s_WindowIDCounter;
Definition VirtualPath.hpp:11
void Maximize() noexcept
Maximizes the window.
Definition Window.cpp:280
void Restore() noexcept
Restores the window from a minimized or maximized state.
Definition Window.cpp:288
bool IsMaximized() const noexcept
Returns whether the window is currently maximized.
Definition Window.cpp:301
void Minimize() noexcept
Minimizes the window.
Definition Window.cpp:272
std::pair< const char **, uint32_t > GetInstanceExtensions() const
Retrieves the Vulkan instance extensions required by GLFW.
Definition Window.cpp:253
bool IsMinimized() const noexcept
Returns whether the window is currently minimized.
Definition Window.cpp:296
void SetEventCallback(const std::function< void(Event &)> &callback)
Sets the callback that will be invoked when events occur.
Definition Window.hpp:53
unsigned int GetWidth() const noexcept
Accessors for window size.
Definition Window.hpp:39
WindowState GetWindowState() const noexcept
Returns the current window state.
Definition Window.cpp:306
VkResult CreateSurface(VkInstance instance, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface) const
Creates a Vulkan surface for this window.
Definition Window.cpp:266
void SetIcon(const VirtualPath &iconPath)
Sets the window icon from an image file.
Definition Window.cpp:228
void * GetNativeWindow() const noexcept
Returns the underlying native window pointer.
Definition Window.hpp:59
void OnUpdate() noexcept
Polls for and processes events.
Definition Window.cpp:223
Contains configuration options for both the game and the engine.
Definition Specification.hpp:108