diff options
author | crupest <crupest@outlook.com> | 2022-01-12 23:13:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 23:13:10 +0800 |
commit | 276ae73fa444c16f34a379ae9d8f58c883056b4a (patch) | |
tree | 96f4d7103976836e918b4fa1db0fdbb80777986e /src/win/gui/InputMethod.cpp | |
parent | 01f98ce88950cdb729f5db58bf26f2fffa1c326c (diff) | |
parent | 65c799c5339ba37bea2217b168e96b15aceaef85 (diff) | |
download | cru-276ae73fa444c16f34a379ae9d8f58c883056b4a.tar.gz cru-276ae73fa444c16f34a379ae9d8f58c883056b4a.tar.bz2 cru-276ae73fa444c16f34a379ae9d8f58c883056b4a.zip |
Merge pull request #44 from crupest/dev
Windows development.
Diffstat (limited to 'src/win/gui/InputMethod.cpp')
-rw-r--r-- | src/win/gui/InputMethod.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/win/gui/InputMethod.cpp b/src/win/gui/InputMethod.cpp index cc237e88..47e17109 100644 --- a/src/win/gui/InputMethod.cpp +++ b/src/win/gui/InputMethod.cpp @@ -104,19 +104,19 @@ CompositionClauses GetCompositionClauses(HIMC imm_context, int target_start, return result; } -std::u16string GetString(HIMC imm_context) { +String GetString(HIMC imm_context) { LONG string_size = ::ImmGetCompositionString(imm_context, GCS_COMPSTR, NULL, 0); - std::u16string result((string_size / sizeof(char16_t)), 0); + String result((string_size / sizeof(char16_t)), 0); ::ImmGetCompositionString(imm_context, GCS_COMPSTR, result.data(), string_size); return result; } -std::u16string GetResultString(HIMC imm_context) { +String GetResultString(HIMC imm_context) { LONG string_size = ::ImmGetCompositionString(imm_context, GCS_RESULTSTR, NULL, 0); - std::u16string result((string_size / sizeof(char16_t)), 0); + String result((string_size / sizeof(char16_t)), 0); ::ImmGetCompositionString(imm_context, GCS_RESULTSTR, result.data(), string_size); return result; @@ -217,9 +217,7 @@ IEvent<std::nullptr_t>* WinInputMethodContext::CompositionEvent() { return &composition_event_; } -IEvent<std::u16string_view>* WinInputMethodContext::TextEvent() { - return &text_event_; -} +IEvent<StringView>* WinInputMethodContext::TextEvent() { return &text_event_; } void WinInputMethodContext::OnWindowNativeMessage( WindowNativeMessageEventArgs& args) { @@ -275,7 +273,7 @@ void WinInputMethodContext::OnWindowNativeMessage( } } -std::u16string WinInputMethodContext::GetResultString() { +String WinInputMethodContext::GetResultString() { auto himc = GetHIMC(); auto result = win::GetResultString(himc.Get()); return result; |