MCPcopy Create free account
hub / github.com/EasyIME/PIME / updateMessageWindow

Method updateMessageWindow

PIMETextService/PIMEClient.cpp:126–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void Client::updateMessageWindow(Json::Value& msg, Ime::EditSession* session, bool& endComposition) {
127 const auto& showMessageVal = msg["showMessage"];
128 if (showMessageVal.isObject()) {
129 const Json::Value& message = showMessageVal["message"];
130 const Json::Value& duration = showMessageVal["duration"];
131 if (message.isString() && duration.isInt()) {
132 if (!textService_->isComposing()) {
133 textService_->startComposition(session->context());
134 endComposition = true;
135 }
136 textService_->showMessage(session, utf8ToUtf16(message.asCString()), duration.asInt());
137 }
138 }
139
140 // hide message
141 const auto& hideMessageVal = msg["hideMessage"];
142 if (hideMessageVal.isBool() && hideMessageVal.asBool()) {
143 textService_->hideMessage();
144 }
145}
146
147void Client::updateCommitString(Json::Value& msg, Ime::EditSession* session) {
148 // handle comosition and commit strings

Callers 2

updateCommitStringMethod · 0.45
updateCompositionMethod · 0.45

Calls 3

isComposingMethod · 0.80
showMessageMethod · 0.45
hideMessageMethod · 0.45

Tested by

no test coverage detected