From: Sungmin Kwak Date: Sun, 21 Jun 2015 09:56:50 +0000 (+0900) Subject: Changes for TCT coverage #2 X-Git-Tag: submit/tizen/20150625.112413^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F42308%2F1;p=platform%2Fcore%2Fapi%2Finputmethod.git Changes for TCT coverage #2 Change-Id: Iab8f4963e68731f48641f3d863e0747d6e28d5c8 --- diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index d27749b..25a8d0d 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -803,16 +803,16 @@ int ime_update_preedit_string(const char *str, Eina_List *attrs) int ime_request_surrounding_text(int maxlen_before, int maxlen_after) { - if (!g_running) { - LOGW("IME_ERROR_NOT_RUNNING"); - return IME_ERROR_NOT_RUNNING; - } - if (!g_event_callback.surrounding_text_updated) { LOGW("IME_ERROR_NO_CALLBACK_FUNCTION"); return IME_ERROR_NO_CALLBACK_FUNCTION; } + if (!g_running) { + LOGW("IME_ERROR_NOT_RUNNING"); + return IME_ERROR_NOT_RUNNING; + } + g_core.get_surrounding_text(NULL, maxlen_before, maxlen_after); return IME_ERROR_NONE; @@ -884,16 +884,16 @@ int ime_set_size(int portrait_width, int portrait_height, int landscape_width, i int ime_create_option_window(void) { - if (!g_running) { - LOGW("IME_ERROR_NOT_RUNNING"); - return IME_ERROR_NOT_RUNNING; - } - if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) { LOGW("ime_create_option_window_cb() and ime_destroy_option_window_cb() callback functions are not set."); return IME_ERROR_NO_CALLBACK_FUNCTION; } + if (!g_running) { + LOGW("IME_ERROR_NOT_RUNNING"); + return IME_ERROR_NOT_RUNNING; + } + if (g_core.create_option_window()) return IME_ERROR_NONE; else { @@ -904,6 +904,11 @@ int ime_create_option_window(void) int ime_destroy_option_window(Evas_Object *window) { + if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) { + LOGW("ime_create_option_window_cb() and ime_destroy_option_window_cb() callback functions are not set."); + return IME_ERROR_NO_CALLBACK_FUNCTION; + } + if (!window) { LOGW("Window pointer is null."); return IME_ERROR_INVALID_PARAMETER; @@ -914,11 +919,6 @@ int ime_destroy_option_window(Evas_Object *window) return IME_ERROR_NOT_RUNNING; } - if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) { - LOGW("ime_create_option_window_cb() and ime_destroy_option_window_cb() callback functions are not set."); - return IME_ERROR_NO_CALLBACK_FUNCTION; - } - g_core.destroy_option_window(window); return IME_ERROR_NONE;