| 124 | } |
| 125 | |
| 126 | void 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 | |
| 147 | void Client::updateCommitString(Json::Value& msg, Ime::EditSession* session) { |
| 148 | // handle comosition and commit strings |
no test coverage detected