typedef void (*ime_layout_set_cb)(Ecore_IMF_Input_Panel_Layout layout, void *user_data);
/**
+ * @brief Called when an associated text input UI control requests the input panel to set input hint.
+ *
+ * @since_tizen 6.5
+ *
+ * @privlevel public
+ *
+ * @privilege %http://tizen.org/privilege/ime
+ *
+ * @remarks @a input_hint information is already set to the input panel when it is shown
+ * through #ime_context_h. This callback function will be only called when the client
+ * application changes the edit field's input hint attribute after the input panel is shown.
+ *
+ * @param[in] input_hint The input hint
+ * @param[in] user_data User data to be passed from the callback registration function
+ *
+ * @pre The callback can be registered using ime_event_set_input_hint_set_cb() function.
+ *
+ * @see ime_event_set_input_hint_set_cb()
+ */
+typedef void (*ime_input_hint_set_cb)(Ecore_IMF_Input_Hints input_hint, void *user_data);
+
+/**
* @brief Called when an associated text input UI control requests the input panel to set the @c Return key label.
* The input panel can show text or image on the @c Return button according to the @c Return key action.
*
int ime_set_candidate_visibility_state(bool visible);
/**
+ * @brief Sets @c input_hint_set event callback function.
+ *
+ * @since_tizen 6.5
+ *
+ * @privlevel public
+ *
+ * @privilege %http://tizen.org/privilege/ime
+ *
+ * @remarks The ime_input_hint_set_cb() callback function is called to set the input hint
+ * to deliver to the input panel.
+ *
+ * @param[in] callback_func @c input_hint_set event callback function
+ * @param[in] user_data User data to be passed to the callback function
+ *
+ * @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_INVALID_PARAMETER Invalid parameter
+ * @retval #IME_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @post The ime_run() function should be called to start the IME application's main loop.
+ *
+ * @see ime_input_hint_set_cb()
+ * @see ime_run()
+ */
+int ime_event_set_input_hint_set_cb(ime_input_hint_set_cb callback_func, void *user_data);
+
+/**
+ * @brief Unsets @c input_hint_set event callback function.
+ *
+ * @since_tizen 6.5
+ *
+ * @privlevel public
+ *
+ * @privilege %http://tizen.org/privilege/ime
+ *
+ * @remarks The ime_input_hint_set_cb() callback function is called to set the input hint
+ * to deliver to the input panel.
+ *
+ * @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
+ *
+ * @see ime_input_hint_set_cb()
+ * @see ime_event_set_input_hint_set_cb()
+ */
+int ime_event_unset_input_hint_set_cb(void);
+
+/**
* @}
*/
void on_update_candidate_item_layout(const std::vector<sclu32> item);
void on_update_displayed_candidate_number(sclu32 size);
void on_longpress_candidate(sclu32 index);
+ void on_set_input_hint(sclu32 input_hint);
};
typedef struct
ime_candidate_item_layout_set_cb candidate_item_layout_set;
ime_displayed_candidate_number_chaned_cb displayed_candidate_number_chaned;
ime_candidate_item_long_pressed_cb candidate_item_long_pressed;
+ ime_input_hint_set_cb input_hint_set; /**< Called when an edit field requests the input panel to set its input hint */
void *focus_in_user_data;
void *focus_out_user_data;
void *surrounding_text_updated_user_data;
void *candidate_item_layout_set_user_data;
void *displayed_candidate_number_chaned_user_data;
void *candidate_item_long_pressed_user_data;
+ void *input_hint_set_user_data;
} ime_event_callback_s;
typedef struct {
}
}
+void CCoreEventCallback::on_set_input_hint(sclu32 input_hint)
+{
+ if (g_event_callback.input_hint_set) {
+ g_event_callback.input_hint_set(static_cast<Ecore_IMF_Input_Hints>(input_hint), g_event_callback.input_hint_set_user_data);
+ }
+}
+
void CCoreEventCallback::on_reset_input_context(sclint ic, const sclchar *uuid)
{
if (g_event_callback.input_context_reset) {
return IME_ERROR_NONE;
}
+EXPORT_API int ime_event_set_input_hint_set_cb(ime_input_hint_set_cb callback_func, void *user_data)
+{
+ ime_error_e retVal = IME_ERROR_NONE;
+
+ if (!callback_func) {
+ LOGW("IME_ERROR_INVALID_PARAMETER");
+ return IME_ERROR_INVALID_PARAMETER;
+ }
+
+ retVal = _check_privilege();
+ if (retVal != IME_ERROR_NONE) return retVal;
+
+ g_event_callback.input_hint_set = callback_func;
+ g_event_callback.input_hint_set_user_data = user_data;
+
+ return IME_ERROR_NONE;
+}
+
+EXPORT_API int ime_event_unset_input_hint_set_cb(void)
+{
+ ime_error_e retVal = IME_ERROR_NONE;
+
+ retVal = _check_privilege();
+ if (retVal != IME_ERROR_NONE) return retVal;
+
+ g_event_callback.input_hint_set = NULL;
+ g_event_callback.input_hint_set_user_data = NULL;
+
+ return IME_ERROR_NONE;
+}
+
//LCOV_EXCL_START
EXPORT_API int ime_event_set_caps_mode_changed_cb(ime_caps_mode_changed_cb callback_func, void *user_data)
{