diff options
author | crupest <crupest@outlook.com> | 2021-08-12 21:44:32 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-08-12 21:44:32 +0800 |
commit | 2e379441f69c4fd3049d186f76b25457e6250282 (patch) | |
tree | 893771e5103ca9f3a34bb622251aaacb024cf1c2 /include/cru/platform/gui/Window.hpp | |
parent | d718b0f576aeae1fa853124caefc8b0078f1deed (diff) | |
download | cru-2e379441f69c4fd3049d186f76b25457e6250282.tar.gz cru-2e379441f69c4fd3049d186f76b25457e6250282.tar.bz2 cru-2e379441f69c4fd3049d186f76b25457e6250282.zip |
...
Diffstat (limited to 'include/cru/platform/gui/Window.hpp')
-rw-r--r-- | include/cru/platform/gui/Window.hpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/cru/platform/gui/Window.hpp b/include/cru/platform/gui/Window.hpp index b2129322..3502868a 100644 --- a/include/cru/platform/gui/Window.hpp +++ b/include/cru/platform/gui/Window.hpp @@ -1,14 +1,38 @@ #pragma once #include "Base.hpp" +#include "Keyboard.hpp" + #include "cru/common/Event.hpp" #include <string_view> namespace cru::platform::gui { +enum class FocusChangeType { Gain, Lost }; + +enum class MouseEnterLeaveType { Enter, Leave }; + +struct NativeMouseButtonEventArgs { + MouseButton button; + Point point; + KeyModifier modifier; +}; + +struct NativeMouseWheelEventArgs { + // Positive means down. Negative means up. + float delta; + Point point; + KeyModifier modifier; +}; + +struct NativeKeyEventArgs { + KeyCode key; + KeyModifier modifier; +}; + // Represents a native window, which exposes some low-level events and // operations. -struct INativeWindow : virtual INativeResource { +struct INativeWindow : virtual IPlatformResource { virtual void Close() = 0; virtual INativeWindow* GetParent() = 0; |