diff options
Diffstat (limited to 'include/cru/win/native')
-rw-r--r-- | include/cru/win/native/input_method.hpp | 3 | ||||
-rw-r--r-- | include/cru/win/native/window.hpp | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/include/cru/win/native/input_method.hpp b/include/cru/win/native/input_method.hpp index 8e17abd5..ff867f3f 100644 --- a/include/cru/win/native/input_method.hpp +++ b/include/cru/win/native/input_method.hpp @@ -61,6 +61,8 @@ class WinInputMethodContext : public WinNativeResource, IEvent<std::nullptr_t>* CompositionEvent() override; + IEvent<std::string_view>* TextEvent() override; + private: void OnWindowNativeMessage(WindowNativeMessageEventArgs& args); @@ -76,6 +78,7 @@ class WinInputMethodContext : public WinNativeResource, Event<std::nullptr_t> composition_start_event_; Event<std::nullptr_t> composition_end_event_; Event<std::nullptr_t> composition_event_; + Event<std::string_view> text_event_; }; class WinInputMethodManager : public WinNativeResource, diff --git a/include/cru/win/native/window.hpp b/include/cru/win/native/window.hpp index 83497fa6..59b38ab5 100644 --- a/include/cru/win/native/window.hpp +++ b/include/cru/win/native/window.hpp @@ -72,7 +72,6 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { IEvent<platform::native::NativeKeyEventArgs>* KeyUpEvent() override { return &key_up_event_; } - IEvent<std::string_view>* CharEvent() override { return &char_event_; }; IEvent<WindowNativeMessageEventArgs&>* NativeMessageEvent() { return &native_message_event_; @@ -109,7 +108,6 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { void OnMouseWheelInternal(short delta, POINT point); void OnKeyDownInternal(int virtual_code); void OnKeyUpInternal(int virtual_code); - void OnCharInternal(wchar_t c); void OnActivatedInternal(); void OnDeactivatedInternal(); @@ -146,14 +144,8 @@ class WinNativeWindow : public WinNativeResource, public virtual INativeWindow { Event<platform::native::NativeMouseButtonEventArgs> mouse_up_event_; Event<platform::native::NativeKeyEventArgs> key_down_event_; Event<platform::native::NativeKeyEventArgs> key_up_event_; - Event<std::string_view> char_event_; Event<WindowNativeMessageEventArgs&> native_message_event_; - - // WM_CHAR may be sent twice successively with two utf-16 code units of - // surrogate pair when character is from supplementary planes. This field is - // used to save the previous one. - wchar_t last_wm_char_event_wparam_; }; class WinNativeWindowResolver : public WinNativeResource, |