diff options
author | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
commit | 74bb9cd27242b9320f99ff4d2b50c3051576cc14 (patch) | |
tree | 744bac5799c593d1d6f81e7b09581bea626f2cde /include/cru/platform/gui/InputMethod.hpp | |
parent | b90c398de829d1ba5329651d75bae82f5e4085fe (diff) | |
download | cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.gz cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.bz2 cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.zip |
...
Diffstat (limited to 'include/cru/platform/gui/InputMethod.hpp')
-rw-r--r-- | include/cru/platform/gui/InputMethod.hpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/include/cru/platform/gui/InputMethod.hpp b/include/cru/platform/gui/InputMethod.hpp deleted file mode 100644 index a34aba74..00000000 --- a/include/cru/platform/gui/InputMethod.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once -#include "Base.hpp" - -#include "cru/common/Event.hpp" - -#include <memory> -#include <vector> - -namespace cru::platform::gui { -struct CompositionClause { - int start; - int end; - bool target; -}; - -using CompositionClauses = std::vector<CompositionClause>; - -struct CompositionText { - String text; - CompositionClauses clauses; - TextRange selection; -}; - -struct IInputMethodContext : virtual IPlatformResource { - // Return true if you should draw composition text manually. Return false if - // system will take care of that for you. - virtual bool ShouldManuallyDrawCompositionText() = 0; - - virtual void EnableIME() = 0; - - virtual void DisableIME() = 0; - - virtual void CompleteComposition() = 0; - - virtual void CancelComposition() = 0; - - virtual CompositionText GetCompositionText() = 0; - - // Set the candidate window lefttop. Relative to window lefttop. Use this - // method to prepare typing. - virtual void SetCandidateWindowPosition(const Point& point) = 0; - - // Triggered when user starts composition. - virtual IEvent<std::nullptr_t>* CompositionStartEvent() = 0; - - // Triggered when user stops composition. - virtual IEvent<std::nullptr_t>* CompositionEndEvent() = 0; - - // Triggered every time composition text changes. - virtual IEvent<std::nullptr_t>* CompositionEvent() = 0; - - virtual IEvent<StringView>* TextEvent() = 0; -}; -} // namespace cru::platform::gui - |