39 [[nodiscard]]
bool should_close() const override;
41 [[nodiscard]] inline const
WindowState& get_state()
const override
53 m_input_config = config;
58 return m_input_config;
63 [[nodiscard]]
void* get_native_handle()
const override;
65 [[nodiscard]]
void* get_native_display()
const override;
69 void set_title(
const std::string& title)
override;
71 void set_size(uint32_t width, uint32_t height)
override;
73 void set_position(uint32_t x, uint32_t y)
override;
87 void set_graphics_registered(
bool registered)
override;
90 GLFWwindow* m_window =
nullptr;
96 std::atomic<bool> m_graphics_registered {
false };
101 void setup_callbacks();
103 static void glfw_window_size_callback(GLFWwindow* window,
int width,
int height);
104 static void glfw_window_close_callback(GLFWwindow* window);
105 static void glfw_window_focus_callback(GLFWwindow* window,
int focused);
106 static void glfw_framebuffer_size_callback(GLFWwindow* window,
int width,
int height);
107 static void glfw_key_callback(GLFWwindow* window,
int key,
int scancode,
int action,
int mods);
108 static void glfw_cursor_pos_callback(GLFWwindow* window,
double xpos,
double ypos);
109 static void glfw_mouse_button_callback(GLFWwindow* window,
int button,
int action,
int mods);
110 static void glfw_scroll_callback(GLFWwindow* window,
double xoffset,
double yoffset);
bool is_graphics_registered() const override
Check if window is registered with graphics subsystem.
Vruta::EventSource m_event_source
const InputConfig & get_input_config() const override
Get current input configuration.
GlfwWindow(const GlfwWindow &)=delete
WindowCreateInfo m_create_info
void set_input_config(const InputConfig &config) override
Set input configuration (keyboard, mouse, cursor)
const Vruta::EventSource & get_event_source() const override
const WindowCreateInfo & get_create_info() const override
GlfwWindow & operator=(const GlfwWindow &)=delete
GLFWwindow * get_glfw_handle() const
Vruta::EventSource & get_event_source() override
Gets the event source for awaiting events.
InputConfig m_input_config
WindowEventCallback m_event_callback
Platform-agnostic window wrapper.
Platform-agnostic window wrapper.
Awaitable event stream for window events.
std::function< void(const WindowEvent &)> WindowEventCallback
Configuration hints for GLFW initialization.
System-wide configuration for visual stream processing.
Configuration for creating a single window instance.
Runtime state of a window (mutable by system, read by user)