4#include "flint/graphics/types/color.h"
5#include "flint/input/event.h"
6#include "flint/math/types.h"
15 enum class CursorType {
58 virtual void setTitle(
const std::string &name) = 0;
virtual void display()=0
Present the current frame to the screen.
virtual Vec2f mapPixelToCoords(Vec2f pixel) const =0
Return the current mouse cursor position in window-space pixels.
virtual void pollEvents(const std::function< void(const AppEvent &)> &handler)=0
Poll all pending OS events and dispatch them to handler.
virtual Vec2i getSize() const =0
Return the current window size in pixels.
virtual bool isFullscreen() const =0
Return true if the window is currently in fullscreen mode.
virtual void close()=0
Request that the window close.
virtual bool isOpen() const =0
Return true if the window is open and the application should keep running.
virtual Vec2f getMousePosition() const =0
Return the current mouse cursor position in window-space pixels.
virtual bool hasFocus() const =0
Return true if the window currently has input focus.
virtual void addGlobalEventListener(std::function< void(const AppEvent &)> callback)=0
Register a global event listener that receives every polled event.
virtual void setTitle(const std::string &name)=0
Set the window title bar text.
virtual void setFullscreen(bool fullscreen)=0
Enter or exit fullscreen mode.
virtual void setMouseCursor(CursorType type)=0
Set the mouse cursor shape.
virtual void * getNativeHandle() const =0
Return the platform-native window handle (e.g. HWND, SDL_Window*).
Abstract interface for a platform window.
A tagged union representing a single application input or window event.