| |
---|
| | } |
---|
| | |
---|
| | HonokaInstance::~HonokaInstance() |
---|
| | { |
---|
| | HonokaTimer::destruct(); |
---|
| | if (save_setting) { |
---|
| | _scim_config->write(String(HONOKA_PREVIOUS_PREEDITOR),m_preeditor->getName()); |
---|
| | _scim_config->write(String(HONOKA_PREVIOUS_PREDICTOR),m_predictor->getName()); |
---|
| | _scim_config->write(String(HONOKA_PREVIOUS_CONVERTOR),m_convertor->getName()); |
---|
| | } |
---|
| | for(unsigned int i = 0;i < plugins.size();i ++) { |
---|
| | plugins[i].deleteInstance(plugins[i].instance); |
---|
| | dlclose(plugins[i].dll); |
---|
| | } |
---|
| | delete acpredictor; |
---|
| | delete m_multi; |
---|
| | unload(); |
---|
| | } |
---|
| | |
---|
| | /*! |
---|
| | \fn HonokaInstance::split(const String &str,const char &sep) |
---|
| |
---|
| | |
---|
| | return; |
---|
| | } |
---|
| | |
---|
| | |
---|
| | /*! |
---|
| | \fn HonokaInstance::unload() |
---|
| | */ |
---|
| | void HonokaInstance::unload() |
---|
| | { |
---|
| | HonokaTimer::destruct(); |
---|
| | m_preeditor->reset(); |
---|
| | for(unsigned int i = 0;i < plugins.size();i ++) { |
---|
| | plugins[i].deleteInstance(plugins[i].instance); |
---|
| | dlclose(plugins[i].dll); |
---|
| | } |
---|
| | convertors.clear(); |
---|
| | preeditors.clear(); |
---|
| | predictors.clear(); |
---|
| | delete acpredictor; |
---|
| | delete m_multi; |
---|
| | plugins.clear(); |
---|
| | } |
---|
| | |
---|
| | /*! |
---|
| | \fn HonokaInstance::init() |
---|
| | */ |
---|
| |
---|
| | String(HONOKA_DEFAULT_KEY_RESULTTOPREEDIT))); |
---|
| | scim_string_to_key_list(k_multi_conversion, |
---|
| | _scim_config->read(String(HONOKA_CONFIG_KEY_MULTI_CONVERSION), |
---|
| | String(HONOKA_DEFAULT_KEY_MULTI_CONVERSION))); |
---|
| | scim_string_to_key_list(k_allreset, |
---|
| | _scim_config->read(String(HONOKA_CONFIG_KEY_ALLRESET), |
---|
| | String(HONOKA_DEFAULT_KEY_ALLRESET))); |
---|
| | for(unsigned i = 0;i < 10;i ++) { |
---|
| | char a[3]; |
---|
| | sprintf(a,"%d",i); |
---|
| | scim_string_to_key_list(k_selection[i], |
---|
| |
---|
| | \fn HonokaInstance::process_preedit_key_event(const KeyEvent &key) |
---|
| | */ |
---|
| | bool HonokaInstance::process_preedit_key_event(const KeyEvent &key) |
---|
| | { |
---|
| | if (k_allreset.comp(key)) { |
---|
| | unload(); |
---|
| | loadPlugins(); |
---|
| | init(); |
---|
| | m_proplist.clear(); |
---|
| | updateProperty(); |
---|
| | updatePreEditor(); |
---|
| | return true; |
---|
| | } |
---|
| | if (!m_preeditor->getTextLength()) pStringType = NORMAL; |
---|
| | // PreEdit時のキーイベント。 |
---|
| | // PreEditorのキーイベントフック。 |
---|
| | if (m_preeditor->keyEventHook(key)) { |
---|
| |
---|
| | |