diff options
author | crupest <crupest@outlook.com> | 2020-03-29 23:10:00 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-03-29 23:10:00 +0800 |
commit | 85322feaa9f646bf9e6f35f57f6d08244b298a46 (patch) | |
tree | d41211c4f2913921b550e798f3ac05c45b3f4c1a /include/cru/win/native/window.hpp | |
parent | 671860a02aa1ecc41eac1cf1e0f28c504bf9c37c (diff) | |
download | cru-85322feaa9f646bf9e6f35f57f6d08244b298a46.tar.gz cru-85322feaa9f646bf9e6f35f57f6d08244b298a46.tar.bz2 cru-85322feaa9f646bf9e6f35f57f6d08244b298a46.zip |
...
Diffstat (limited to 'include/cru/win/native/window.hpp')
-rw-r--r-- | include/cru/win/native/window.hpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/cru/win/native/window.hpp b/include/cru/win/native/window.hpp index d5f41e47..819fbfd9 100644 --- a/include/cru/win/native/window.hpp +++ b/include/cru/win/native/window.hpp @@ -73,8 +73,12 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { override { return &mouse_up_event_; } - IEvent<int>* KeyDownEvent() override { return &key_down_event_; } - IEvent<int>* KeyUpEvent() override { return &key_up_event_; } + IEvent<platform::native::NativeKeyEventArgs>* KeyDownEvent() override { + return &key_down_event_; + } + IEvent<platform::native::NativeKeyEventArgs>* KeyUpEvent() override { + return &key_up_event_; + } IEvent<std::string>* CharEvent() override { return &char_event_; }; IEvent<WindowNativeMessageEventArgs&>* NativeMessageEvent() { @@ -106,12 +110,16 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { void OnMouseMoveInternal(POINT point); void OnMouseLeaveInternal(); - void OnMouseDownInternal(platform::native::MouseButton button, POINT point); - void OnMouseUpInternal(platform::native::MouseButton button, POINT point); + void OnMouseDownInternal(platform::native::MouseButton button, POINT point, + platform::native::KeyModifier modifier); + void OnMouseUpInternal(platform::native::MouseButton button, POINT point, + platform::native::KeyModifier modifier); void OnMouseWheelInternal(short delta, POINT point); - void OnKeyDownInternal(int virtual_code); - void OnKeyUpInternal(int virtual_code); + void OnKeyDownInternal(int virtual_code, + platform::native::KeyModifier modifier); + void OnKeyUpInternal(int virtual_code, + platform::native::KeyModifier modifier); void OnCharInternal(wchar_t c); void OnActivatedInternal(); @@ -147,8 +155,8 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { Event<Point> mouse_move_event_; Event<platform::native::NativeMouseButtonEventArgs> mouse_down_event_; Event<platform::native::NativeMouseButtonEventArgs> mouse_up_event_; - Event<int> key_down_event_; - Event<int> key_up_event_; + Event<platform::native::NativeKeyEventArgs> key_down_event_; + Event<platform::native::NativeKeyEventArgs> key_up_event_; Event<std::string> char_event_; Event<WindowNativeMessageEventArgs&> native_message_event_; |