* @see ime_commit_string()
* @see ime_show_preedit_string()
* @see ime_hide_preedit_string()
+ * @see ime_update_preedit_cursor()
*
* @code
{
int ime_update_preedit_string(const char *str, Eina_List *attrs);
/**
+ * @brief Updates the cursor position in the preedit string.
+ *
+ * @since_tizen 6.5
+ *
+ * @privlevel public
+ *
+ * @privilege %http://tizen.org/privilege/ime
+ *
+ * @param[in] pos The cursor position in the preedit string
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #IME_ERROR_NONE No error
+ * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function.
+ * @retval #IME_ERROR_NOT_RUNNING IME main loop is not started yet
+ *
+ * @post This function is supposed to be followed by the ime_update_preedit_string() function.
+ *
+ * @see ime_show_preedit_string()
+ * @see ime_hide_preedit_string()
+ * @see ime_update_preedit_string()
+ *
+ * @code
+ {
+ int ret;
+ Eina_List *list = NULL;
+
+ ime_preedit_attribute *attr = calloc(1, sizeof(ime_preedit_attribute));
+ attr->start = 0;
+ attr->length = 1;
+ attr->type = IME_ATTR_FONTSTYLE;
+ attr->value = IME_ATTR_FONTSTYLE_UNDERLINE;
+ list = eina_list_append(list, attr);
+
+ attr = calloc(1, sizeof(ime_preedit_attribute));
+ attr->start = 1;
+ attr->length = 3;
+ attr->type = IME_ATTR_FONTSTYLE;
+ attr->value = IME_ATTR_FONTSTYLE_REVERSAL;
+ list = eina_list_append(list, attr);
+
+ ret = ime_update_preedit_string("abcd", list);
+ if (ret != IME_ERROR_NONE) {
+ EINA_LIST_FREE(list, attr)
+ free(attr);
+ }
+ ret = ime_update_preedit_cursor(1);
+ }
+ * @endcode
+ */
+int ime_update_preedit_cursor(unsigned int pos);
+
+/**
* @brief Requests the surrounding text from the position of the cursor, asynchronously.
*
* @since_tizen @if MOBILE 2.4 @else 3.0 @endif
//LCOV_EXCL_STOP
}
+EXPORT_API int ime_update_preedit_cursor(unsigned int pos)
+{
+ ime_error_e retVal = IME_ERROR_NONE;
+
+ if (!g_running) {
+ LOGW("IME_ERROR_NOT_RUNNING");
+ return IME_ERROR_NOT_RUNNING;
+ }
+
+ retVal = _check_privilege();
+ if (retVal != IME_ERROR_NONE) return retVal;
+
+ g_core.update_preedit_caret(pos);
+
+ return IME_ERROR_NONE;
+}
+
EXPORT_API int ime_request_surrounding_text(int maxlen_before, int maxlen_after)
{
ime_error_e retVal = IME_ERROR_NONE;