}
if (inputmethod_cynara_initialize() == false) {
+ //LCOV_EXCL_START
g_permission_allowed = false;
g_checked_privilege = true;
LOGE("inputmethod_cynara_initialize () == false");
+ //LCOV_EXCL_STOP
return IME_ERROR_PERMISSION_DENIED;
}
snprintf(uid, 16, "%d", getuid());
if (check_privilege(uid, IME_PRIVILEGE) == false) {
- LOGE("check_privilege(uid, IME_PRIVILEGE) == false. uid : %s", uid);
+ LOGE("check_privilege(uid, IME_PRIVILEGE) == false. uid : %s", uid); //LCOV_EXCL_LINE
ret = IME_ERROR_PERMISSION_DENIED;
}
ime_error_e retVal = IME_ERROR_NONE;
if (g_running) {
+ //LCOV_EXCL_START
LOGE("inputmethod main loop is already running.");
return IME_ERROR_OPERATION_FAILED;
+ //LCOV_EXCL_STOP
}
if (!basic_cb) {
return IME_ERROR_NO_CALLBACK_FUNCTION;
}
+ //LCOV_EXCL_START
g_user_data = user_data;
g_running = true;
g_running = false;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_event_set_focus_in_cb(ime_focus_in_cb callback_func, void *user_data)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.forward_key_event(-1, NULL, (sclu32)keycode, (sclu16)keymask);
else
g_core.send_key_event(-1, NULL, (sclu32)keycode, (sclu16)keymask);
+ //LCOV_EXCL_STOP
return IME_ERROR_NONE;
}
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.commit_string(-1, NULL, str);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_show_preedit_string(void)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.show_preedit_string(-1, NULL);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_hide_preedit_string(void)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.hide_preedit_string(-1, NULL);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_update_preedit_string(const char *str, Eina_List *attrs)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.update_preedit_string(-1, NULL, str, attrv);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_request_surrounding_text(int maxlen_before, int maxlen_after)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.get_surrounding_text(NULL, maxlen_before, maxlen_after);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_delete_surrounding_text(int offset, int len)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.delete_surrounding_text(offset, len);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_get_surrounding_text(int maxlen_before, int maxlen_after, char **text, int *cursor_pos)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
*cursor_pos = cursor;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_set_selection(int start, int end)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.set_selection(start, end);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_get_selected_text(char **text)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.get_selection_text(text);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API Evas_Object* ime_get_main_window(void)
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) {
+ //LCOV_EXCL_START
LOGE("_check_privilege returned %d.", retVal);
set_last_result(retVal);
return NULL;
+ //LCOV_EXCL_STOP
}
if (!g_running) {
return NULL;
}
+ //LCOV_EXCL_START
win = static_cast<Evas_Object*>(g_core.get_main_window());
if (win) {
set_last_result(IME_ERROR_NONE);
}
return win;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_set_size(int portrait_width, int portrait_height, int landscape_width, int landscape_height)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.set_keyboard_size_hints(portrait_size, landscape_size);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_create_option_window(void)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
LOGW("IME_ERROR_OPERATION_FAILED");
return IME_ERROR_OPERATION_FAILED;
}
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_destroy_option_window(Evas_Object *window)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.destroy_option_window(window);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
//LCOV_EXCL_START
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.request_ise_hide();
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
//LCOV_EXCL_START
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.send_private_command(command);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_commit_content(const char *content, const char *description, const char *mime_type)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
LOGI("content : '%s', description : '%s', mime_type : '%s'", content, description, mime_type);
g_core.commit_content(content, description, mime_type);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_layout(ime_context_h context, Ecore_IMF_Input_Panel_Layout *layout)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*layout = context->layout;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_layout_variation(ime_context_h context, ime_layout_variation_e *layout_variation)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*layout_variation = static_cast<ime_layout_variation_e>(context->layout_variation);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_cursor_position(ime_context_h context, int *cursor_pos)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*cursor_pos = context->cursor_pos;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_autocapital_type(ime_context_h context, Ecore_IMF_Autocapital_Type *autocapital_type)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*autocapital_type = context->autocapital_type;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_return_key_type(ime_context_h context, Ecore_IMF_Input_Panel_Return_Key_Type *return_key_type)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*return_key_type = context->return_key_type;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_return_key_state(ime_context_h context, bool *return_key_state)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*return_key_state = static_cast<bool>(context->return_key_disabled);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_prediction_mode(ime_context_h context, bool *prediction_mode)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*prediction_mode = static_cast<bool>(context->prediction_allow);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_password_mode(ime_context_h context, bool *password_mode)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*password_mode = static_cast<bool>(context->password_mode);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_input_hint(ime_context_h context, Ecore_IMF_Input_Hints *input_hint)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*input_hint = context->input_hint;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_bidi_direction(ime_context_h context, Ecore_IMF_BiDi_Direction *bidi)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*bidi = context->bidi_direction;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_context_get_language(ime_context_h context, Ecore_IMF_Input_Panel_Lang *language)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*language = context->language;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
//LCOV_EXCL_START
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
if (!dev_info->dev_name)
*dev_name = strdup("");
else
*dev_name = strdup(dev_info->dev_name);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_device_info_get_class(ime_device_info_h dev_info, Ecore_IMF_Device_Class *dev_class)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*dev_class = dev_info->dev_class;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_device_info_get_subclass(ime_device_info_h dev_info, Ecore_IMF_Device_Subclass *dev_subclass)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
*dev_subclass = dev_info->dev_subclass;
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
//LCOV_EXCL_START
return IME_ERROR_OPERATION_FAILED;
}
+ //LCOV_EXCL_START
Ecore_Event_Detent_Rotate *rotary_device_event =
static_cast<Ecore_Event_Detent_Rotate*>(device_event->event_data);
if (rotary_device_event) {
}
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
//LCOV_EXCL_STOP
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
g_core.set_floating_mode(floating_mode);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_set_floating_drag_start(void)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
g_core.set_floating_drag_enabled(true);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_set_floating_drag_end(void)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
g_core.set_floating_drag_enabled(false);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
//LCOV_EXCL_START
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.update_input_context((sclu32)type, value);
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}
EXPORT_API int ime_set_candidate_visibility_state(bool visible)
return IME_ERROR_NOT_RUNNING;
}
+ //LCOV_EXCL_START
retVal = _check_privilege();
if (retVal != IME_ERROR_NONE) return retVal;
g_core.hide_candidate_string();
return IME_ERROR_NONE;
+ //LCOV_EXCL_STOP
}