2 #ifndef ENIGMA_WINDOW_H
3 #define ENIGMA_WINDOW_H
6 #include <GLFW/glfw3.h>
27 using EventCallback = std::function<void(
Event&)>;
37 void PollEvents() const noexcept;
42 void SwapBuffers() const noexcept;
47 void Destroy() noexcept;
53 [[nodiscard]] const std::pair<std::int32_t, std::int32_t>&
GetSize() const noexcept;
99 [[nodiscard]] const std::
string&
GetTitle() const noexcept;
104 [[nodiscard]] const std::pair<std::int32_t, std::int32_t>&
GetMinimumSize() const noexcept;
109 [[nodiscard]] const std::pair<std::int32_t, std::int32_t>&
GetMaximumSize() const noexcept;
114 [[nodiscard]] const std::pair<std::int32_t, std::int32_t>&
GetPosition() const noexcept;
188 void SetMinimumSize(const std::int32_t minimum_width, const std::int32_t minimum_height) noexcept;
193 void SetMaximumSize(const std::int32_t maximum_width, const std::int32_t maximum_height) noexcept;
212 void SetTitle(const std::
string& title, const std::unique_ptr<std::uint32_t>& fps, const std::unique_ptr<
RAMInfo>& ram_info, const std::unique_ptr<
CPUInfo>& cpu_info) noexcept;
217 void SetPosition(const std::int32_t x, const std::int32_t y) const noexcept;
222 void SetIcon(const std::
string& icon_path) noexcept;
223 void SetIcon(const
byte* iconData, std::
size_t iconDataSize) noexcept;
233 void SetCursor(const std::
string& image_path, const std::int32_t xhot, const std::int32_t yhot) noexcept;
297 bool InitGLFWCallbacks();
299 bool InitOpenGLOptions();
303 EventCallback m_event_callback{};
308 std::string m_title{};
309 std::pair<std::int32_t, std::int32_t> m_position{};
310 std::pair<std::int32_t, std::int32_t> m_size{};
311 std::pair<std::int32_t, std::int32_t> m_minimum_size{};
312 std::pair<std::int32_t, std::int32_t> m_maximum_size{};
313 std::pair<std::int32_t, std::int32_t> m_frame_buffer_size{};
314 std::int32_t m_swap_interval{};
317 GLFWwindow *m_GLFWwindow{};
318 GLFWmonitor *m_monitor{};
319 const GLFWvidmode *m_video_mode{};
322 std::unique_ptr<Cursor> m_cursor{};
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
void SetTitle(const std::string &title, const std::unique_ptr< std::uint32_t > &fps, const std::unique_ptr< RAMInfo > &ram_info, const std::unique_ptr< CPUInfo > &cpu_info) noexcept
std::int32_t GetHeight() const noexcept
bool IsMinimized() const noexcept
void SetCursorPosition(const double xPos, const double yPos) const noexcept
void SetShouldClose(const bool close) const noexcept
const std::pair< std::int32_t, std::int32_t > & GetPosition() const noexcept
bool IsResizable() const noexcept
void Maximize() const noexcept
void Hide() const noexcept
void SetSwapInterval(const std::int32_t interval) noexcept
const std::string & GetTitle() const noexcept
void SetCursor(CursorMode mode) noexcept
float GetAspectRatio() const noexcept
bool IsFocused() const noexcept
bool ShouldClose() const noexcept
void Show() const noexcept
void SetMaximumSize(const std::int32_t maximum_width, const std::int32_t maximum_height) noexcept
bool IsFullscreen() const noexcept
const std::pair< std::int32_t, std::int32_t > & GetMaximumSize() const noexcept
std::int32_t GetSwapInterval() const noexcept
const std::pair< std::int32_t, std::int32_t > & GetSize() const noexcept
const std::pair< std::int32_t, std::int32_t > & GetFrameBufferSize() noexcept
void SetRefreshRate(const std::int32_t refresh_rate) noexcept
const std::pair< std::int32_t, std::int32_t > & GetMinimumSize() const noexcept
std::pair< std::int32_t, std::int32_t > GetMonitorSize() noexcept
std::int32_t GetWidth() const noexcept
std::int32_t GetFrameBufferWidth() noexcept
void Minimize() const noexcept
bool IsHidden() const noexcept
void SetMinimumSize(const std::int32_t minimum_width, const std::int32_t minimum_height) noexcept
std::int32_t GetRefreshRate() noexcept
const GLFWwindow * GetGLFWwindow() const noexcept
void SetFullscreen(bool full_screen) noexcept
Window(const WindowSettings &window_settings=WindowSettings())
void DisableCursor() const noexcept
void SetEventCallback(const EventCallback &callback) noexcept
void EnableCursor() const noexcept
void Focus() const noexcept
std::int32_t GetFrameBufferHeight() noexcept
void HideCursor() const noexcept
void Restore() const noexcept
void SetPosition(const std::int32_t x, const std::int32_t y) const noexcept
bool IsVisible() const noexcept
bool IsDecorated() const noexcept
void SetIcon(const std::string &icon_path) noexcept
bool IsMaximized() const noexcept