// called when the keyboard is opened or closed // virtual void TextService::onKeyboardStatusChanged(bool opened) { Ime::TextService::onKeyboardStatusChanged(opened); if(client_) client_->onKeyboardStatusChanged(opened); if(opened) { // keyboard is opened } else { // keyboard is closed if(isComposing()) { // end current composition if needed ITfContext* context = currentContext(); if(context) { endComposition(context); context->Release(); } } if(showingCandidates()) // disable candidate window if it's opened hideCandidates(); hideMessage(); // hide message window, if there's any } }
void GeneratorBase::doComposition(CIDL::CompositionDef_ptr composition) { beginComposition(composition); endComposition(composition); }