diff options
Diffstat (limited to 'include/cru/platform/native')
-rw-r--r-- | include/cru/platform/native/InputMethod.hpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/include/cru/platform/native/InputMethod.hpp b/include/cru/platform/native/InputMethod.hpp index 1ede15b2..1c5b287e 100644 --- a/include/cru/platform/native/InputMethod.hpp +++ b/include/cru/platform/native/InputMethod.hpp @@ -18,28 +18,11 @@ struct CompositionClause { using CompositionClauses = std::vector<CompositionClause>; struct CompositionText { - std::string text; + std::u16string text; CompositionClauses clauses; TextRange selection; }; -inline std::ostream& operator<<(std::ostream& stream, - const CompositionText& composition_text) { - stream << "text: " << composition_text.text << "\n" - << "clauses:\n"; - for (int i = 0; i < static_cast<int>(composition_text.clauses.size()); i++) { - const auto& clause = composition_text.clauses[i]; - stream << "\t" << i << ". start:" << clause.start << " end:" << clause.end; - if (clause.target) { - stream << " target"; - } - stream << "\n"; - } - stream << "selection: position:" << composition_text.selection.position - << " count:" << composition_text.selection.count; - return stream; -} - struct IInputMethodContext : virtual INativeResource { // Return true if you should draw composition text manually. Return false if // system will take care of that for you. @@ -67,7 +50,7 @@ struct IInputMethodContext : virtual INativeResource { // Triggered every time composition text changes. virtual IEvent<std::nullptr_t>* CompositionEvent() = 0; - virtual IEvent<std::string_view>* TextEvent() = 0; + virtual IEvent<std::u16string_view>* TextEvent() = 0; }; struct IInputMethodManager : virtual INativeResource { |