23 [[nodiscard]]
static std::expected<std::unique_ptr<Window>, std::string>
Create(std::wstring_view title,
25 uint32_t clientHeight);
49 using MessageHook = std::function<bool(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)>;
56 static LRESULT CALLBACK
WindowProcedure(HWND handle, UINT message, WPARAM wParam, LPARAM lParam);
57 LRESULT
HandleMessage(UINT message, WPARAM wParam, LPARAM lParam);
static std::expected< std::unique_ptr< Window >, std::string > Create(std::wstring_view title, uint32_t clientWidth, uint32_t clientHeight)
std::function< bool(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)> MessageHook
Window(const Window &)=delete
std::vector< InputEvent > TakeInputEvents()
uint32_t ClientHeight() const
LRESULT HandleMessage(UINT message, WPARAM wParam, LPARAM lParam)
uint32_t ClientWidth() const
std::vector< InputEvent > m_inputEvents
MessageHook m_messageHook
void SetMessageHook(MessageHook hook)
void AddWheel(WPARAM wParam)
Window & operator=(Window &&)=delete
static LRESULT CALLBACK WindowProcedure(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)
Window & operator=(const Window &)=delete
void AddButton(InputKind kind, PointerButton button, LPARAM lParam)