Add preliminary support for Chinese-English mixed input.
This commit is contained in:
1 parent
d4f2bcc91e
commit
df6002c03e
15 files changed
+386
-6
No files matched your search
@@ -3,12 +3,15 @@
|
||||
#include "window/ime_windows.h"
|
||||
#include <commctrl.h>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
#include "ipc/ipc.h"
|
||||
#include "config/ime_config.h"
|
||||
#include <windows.h>
|
||||
#include <fmt/xchar.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include "cloud/cloud_ime.h"
|
||||
#include "english/english_ime.h"
|
||||
#include "utils/common_utils.h"
|
||||
#include "session/session_factory.h"
|
||||
|
||||
namespace
|
||||
@@ -27,6 +30,7 @@ const char *SchemeTypeToString(SchemeType scheme_type)
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow)
|
||||
@@ -94,9 +98,14 @@ int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In
|
||||
CloudIme::Start([](const std::string &candidate, const std::string &pinyin, uint64_t generation) {
|
||||
FanyNamedPipe::EnqueueCloudCandidate(candidate, pinyin, generation);
|
||||
});
|
||||
EnglishIme::Start(CommonUtils::get_ime_data_path() + "\\english.db",
|
||||
[](std::vector<WordItem> candidates, const std::string &input, uint64_t generation) {
|
||||
FanyNamedPipe::EnqueueEnglishCandidates(std::move(candidates), input, generation);
|
||||
});
|
||||
|
||||
int ret = CreateCandidateWindow(hInstance);
|
||||
|
||||
EnglishIme::Stop();
|
||||
CloudIme::Stop();
|
||||
|
||||
pipe_running = false;
|
||||
|
||||
Reference in new issue
Block a user