8#ifndef GALAXY_CORE_WINDOW_HPP_
9#define GALAXY_CORE_WINDOW_HPP_
13#include <entt/signal/fwd.hpp>
14#include <glm/vec2.hpp>
15#include <SDL3/SDL_events.h>
16#include <SDL3/SDL_video.h>
57 void close()
noexcept;
62 void swap()
const noexcept;
67 void show()
const noexcept;
72 void hide()
const noexcept;
92 void raise()
const noexcept;
105 void resize(
const int width,
const int height)
const noexcept;
135 void set_icon(
const std::string& icon)
noexcept;
175 SDL_Window*
handle()
const noexcept;
183 SDL_GLContext
context()
const noexcept;
Physical keyboard device and state management.
Physical mouse device and state management.
RAII Window. Handles events, input & display.
SDL_Window * m_window
SDL window handle.
void set_fullscreen(const bool fullscreen) const noexcept
Toggle fullscreen.
SDL_Window * handle() const noexcept
Get SDL window pointer.
SDL_GLContext context() const noexcept
Get SDL GL context.
void swap() const noexcept
Swap backbuffer with window framebuffer.
Window(const Window &)=delete
Copy constructor.
bool is_open() const noexcept
Is the window open or closed.
void raise() const noexcept
Raise the window to be on top of other windows.
void resize(const int width, const int height) const noexcept
Resizes window.
Window & operator=(Window &&)=delete
Move assignment operator.
Window()
Window creation constructor.
void maximize() const noexcept
Maximize window.
Keyboard & get_keyboard() noexcept
Get keyboard.
void append_title(const std::string &append)
Append to window title.
Mouse m_mouse
Mouse assigned to window.
Keyboard m_keyboard
Keyboard assigned to window.
void close() noexcept
Close window.
void set_taskbar_progress(const float progress) noexcept
Sets the taskbar icon progress overlay.
bool m_open
Window state flag.
glm::ivec2 get_pixel_size() noexcept
Get window size in pixels.
void hide() const noexcept
Hide window.
void process_events(entt::dispatcher &dispatcher)
Handles all events for the window in this frame and sends to the dispatcher.
SDL_GLContext m_context
SDL OpenGL context.
void show() const noexcept
Show window.
Window(Window &&)=delete
Move constructor.
Window & operator=(const Window &)=delete
Copy assignment operator.
void minimize() const noexcept
Minimize window.
SDL_Event m_events
Core event data.
Mouse & get_mouse() noexcept
Get mouse cursor.
void set_icon(const std::string &icon) noexcept
Set window icon.
void request_attention() const noexcept
Flash window on taskbar for user attention.
void restore() const noexcept
Restore window to previous *mize state.