if (coordinate) {
if (coordinate->multitouch_type == SCL_MULTI_TOUCH_TYPE_GRAB_SUB_EVENTS) {
isSubEvent = TRUE;
- utils->play_vibration(DEFAULT_VIBRATION_STYLE, DEFAULT_VIBRATION_DURATION);
+ if (utils)
+ utils->play_vibration(DEFAULT_VIBRATION_STYLE, DEFAULT_VIBRATION_DURATION);
}
}
}
desc.mouse_farthest_point = context->get_farthest_move_point(touch_id);
desc.key_modifier = key_modifier;
- if (handler->on_event_drag_state_changed(desc) && context->get_magnifier_enabled()) {
+ if (handler && handler->on_event_drag_state_changed(desc) && context->get_magnifier_enabled()) {
update_magnifier = TRUE;
}
}
switch (signal) {
case SCL_SIG_SHOW:
{
- context->set_hidden_state(FALSE);
+ if (context)
+ context->set_hidden_state(FALSE);
}
break;
case SCL_SIG_HIDE:
{
- context->set_hidden_state(TRUE);
- windows->close_all_popups();
+ if (context)
+ context->set_hidden_state(TRUE);
+
+ if (windows)
+ windows->close_all_popups();
}
break;
case SCL_SIG_START:
break;
case SIGACTION_RECOMPUTE_LAYOUT: {
if (targetWindow != SCLWINDOW_INVALID) {
- cache->recompute_layout(targetWindow);
+ if (cache)
+ cache->recompute_layout(targetWindow);
+
// EFL testing
windows->update_window(targetWindow);
}
} else if ((strcmp(keyname, "Return") == 0)||(strcmp(keyname, "Enter") == 0)) {
coordinate = cache->get_cur_layout_key_coordinate(current_focus_window, current_key_index);
//button_context->state = BUTTON_STATE_NORMAL;
- if (coordinate) {
+ if (coordinate && controller) {
controller->mouse_press(current_focus_window, coordinate->x, coordinate->y, TRUE);
controller->mouse_release(current_focus_window, coordinate->x, coordinate->y, TRUE);
if (KEY_TYPE_MODECHANGE != coordinate->key_type) {
if (!(cur_layout->use_sw_background) || cur_layout->bg_color.a != 0) {
const PSclInputModeConfigure sclres_input_mode_configure =
sclres_manager->get_input_mode_configure_table();
- if (sclres_input_mode_configure[window_context->inputmode].use_dim_window) {
+ if (sclres_input_mode_configure && sclres_input_mode_configure[window_context->inputmode].use_dim_window) {
search_in_base_window = FALSE;
} else {
exclude_popup_covered_area = TRUE;
if (exclude_popup_covered_area) {
CSCLUtils *utils = CSCLUtils::get_instance();
- if (utils) {
+ if (utils && popup_window_context) {
/* If the base candidate key is covered by popup window, do not choose it */
if (utils->is_rect_overlap(base_key_coordinate, popup_window_context->geometry)) {
base_candidate.candidate = NOT_USED;
/* Do not show if there's nothing to show */
//const char *targetstr = coordinate->key_value[shift_index][button_context->multikeyIdx];
const char *targetstr = coordinate->label[shift_index][0];
- if (state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY ||
- state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY ) {
+ if (state) {
+ if (state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY ||
+ state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY) {
targetstr = coordinate->long_key_value;
+ }
}
const sclchar* customstr = NULL;
for(sclint label_index = 0;label_index < MAX_SIZE_OF_LABEL_FOR_ONE && !customstr;label_index++) {
}
if (coordinate && magnifier_configure) {
sclchar composed_path[_POSIX_PATH_MAX] = {0,};
- if (state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY) {
+ if (state && state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY) {
m_utils->get_composed_path(composed_path, IMG_PATH_PREFIX, magnifier_configure->bg_long_key_image_path);
m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, 0, 0,
magnifier_configure->width * utils->get_custom_scale_rate_x(),
targetstr = cache->find_substituted_string(targetstr);
} else if (loop == 0) {
/* Don't display sublabels of each buttons in magnifier window - this policy can be changed, but for now */
- targetstr = coordinate->label[shift_index][button_context->multikeyIdx];
- targetstr = cache->find_substituted_string(targetstr);
+ if (button_context) {
+ targetstr = coordinate->label[shift_index][button_context->multikeyIdx];
+ targetstr = cache->find_substituted_string(targetstr);
+ }
}
if (targetstr) {
draw_magnifier_label(window, draw_ctx, loop, targetstr);
scl_assert(default_configure->target_screen_width);
scl_assert(default_configure->target_screen_height);
if (default_configure->target_screen_width != 0 &&default_configure->target_screen_height != 0) {
- GetCSCLUtilsImpl()->get_screen_resolution(&m_scn_resolution_x, &m_scn_resolution_y);
+ impl->get_screen_resolution(&m_scn_resolution_x, &m_scn_resolution_y);
m_scn_rate_x = m_scn_resolution_x / (float)default_configure->target_screen_width;
m_scn_rate_y = m_scn_resolution_y / (float)default_configure->target_screen_height;
button_context->state = BUTTON_STATE_NORMAL;
}*/
- windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
+ if (coordinate)
+ windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
}
}
}
SCL_DEBUG();
if (m_initialized) {
+ CSCLWindowsImpl* impl = get_scl_windows_impl();
+
m_base_window_context.hidden = TRUE;
m_base_window_context.geometry.width = width;
m_base_window_context.geometry.height = height;
m_base_window_context.opener.window = parent;
m_base_window_context.geometry.x = m_base_window_context.geometry.y = 0;
m_base_window_context.etc_info = NULL;
- m_base_window_context.window =
- get_scl_windows_impl()->create_base_window(parent, &m_base_window_context, width, height);
+ m_base_window_context.window = SCLWINDOW_INVALID;
- push_window_in_Z_order_list(m_base_window_context.window);
+ if (impl) {
+ m_base_window_context.window = impl->create_base_window(parent, &m_base_window_context, width, height);
+ push_window_in_Z_order_list(m_base_window_context.window);
+ }
}
// Update the position information