33#ifndef DVD_DISPLAY_WINDOW_H_
34#define DVD_DISPLAY_WINDOW_H_
98struct WindowDescriptor;
140 [[nodiscard]] inline
bool isHovered() const noexcept;
141 [[nodiscard]] inline
bool hasFocus() const noexcept;
143 [[nodiscard]] inline
bool minimized() const noexcept;
146 [[nodiscard]] inline
bool maximized() const noexcept;
149 [[nodiscard]] inline
bool hidden() const noexcept;
150 void hidden(
bool state) noexcept;
152 [[nodiscard]] inline
bool decorated() const noexcept;
155 [[nodiscard]] inline
bool fullscreen() const noexcept;
182 [[nodiscard]] inline const
char*
title() const noexcept;
183 template<typename... Args>
184 void title(const
char* format, Args&& ...args) noexcept;
200 [[nodiscard]]
bool grabState() const noexcept;
201 void grabState(
bool state) const noexcept;
203 [[nodiscard]]
bool onSDLEvent(SDL_Event event) override;
251#include "DisplayWindow.inl"
bool hasFocus() const noexcept
vec2< I32 > getPosition(bool global=false, bool offset=false) const
void bringToFront() const noexcept
vec2< U16 > getDrawableSize() const noexcept
bool _internalMoveEvent
Did we generate the window move event?
void updateDrawableSize() noexcept
void handleChangeWindowType(WindowType newWindowType)
bool hidden() const noexcept
bool maximized() const noexcept
bool minimized() const noexcept
WindowHandle handle() const noexcept
virtual ~DisplayWindow() override
std::array< GFX::CommandBufferQueue, Config::MAX_FRAMES_IN_FLIGHT > _commandBufferQueues
ErrorCode destroyWindow()
Rect< I32 > windowViewport() const noexcept
void clearEventListeners(WindowEvent windowEvent)
bool _internalResizeEvent
void changeToPreviousType()
GFX::CommandBufferQueue & getCurrentCommandBufferQueue()
bool onSDLEvent(SDL_Event event) override
vector< DELEGATE< bool, WindowEventArgs > > EventListeners
std::array< EventListeners, to_base(WindowEvent::COUNT)> _eventListeners
const Rect< I32 > & renderingViewport() const noexcept
bool isHovered() const noexcept
bool decorated() const noexcept
void centerWindowPosition()
Centering is also easier via SDL.
Rect< I32 > _renderingViewport
vec2< U16 > _prevDimensions
void setPosition(I32 x, I32 y, bool global=false, bool offset=false)
Window positioning is handled by SDL.
DELEGATE< void > _destroyCbk
bool setDimensions(U16 width, U16 height)
width and height get adjusted to the closest supported value
bool fullscreen() const noexcept
vec2< U16 > _drawableSize
const char * title() const noexcept
void destroyCbk(const DELEGATE< void > &destroyCbk)
U8 prevOpacity() const noexcept
I32 currentDisplayIndex() const noexcept
vec2< U16 > getDimensions() const noexcept
SDL_Window * getRawWindow() const noexcept
void opacity(U8 opacity) noexcept
Rect< I32 > getBorderSizes() const noexcept
void changeType(WindowType newType)
DELEGATE< bool, const WindowEventArgs & > EventListener
void notifyListeners(WindowEvent event, const WindowEventArgs &args)
bool grabState() const noexcept
void addEventListener(WindowEvent windowEvent, const EventListener &listener)
ErrorCode init(U32 windowFlags, WindowType initialType, const WindowDescriptor &descriptor)
vec2< U16 > getPreviousDimensions() const noexcept
static I64 s_cursorWindowGUID
Utility class that adds basic GUID management to objects.
PlatformContext & context() noexcept
Handle console commands that start with a forward slash.
DELEGATE_STD< Ret, Args... > DELEGATE
eastl::vector< Type > vector
constexpr T toBit(const T X)
Converts an arbitrary positive integer value to a bitwise value used for masks.
constexpr auto to_base(const Type value) -> Type