{
EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx);
- if (context_scim && context_scim->impl && context_scim == _focused_ic) {
+ if (context_scim && context_scim->impl && context_scim->impl->si && context_scim == _focused_ic) {
_panel_client.prepare (context_scim->id);
context_scim->impl->si->set_prediction_allow (prediction);
_panel_client.send ();
{
EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx);
- if (context_scim && context_scim->impl && context_scim == _focused_ic) {
+ if (context_scim && context_scim->impl && context_scim->impl->si && context_scim == _focused_ic) {
_panel_client.prepare (context_scim->id);
context_scim->impl->si->set_layout (layout);
_panel_client.send ();
if (context_scim && context_scim->impl) {
_panel_client.prepare (context_scim->id);
- if (context_scim == _focused_ic)
+ if (context_scim == _focused_ic && context_scim->impl->si)
context_scim->impl->si->focus_out ();
if (input_panel_ctx == ctx && _scim_initialized) {
}
}
- context_scim->impl->si->set_frontend_data (static_cast <void*> (context_scim));
-
- if (need_reg) _panel_client.register_input_context (context_scim->id, context_scim->impl->si->get_factory_uuid ());
- if (need_cap) set_ic_capabilities (context_scim);
-
- save_current_xid (ctx);
-
- panel_req_focus_in (context_scim);
-// panel_req_update_spot_location (context_scim);
-// panel_req_update_factory_info (context_scim);
-
- if (need_reset) context_scim->impl->si->reset ();
- if (context_scim->impl->is_on) {
- _panel_client.turn_on (context_scim->id);
-// _panel_client.hide_preedit_string (context_scim->id);
-// _panel_client.hide_aux_string (context_scim->id);
-// _panel_client.hide_lookup_table (context_scim->id);
- context_scim->impl->si->focus_in ();
- context_scim->impl->si->set_layout (ecore_imf_context_input_panel_layout_get (ctx));
- context_scim->impl->si->set_prediction_allow (context_scim->impl->prediction_allow);
- LOGD ("ctx : %p. set autocapital type : %d\n", ctx, context_scim->impl->autocapital_type);
- context_scim->impl->si->set_autocapital_type (context_scim->impl->autocapital_type);
- context_scim->impl->si->set_input_hint (context_scim->impl->input_hint);
- context_scim->impl->si->update_bidi_direction (context_scim->impl->bidi_direction);
- if (context_scim->impl->imdata)
- context_scim->impl->si->set_imdata ((const char *)context_scim->impl->imdata, context_scim->impl->imdata_size);
- } else {
- _panel_client.turn_off (context_scim->id);
+ if (context_scim->impl->si) {
+ context_scim->impl->si->set_frontend_data (static_cast <void*> (context_scim));
+
+ if (need_reg) _panel_client.register_input_context (context_scim->id, context_scim->impl->si->get_factory_uuid ());
+ if (need_cap) set_ic_capabilities (context_scim);
+
+ save_current_xid (ctx);
+
+ panel_req_focus_in (context_scim);
+ // panel_req_update_spot_location (context_scim);
+ // panel_req_update_factory_info (context_scim);
+
+ if (need_reset) context_scim->impl->si->reset ();
+ if (context_scim->impl->is_on) {
+ _panel_client.turn_on (context_scim->id);
+ // _panel_client.hide_preedit_string (context_scim->id);
+ // _panel_client.hide_aux_string (context_scim->id);
+ // _panel_client.hide_lookup_table (context_scim->id);
+ context_scim->impl->si->focus_in ();
+ context_scim->impl->si->set_layout (ecore_imf_context_input_panel_layout_get (ctx));
+ context_scim->impl->si->set_prediction_allow (context_scim->impl->prediction_allow);
+ LOGD ("ctx : %p. set autocapital type : %d\n", ctx, context_scim->impl->autocapital_type);
+ context_scim->impl->si->set_autocapital_type (context_scim->impl->autocapital_type);
+ context_scim->impl->si->set_input_hint (context_scim->impl->input_hint);
+ context_scim->impl->si->update_bidi_direction (context_scim->impl->bidi_direction);
+ if (context_scim->impl->imdata)
+ context_scim->impl->si->set_imdata ((const char *)context_scim->impl->imdata, context_scim->impl->imdata_size);
+ } else {
+ _panel_client.turn_off (context_scim->id);
+ }
}
_panel_client.get_active_helper_option (&_active_helper_option);
void *pvoid = &ret;
_panel_client.process_key_event (key, (int*)pvoid);
if (!ret && !(_active_helper_option & ISM_HELPER_WITHOUT_IMENGINE)) {
- ret = _focused_ic->impl->si->process_key_event (key);
+ if (_focused_ic->impl->si)
+ ret = _focused_ic->impl->si->process_key_event (key);
+ else
+ ret = EINA_FALSE;
}
#endif
} else {
- ret = _focused_ic->impl->si->process_key_event (key);
+ if (_focused_ic->impl->si)
+ ret = _focused_ic->impl->si->process_key_event (key);
+ else
+ ret = EINA_FALSE;
}
if (ret == EINA_FALSE) {
if (feed_key_event (ic, _key, false)) return;
_panel_client.prepare (ic->id);
if (!filter_hotkeys (ic, _key)) {
- if (!_focused_ic || !_focused_ic->impl->is_on ||
+ if (!_focused_ic || !_focused_ic->impl->is_on || !_focused_ic->impl->si ||
!_focused_ic->impl->si->process_key_event (_key)) {
_fallback_instance->process_key_event (_key);
}
return;
}
}
- _panel_client.prepare (ic->id);
- ic->impl->si->reset ();
- _panel_client.send ();
+
+ if (ic->impl->si) {
+ _panel_client.prepare (ic->id);
+ ic->impl->si->reset ();
+ _panel_client.send ();
+ }
}
}
if (!check_valid_ic (ic))
return;
+ if (!ic->impl->si)
+ return;
+
SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n";
IMEngineFactoryPointer sf = _backend->get_next_factory ("", "UTF-8", ic->impl->si->get_factory_uuid ());
if (!check_valid_ic (ic))
return;
+ if (!ic->impl->si)
+ return;
+
SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n";
IMEngineFactoryPointer sf = _backend->get_previous_factory ("", "UTF-8", ic->impl->si->get_factory_uuid ());
if (!check_valid_ic (ic))
return;
+ if (!ic->impl->si)
+ return;
+
SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n";
// The same input method is selected, just turn on the IC.
- if (ic->impl->si && (ic->impl->si->get_factory_uuid () == uuid)) {
+ if (ic->impl->si->get_factory_uuid () == uuid) {
turn_on_ic (ic);
return;
}
{
WSCContextISF *context_scim = ctx;
- if (context_scim && context_scim->impl && context_scim == _focused_ic) {
+ if (context_scim && context_scim->impl && context_scim->impl->si && context_scim == _focused_ic) {
_panel_client.prepare (context_scim->id);
context_scim->impl->si->set_prediction_allow (prediction);
_panel_client.send ();
{
WSCContextISF *context_scim = ctx;
- if (context_scim && context_scim->impl && context_scim == _focused_ic) {
+ if (context_scim && context_scim->impl && context_scim->impl->si && context_scim == _focused_ic) {
_panel_client.prepare (context_scim->id);
context_scim->impl->si->set_layout (layout);
_panel_client.send ();
if (context_scim && context_scim->impl) {
_panel_client.prepare (context_scim->id);
- if (context_scim == _focused_ic)
+ if (context_scim == _focused_ic && context_scim->impl->si)
context_scim->impl->si->focus_out ();
// Delete the instance.
}
}
- context_scim->impl->si->set_frontend_data (static_cast <void*> (context_scim));
-
- if (need_reg) _panel_client.register_input_context (context_scim->id, context_scim->impl->si->get_factory_uuid ());
- if (need_cap) set_ic_capabilities (context_scim);
-
- panel_req_focus_in (context_scim);
-// panel_req_update_spot_location (context_scim);
-// panel_req_update_factory_info (context_scim);
-
- if (need_reset) context_scim->impl->si->reset ();
- if (context_scim->impl->is_on) {
- _panel_client.turn_on (context_scim->id);
-// _panel_client.hide_preedit_string (context_scim->id);
-// _panel_client.hide_aux_string (context_scim->id);
-// _panel_client.hide_lookup_table (context_scim->id);
- context_scim->impl->si->focus_in ();
- context_scim->impl->si->set_layout (wsc_context_input_panel_layout_get (ctx->ctx));
- context_scim->impl->si->set_prediction_allow (context_scim->impl->prediction_allow);
- if (context_scim->impl->imdata)
- context_scim->impl->si->set_imdata ((const char *)context_scim->impl->imdata, context_scim->impl->imdata_size);
- } else {
- _panel_client.turn_off (context_scim->id);
- }
+ if (context_scim->impl->si) {
+ context_scim->impl->si->set_frontend_data (static_cast <void*> (context_scim));
+
+ if (need_reg) _panel_client.register_input_context (context_scim->id, context_scim->impl->si->get_factory_uuid ());
+ if (need_cap) set_ic_capabilities (context_scim);
+
+ panel_req_focus_in (context_scim);
+ // panel_req_update_spot_location (context_scim);
+ // panel_req_update_factory_info (context_scim);
+
+ if (need_reset) context_scim->impl->si->reset ();
+ if (context_scim->impl->is_on) {
+ _panel_client.turn_on (context_scim->id);
+ // _panel_client.hide_preedit_string (context_scim->id);
+ // _panel_client.hide_aux_string (context_scim->id);
+ // _panel_client.hide_lookup_table (context_scim->id);
+ context_scim->impl->si->focus_in ();
+ context_scim->impl->si->set_layout (wsc_context_input_panel_layout_get (ctx->ctx));
+ context_scim->impl->si->set_prediction_allow (context_scim->impl->prediction_allow);
+ if (context_scim->impl->imdata)
+ context_scim->impl->si->set_imdata ((const char *)context_scim->impl->imdata, context_scim->impl->imdata_size);
+ } else {
+ _panel_client.turn_off (context_scim->id);
+ }
- _panel_client.send ();
- if (caps_mode_check (ctx, EINA_FALSE, EINA_TRUE) == EINA_FALSE) {
- context_scim->impl->next_shift_status = 0;
+ _panel_client.send ();
+ if (caps_mode_check (ctx, EINA_FALSE, EINA_TRUE) == EINA_FALSE) {
+ context_scim->impl->next_shift_status = 0;
+ }
}
}
void *pvoid = &ret;
_panel_client.process_key_event (key, (int*)pvoid);
if (!ret) {
- ret = _focused_ic->impl->si->process_key_event (key);
+ if (_focused_ic->impl->si)
+ ret = _focused_ic->impl->si->process_key_event (key);
+ else
+ ret = EINA_FALSE;
}
#else
} else if (_active_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT) {
void *pvoid = &ret;
_panel_client.process_key_event (key, (int*)pvoid);
if (!ret && !(_active_helper_option & ISM_HELPER_WITHOUT_IMENGINE)) {
- ret = _focused_ic->impl->si->process_key_event (key);
+ if (_focused_ic->impl->si)
+ ret = _focused_ic->impl->si->process_key_event (key);
+ else
+ ret = EINA_FALSE;
}
#endif
} else {
- ret = _focused_ic->impl->si->process_key_event (key);
+ if (_focused_ic->impl->si)
+ ret = _focused_ic->impl->si->process_key_event (key);
+ else
+ ret = EINA_FALSE;
}
if (ret == EINA_FALSE) {
{
SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
- if (ic && ic->impl && !ic->impl->is_on) {
+ if (ic && ic->impl && ic->impl->si && !ic->impl->is_on) {
ic->impl->is_on = true;
if (ic == _focused_ic) {
{
SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
- if (ic && ic->impl && ic->impl->is_on) {
+ if (ic && ic->impl && ic->impl->si && ic->impl->is_on) {
ic->impl->is_on = false;
if (ic == _focused_ic) {
if (!_on_the_spot || !ic->impl->use_preedit)
cap -= SCIM_CLIENT_CAP_ONTHESPOT_PREEDIT;
- ic->impl->si->update_client_capabilities (cap);
+ if (ic->impl->si)
+ ic->impl->si->update_client_capabilities (cap);
}
}
String (SCIM_VERSION) +
String (_("\n(C) 2002-2005 James Su <suzhe@tsinghua.org.cn>\n\n"));
- if (ic && ic->impl) {
+ if (ic && ic->impl && ic->impl->si) {
IMEngineFactoryPointer sf = _backend->get_factory (ic->impl->si->get_factory_uuid ());
if (sf) {
help += utf8_wcstombs (sf->get_name ());
if (!filter_hotkeys (ic, _key)) {
if (process_key) {
- if (!_focused_ic || !_focused_ic->impl->is_on ||
+ if (!_focused_ic || !_focused_ic->impl->is_on || !_focused_ic->impl->si ||
!_focused_ic->impl->si->process_key_event (_key)) {
_fallback_instance->process_key_event (_key);
}
return;
}
}
- _panel_client.prepare (ic->id);
- ic->impl->si->reset ();
- _panel_client.send ();
+
+ if (ic->impl->si) {
+ _panel_client.prepare (ic->id);
+ ic->impl->si->reset ();
+ _panel_client.send ();
+ }
}
}
if (!check_valid_ic (ic))
return;
+ if (!ic->impl->si)
+ return;
+
SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n";
IMEngineFactoryPointer sf = _backend->get_next_factory ("", "UTF-8", ic->impl->si->get_factory_uuid ());
_default_instance = ic->impl->si;
ic->impl->shared_si = true;
}
- //_popup_message (utf8_wcstombs (sf->get_name ()).c_str ());
}
}
if (!check_valid_ic (ic))
return;
+ if (!ic->impl->si)
+ return;
+
SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n";
IMEngineFactoryPointer sf = _backend->get_previous_factory ("", "UTF-8", ic->impl->si->get_factory_uuid ());
_default_instance = ic->impl->si;
ic->impl->shared_si = true;
}
- //_popup_message (utf8_wcstombs (sf->get_name ()).c_str ());
}
}
if (!check_valid_ic (ic))
return;
+ if (!ic->impl->si)
+ return;
+
SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n";
// The same input method is selected, just turn on the IC.
- if (ic->impl->si && (ic->impl->si->get_factory_uuid () == uuid)) {
+ if (ic->impl->si->get_factory_uuid () == uuid) {
turn_on_ic (ic);
return;
}