From 3bf5b1fcf2315a1ce180ad69eb6bb1e57be37ca5 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 7 Jul 2020 00:31:11 +0800 Subject: ... --- include/cru/platform/native/InputMethod.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include/cru/platform') diff --git a/include/cru/platform/native/InputMethod.hpp b/include/cru/platform/native/InputMethod.hpp index 1c5b287e..c975825f 100644 --- a/include/cru/platform/native/InputMethod.hpp +++ b/include/cru/platform/native/InputMethod.hpp @@ -23,6 +23,24 @@ struct CompositionText { TextRange selection; }; +// inline std::basic_ostream& operator<<( +// std::basic_ostream& stream, +// const CompositionText& composition_text) { +// stream << u"text: " << composition_text.text << u"\n" << u"clauses:\n"; +// for (int i = 0; i < static_cast(composition_text.clauses.size()); i++) { +// const auto& clause = composition_text.clauses[i]; +// stream << u"\t" << i << u". start:" << clause.start << u" end:" +// << clause.end; +// if (clause.target) { +// stream << u" target"; +// } +// stream << u"\n"; +// } +// stream << u"selection: position:" << composition_text.selection.position +// << u" 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. -- cgit v1.2.3