SclSize ret = { 0, 0 };
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return ret;
Evas_Object *window_object = (Evas_Object*)(windows->get_base_window());
Evas_Object *image_object = NULL;
set_window_accepts_focus(win, FALSE);
- int rots[4] = {0, 90, 180, 270};
+ int rots[4] = { 0, 90, 180, 270 };
elm_win_wm_rotation_available_rotations_set(win, rots, 4);
#ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW
CSCLUtils *utils = CSCLUtils::get_instance();
CSCLWindows *windows = CSCLWindows::get_instance();
sclint scrx, scry, winx, winy;
- utils->get_screen_resolution(&scrx, &scry);
- SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
- evas_object_resize(win, scrx, height + window_context->height);
+ if (windows && utils) {
+ utils->get_screen_resolution(&scrx, &scry);
+ SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+ if (window_context) evas_object_resize(win, scrx, height + window_context->height);
+ }
#endif
#ifdef WAYLAND
CSCLWindows *windows = CSCLWindows::get_instance();
CSCLUtils *utils = CSCLUtils::get_instance();
+ if (!windows || !utils) return;
+
#ifdef DO_NOT_MOVE_MAGNIFIER_WINDOW
if (window == windows->get_magnifier_window()) {
SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
//LOGD("HIDE_WINDOW : %p\n", window);
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return;
+
SclWindowContext *window_context = windows->get_window_context(win);
if (window_context && win) {
if (window_context->etc_info) {
SCL_DEBUG();
sclshort ret = NOT_USED;
+
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return ret;
+
//SclWindowContext *window_context = windows->get_window_context(window, FALSE);
SclWindowContext *window_context = windows->get_window_context(window);
SCL_DEBUG();
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return;
+
//SclWindowContext *window_context = windows->get_window_context(window, FALSE);
SclWindowContext *window_context = windows->get_window_context(window);
CSCLContext::set_base_layout(sclshort val)
{
SCL_DEBUG();
+
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return;
+
//SclWindowContext *window_context = windows->get_window_context(windows->get_base_window(), FALSE);
SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
if (window_context) {
SCL_DEBUG();
sclshort ret = NOT_USED;
+
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return ret;
+
//SclWindowContext *window_context = windows->get_window_context(windows->get_base_window(), FALSE);
SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
if (window_context) {
}
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!sclres_manager) return FALSE;
+
const SclInputModeConfigure *pinput_mode_table = sclres_manager->get_input_mode_configure_table();
if (NULL == pinput_mode_table) {
return FALSE;
CSCLWindows *windows = CSCLWindows::get_instance();
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+
+ if(!utils || !context || !windows || !cache || !sclres_manager) return FALSE;
+
PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
- assert(sclres_input_mode_configure != NULL);
+ if (!sclres_input_mode_configure) return FALSE;
if (context && windows && cache && utils) {
if (mode == context->get_input_mode() || mode == (sclbyte)NOT_USED) {
CSCLContext *context = CSCLContext::get_instance();
CSCLWindows *windows = CSCLWindows::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+
+ if (!sclres_manager) return FALSE;
+
PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
- assert(sclres_input_mode_configure != NULL);
+ if (!sclres_input_mode_configure) return FALSE;
if (context && windows) {
SCLDisplayMode mode;
CSCLFeedback *feedback = CSCLFeedback::get_instance();
CSCLEventHandler *handler = CSCLEventHandler::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+
+ if (!sclres_manager) return FALSE;
+
PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
PSclLayout sclres_layout = sclres_manager->get_layout_table();
- assert(sclres_input_mode_configure != NULL);
- assert(sclres_layout != NULL);
+ if (!sclres_input_mode_configure || !sclres_layout) return FALSE;
SclButtonContext *button_context = NULL;
const SclLayoutKeyCoordinate *coordinate = NULL;
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
CSCLEventHandler *handler = CSCLEventHandler::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+
+ if (!sclres_manager) return FALSE;
+
PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
PSclLayout sclres_layout = sclres_manager->get_layout_table();
- assert(sclres_input_mode_configure != NULL);
- assert(sclres_layout != NULL);
+ if (!sclres_input_mode_configure || !sclres_layout) return FALSE;
+
if (context && cache && handler && windows && state) {
const SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
SclButtonContext *button_context = cache->get_cur_button_context(window, key_index);
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!sclres_manager) return FALSE;
+
PSclLayout sclres_layout = sclres_manager->get_layout_table();
PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
- assert(sclres_layout != NULL);
- assert(sclres_input_mode_configure != NULL);
+ if (!sclres_layout || !sclres_input_mode_configure) return FALSE;
+
SclButtonContext *button_context = NULL;
const SclLayoutKeyCoordinate *coordinate = NULL;
CSCLUtils *utils = CSCLUtils::get_instance();
CSCLEventHandler *handler = CSCLEventHandler::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+
+ if (!sclres_manager) return FALSE;
+
PSclModifierDecoration sclres_modifier_decoration = sclres_manager->get_modifier_decoration_table();
- assert(sclres_modifier_decoration != NULL);
+ if (!sclres_modifier_decoration) return FALSE;
if (cache && state && windows && context && utils && adjustment && sclres_manager) {
const SclLayout *layout = cache->get_cur_layout(window);
CSCLImageProxy *proxy = CSCLImageProxy::get_instance();
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
+ if (!events || !windows || !context || !proxy || !cache) return;
+
switch (signal) {
case SCL_SIG_SHOW:
{
CSCLEvents::connect_window_events(sclwindow wnd, const sclint evt )
{
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return;
+
//SclWindowContext *window_context = windows->get_window_context(wnd, FALSE);
SclWindowContext *window_context = windows->get_window_context(wnd);
if (window_context) {
CSCLWindows *windows = CSCLWindows::get_instance();
CSCLKeyFocusHandler* focus_handler = CSCLKeyFocusHandler::get_instance();
+ if (!windows || !focus_handler || !cache || !controller) return FALSE;
+
sclwindow current_focus_window = focus_handler->get_current_focus_window();
scl8 current_key_index = focus_handler->get_current_focus_key();
sclwindow focus_window = current_focus_window;
sclres_layout_key_coordinate_pointer_frame = sclres_manager->get_key_coordinate_pointer_frame();
layout = context->get_popup_layout(m_focus_window);
}
- if (sclres_layout_key_coordinate_pointer_frame &&
+ if (windows && sclres_layout_key_coordinate_pointer_frame &&
scl_check_arrindex(layout, MAX_SCL_LAYOUT) && scl_check_arrindex(m_focus_key, MAX_KEY)) {
SclLayoutKeyCoordinatePointer cur = sclres_layout_key_coordinate_pointer_frame[layout][m_focus_key];
SclWindowContext *window_context = windows->get_window_context(m_focus_window);
layout = context->get_popup_layout(window);
}
}
- if (sclres_layout_key_coordinate_pointer_frame && cache && context && scl_check_arrindex(layout, MAX_SCL_LAYOUT)) {
+ if (windows && cache && context &&
+ sclres_layout_key_coordinate_pointer_frame && scl_check_arrindex(layout, MAX_SCL_LAYOUT)) {
for (sclint loop = 0;loop < MAX_KEY; loop++) {
SclLayoutKeyCoordinatePointer p = sclres_layout_key_coordinate_pointer_frame[layout][loop];
if (p && (loop != m_focus_key || window != m_focus_window)) {
sclshort layout = context->get_base_layout();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!sclres_manager) return FALSE;
+
PSclLayoutKeyCoordinatePointerTable sclres_layout_key_coordinate_pointer_frame =
sclres_manager->get_key_coordinate_pointer_frame();
CSCLWindows *windows = CSCLWindows::get_instance();
CSCLContext *context = CSCLContext::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!windows || !context || !utils || !sclres_manager) return FALSE;
+
const PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
const PSclLayout sclres_layout = sclres_manager->get_layout_table();
const PSclLayoutKeyCoordinatePointerTable sclres_layout_key_coordinate_pointer_frame =
sclres_manager->get_key_coordinate_pointer_frame();
const PSclModifierDecoration sclres_modifier_decoration = sclres_manager->get_modifier_decoration_table();
const PSclLabelPropertiesTable sclres_label_properties = sclres_manager->get_label_properties_frame();
- assert(sclres_input_mode_configure != NULL);
- assert(sclres_layout != NULL);
- assert(sclres_layout_key_coordinate_pointer_frame != NULL);
- assert(sclres_modifier_decoration != NULL);
- assert(sclres_label_properties != NULL);
+
+ if (!sclres_input_mode_configure || !sclres_layout || !sclres_layout_key_coordinate_pointer_frame ||
+ !sclres_modifier_decoration || !sclres_label_properties)
+ return FALSE;
/* FIXME */
scl8 popupindex = NOT_USED;
scl_assert_return_null(key_index < MAX_KEY);
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return NULL;
+
if (windows->get_base_window() == window) {
if (key_index < MAX_KEY) {
return &mCurBaseLayoutKeyCoordinates[key_index];
SCL_DEBUG();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!sclres_manager) return NULL;
+
PSclLabelPropertiesTable sclres_label_properties = sclres_manager->get_label_properties_frame();
assert(sclres_label_properties != NULL);
if (sclres_label_properties && label_type) {
scl_assert_return_null(key_index < MAX_KEY);
CSCLWindows *windows = CSCLWindows::get_instance();
+ if (!windows) return NULL;
+
if (windows->get_base_window() == window) {
if (key_index < MAX_KEY) {
return &mCurBaseButtonContext[key_index];
CSCLResourceCache::clone_keyproperties(SclPrivateKeyProperties* priv, sclbyte input_mode_index, sclbyte layout_index, sclbyte key_index)
{
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!sclres_manager) return;
+
const PSclLayoutKeyCoordinatePointerTable sclres_layout_key_coordinate_pointer_frame = sclres_manager->get_key_coordinate_pointer_frame();
SCL_DEBUG();
clear_privatekeyproperties(&privProperties);
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!sclres_manager) return NOT_USED;
+
PSclLayoutKeyCoordinatePointerTable sclres_layout_key_coordinate_pointer_frame = sclres_manager->get_key_coordinate_pointer_frame();
assert(sclres_layout_key_coordinate_pointer_frame != NULL);
{
SCL_DEBUG();
+ CSCLWindows *windows = CSCLWindows::get_instance();
+ CSCLContext *context = CSCLContext::get_instance();
+ SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+
+ if (!windows || !context || !sclres_manager) return;
+
sclint loop;
if (custom_id) {
sclbyte layout_index = NOT_USED;
- CSCLContext *context = CSCLContext::get_instance();
- SclResParserManager *sclres_manager = SclResParserManager::get_instance();
PSclLayoutKeyCoordinatePointerTable sclres_layout_key_coordinate_pointer_frame =
sclres_manager->get_key_coordinate_pointer_frame();
- assert(sclres_layout_key_coordinate_pointer_frame != NULL);
+ if(!sclres_layout_key_coordinate_pointer_frame) return;
if (context) {
layout_index = context->get_base_layout();
}
}
- CSCLWindows *windows = CSCLWindows::get_instance();
/* Fix me (we should decide by which way we would redraw the button's region - direct or indirect?)*/
- windows->update_window(windows->get_base_window());
+ if (windows) {
+ windows->update_window(windows->get_base_window());
+ }
sclboolean found = FALSE;
sclint empty_index = -1;
PSclDefaultConfigure default_configure = NULL;
PSclMagnifierWndConfigure magnifier_configure = NULL;
- if (sclres_manager) {
+ if (m_gwes && m_utils && sclres_manager) {
PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
PSclLayout sclres_layout = sclres_manager->get_layout_table();
}
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
- sclwindow window = m_gwes->m_windows->get_base_window();
+ sclwindow window = SCLWINDOW_INVALID;
+ if (m_gwes->m_windows)
+ window = m_gwes->m_windows->get_base_window();
+
if (cache)
cache->recompute_layout(window);
/* Creates the magnifier window */
if (default_configure && magnifier_configure) {
if (default_configure->use_magnifier_window) {
- sclwindow magnifier_window = m_gwes->m_windows->create_magnifier_window(parent, 0, 0,
- magnifier_configure->width, magnifier_configure->height);
- m_gwes->m_events->connect_window_events(magnifier_window, SCL_EVENT_EXPOSE | SCL_EVENT_MOUSE);
+ if (m_gwes->m_windows && m_gwes->m_events) {
+ sclwindow magnifier_window = m_gwes->m_windows->create_magnifier_window(parent, 0, 0,
+ magnifier_configure->width, magnifier_configure->height);
+ m_gwes->m_events->connect_window_events(magnifier_window, SCL_EVENT_EXPOSE | SCL_EVENT_MOUSE);
+ }
}
}
/* Creates the dim window */
/* FIXME */
//if (scl_check_arrindex(defaultLayoutIdx, MAX_LAYOUT)) {
- m_gwes->m_windows->create_dim_window(window, NULL, sclres_layout[layout].width, sclres_layout[layout].height);
+ if (m_gwes->m_windows)
+ m_gwes->m_windows->create_dim_window(window, NULL, sclres_layout[layout].width, sclres_layout[layout].height);
/* m_gwes->m_events->set_touch_event_offset(scl_default_configure.touch_offset);*/
/*Moved to Show Layout*/
CSCLGraphics *graphics = CSCLGraphics::get_instance();
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
const SclLayoutKeyCoordinate* coordinate = NULL;
- if (cache)
- coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
- scl_assert_return_false(window);
- scl_assert_return_false(draw_ctx);
- scl_assert_return_false(coordinate);
+ if (!utils || !windows || !graphics || !cache) return FALSE;
+
+ coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
+ if (coordinate) {
+ scl_assert_return_false(window);
+ scl_assert_return_false(draw_ctx);
+ scl_assert_return_false(coordinate);
- if (utils && windows && graphics && cache && coordinate) {
/* If the target window is virtual window, let's draw it on the base window */
sclint targetaddx = 0;
sclint targetaddy = 0;
CSCLWindows *windows = CSCLWindows::get_instance();
CSCLGraphics *graphics = CSCLGraphics::get_instance();
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
+ SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+
const SclLayoutKeyCoordinate* coordinate = NULL;
- if (cache)
- coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
- SclResParserManager *sclres_manager = SclResParserManager::get_instance();
+ if (!context || !windows || !graphics || !cache || !sclres_manager) return FALSE;
+
+ coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
+
PSclModifierDecoration sclres_modifier_decoration = sclres_manager->get_modifier_decoration_table();
assert(sclres_modifier_decoration != NULL);
scl_assert_return_false(window);
sclchar composed_path[_POSIX_PATH_MAX] = {0, };
- if (context && graphics && cache && coordinate) {
+ if (context && windows && graphics && cache && coordinate) {
sclboolean path_composed = FALSE;
/* Check if we need to decorate the button's drag state */
//if (context->get_cur_drag_state(context->get_last_touch_device_id()) != SCL_DRAG_STATE_NONE &&
SCL_DEBUG();
CSCLContext *context = CSCLContext::get_instance();
+ CSCLWindows *windows = CSCLWindows::get_instance();
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
- if (!context || !cache || !sclres_manager) return FALSE;
+ if (!context || !windows || !cache || !sclres_manager) return FALSE;
const SclLayout* layout = cache->get_cur_layout(window);
const SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(window, key_index);
scl_assert_return_false(state >= BUTTON_STATE_NORMAL && state < SCL_BUTTON_STATE_MAX);
- CSCLWindows *windows = CSCLWindows::get_instance();
//SclWindowContext *window_context = windows->get_window_context(window, FALSE);
SclWindowContext *window_context = windows->get_window_context(window);
CSCLUtils *utils = CSCLUtils::get_instance();
CSCLContext *context = CSCLContext::get_instance();
CSCLResourceCache *cache = CSCLResourceCache::get_instance();
+ CSCLActionState *state = CSCLActionState::get_instance();
+ CSCLWindows *windows = CSCLWindows::get_instance();
- if (!utils || !context || !cache) return FALSE;
+ if (!utils || !context || !cache || !state || !windows) return FALSE;
sclwindow pressed_window = context->get_cur_pressed_window(context->get_last_touch_device_id());
scl8 pressed_key = context->get_cur_pressed_key(context->get_last_touch_device_id());
return TRUE;
}
- CSCLActionState *state = CSCLActionState::get_instance();
- CSCLWindows *windows = CSCLWindows::get_instance();
const SclLayout *layout = cache->get_cur_layout(windows->get_base_window());
SclLayoutKeyCoordinate* coordinate = cache->get_cur_layout_key_coordinate(pressed_window, pressed_key);
SclButtonContext* button_context = cache->get_cur_button_context(pressed_window, pressed_key);
magnifier_configure = sclres_manager->get_magnifier_configure();
}
- if (utils && windows && cache && context && magnifier_configure) {
+ if (utils && windows && cache && context && graphics && magnifier_configure) {
const SclLabelProperties *labelproperties = NULL;
if (scl_check_arrindex(label_index, MAX_SIZE_OF_LABEL_FOR_ONE)) {
labelproperties = cache->get_label_properties(magnifier_configure->label_type, label_index);
if (m_initialized) {
CSCLContext *context = CSCLContext::get_instance();
CSCLWindows *windows = CSCLWindows::get_instance();
- if (context) {
+ if (context && windows) {
context->set_highlight_ui_enabled(enabled);
sclwindow window = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP);