20 #ifndef ANTKEEPER_APP_WINDOW_HPP
21 #define ANTKEEPER_APP_WINDOW_HPP
49 virtual void set_title(
const std::string& title) = 0;
111 [[nodiscard]]
inline const std::string&
get_title() const noexcept
event::publisher< window_restored_event > m_restored_publisher
virtual void set_position(const math::ivec2 &position)=0
Changes the position of the window.
virtual void set_size(const math::ivec2 &size)=0
Changes the size of the window.
event::publisher< window_maximized_event > m_maximized_publisher
const math::ivec2 & get_size() const noexcept
Returns the current size of the window, in display units.
event::channel< window_closed_event > & get_closed_channel() noexcept
Returns the channel through which window closed events are published.
virtual void set_maximized(bool maximized)=0
Maximizes or unmaximizes the window.
event::channel< window_moved_event > & get_moved_channel() noexcept
Returns the channel through which window moved events are published.
event::channel< window_restored_event > & get_restored_channel() noexcept
Returns the channel through which window restored events are published.
math::ivec2 m_minimum_size
bool is_maximized() const noexcept
Returns true if the window is maximized, false otherwise.
virtual void make_current()=0
Makes the window's graphics context current.
event::publisher< window_closed_event > m_closed_publisher
math::ivec2 m_viewport_size
math::ivec2 m_windowed_position
math::ivec2 m_windowed_size
event::channel< window_minimized_event > & get_minimized_channel() noexcept
Returns the channel through which window minimized events are published.
bool is_fullscreen() const noexcept
Returns true if the window is in fullscreen mode, false otherwise.
event::publisher< window_focus_changed_event > m_focus_changed_publisher
event::channel< window_focus_changed_event > & get_focus_changed_channel() noexcept
Returns the channel through which window focus changed events are published.
const math::ivec2 & get_maximum_size() const noexcept
Returns the maximum size of the window, in display units.
event::channel< window_resized_event > & get_resized_channel() noexcept
Returns the channel through which window resized events are published.
bool get_v_sync() const noexcept
Returns true if the v-sync is enabled, false otherwise.
virtual void set_title(const std::string &title)=0
Changes the title of the window.
event::channel< window_maximized_event > & get_maximized_channel() noexcept
Returns the channel through which window maximized events are published.
virtual const gl::pipeline & get_graphics_pipeline() const noexcept=0
Returns the graphics pipeline associated with this window.
const math::ivec2 & get_viewport_size() const noexcept
Returns the current size of the window's drawable viewport, in pixels.
const math::ivec2 & get_windowed_position() const noexcept
Returns the windowed (non-maximized, non-fullscreen) position of the window, in display units.
const math::ivec2 & get_windowed_size() const noexcept
Returns the windowed (non-maximized, non-fullscreen) size of the window, in display units.
virtual void set_maximum_size(const math::ivec2 &size)=0
Sets the maximum size of the window.
const math::ivec2 & get_position() const noexcept
Returns the current position of the window, in display units.
virtual void set_minimum_size(const math::ivec2 &size)=0
Sets the minimum size of the window.
virtual void set_fullscreen(bool fullscreen)=0
Enables or disables fullscreen mode.
const std::string & get_title() const noexcept
Returns the title of the window.
event::publisher< window_moved_event > m_moved_publisher
event::publisher< window_minimized_event > m_minimized_publisher
virtual void set_v_sync(bool v_sync)=0
Enables or disables v-sync.
event::publisher< window_resized_event > m_resized_publisher
const math::ivec2 & get_minimum_size() const noexcept
Returns the minimum size of the window, in display units.
math::ivec2 m_maximum_size
virtual void swap_buffers()=0
Swaps the front and back buffers of the window's graphics context.
Channel through which messages are published.
Publishes messages to subscribers.
Graphics pipeline interface.
Publish-subscribe messaging.
Graphics library interface.
@ position
Vertex position (vec3)
Event generated when a window has been requested to close.