*
* @privilege %http://tizen.org/privilege/ime
*
- * @remarks @a value is valid only in the callback. To use outside the callback, make a copy.
+ * @remarks @a key and @a value is valid only in the callback. To use outside the callback, make a copy.
* This function is used by the applications to deliver the prediction hint data message to the input panel.
*
* @param[in] key The prediction hint key to be set to the input panel
*/
int ime_update_input_panel_event(ime_event_type_e type, unsigned int value);
+/**
+ * @brief Sets the candidate visibility state.
+ *
+ * @since_tizen 5.5
+ *
+ * @privlevel public
+ *
+ * @privilege %http://tizen.org/privilege/ime
+ *
+ * @param[in] visible @c true - show candidate string, @c false - hide candidate 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 isn't started yet
+ */
+int ime_set_candidate_visibility_state(bool visible);
+
/**
* @}
*/
return IME_ERROR_NONE;
}
+
+EXPORT_API int ime_set_candidate_visibility_state(bool visible)
+{
+ 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;
+
+ if (visible)
+ g_core.show_candidate_string();
+ else
+ g_core.hide_candidate_string();
+
+ return IME_ERROR_NONE;
+}