elm_exit();
}
+/**
+* @function IMEInputHintSetCb
+* @description Callback, called when an associated text input UI control requests the input panel to set input hint.
+* @parameter Ecore_IMF_Input_Hints InputHint, void *pszUserData
+* @return void
+*/
+static void IMEInputHintSetCb(Ecore_IMF_Input_Hints InputHint, void *pszUserData)
+{
+ FPRINTF("[Line : %d][%s] IMEInputHintSetCb Callback called\\n", __LINE__, API_NAMESPACE);
+}
+
+/**
+* @function InputMethodEventSetInputHintSetCb
+* @description Callback for ime_run to Set input hint event callback function.
+* @parameter NA
+* @return NA
+*/
+static void InputMethodEventSetInputHintSetCb()
+{
+ g_bCallbackCalled = true;
+ FPRINTF("[Line : %d][%s] InputMethodEventSetInputHintSetCb Callback called\\n", __LINE__, API_NAMESPACE);
+
+ Evas_Object *hWindow = NULL;
+ hWindow = CreateNormalWin();
+ if(!hWindow)
+ {
+ FPRINTF("[Line : %d][%s] CreateNormalWin() called from InputMethodEventSetInputHintSetCb callback is failed to create window\\n", __LINE__, API_NAMESPACE);
+ g_bSupportAPIFailed = true;
+ return;
+ }
+
+ Evas_Object *hEntry = NULL;
+ hEntry = elm_entry_add(hWindow);
+ if(!hEntry)
+ {
+ FPRINTF("[Line : %d][%s] elm_entry_add function failed to add entry to hWindow\\n", __LINE__, API_NAMESPACE);
+ g_bSupportAPIFailed = true;
+ evas_object_del(hWindow);
+ return;
+ }
+
+ g_nRet = ime_event_set_input_hint_set_cb(IMEInputHintSetCb, NULL);
+ PRINT_RESULT_NORETURN(IME_ERROR_NONE, g_nRet, "ime_event_set_input_hint_set_cb", InputGetError(g_nRet));
+
+ elm_entry_single_line_set(hEntry, EINA_TRUE);
+
+ evas_object_del(hWindow);
+ evas_object_del(hEntry);
+
+ elm_exit();
+}
+
+/**
+* @function InputMethodEventUnsetInputHintSetCb
+* @description Callback for ime_run to Unset input hint event callback function.
+* @parameter NA
+* @return NA
+*/
+static void InputMethodEventUnsetInputHintSetCb()
+{
+ g_bCallbackCalled = true;
+ FPRINTF("[Line : %d][%s] InputMethodEventUnsetInputHintSetCb callback called\\n", __LINE__, API_NAMESPACE);
+
+ g_nRet = ime_event_unset_input_hint_set_cb();
+ PRINT_RESULT_NORETURN(IME_ERROR_NONE, g_nRet, "ime_event_unset_input_hint_set_cb", InputGetError(g_nRet));
+ elm_exit();
+}
+
+/**
+* @function InputMethodUpdatePreeditCursorCb
+* @description Callback for ime_run to call preedit cursor function.
+* @parameter NA
+* @return NA
+*/
+static void InputMethodUpdatePreeditCursorCb()
+{
+ g_bCallbackCalled = true;
+ g_bSupportAPIFailed = false;
+ FPRINTF("[Line : %d][%s] InputMethodUpdatePreeditCursorCb Callback called\\n", __LINE__, API_NAMESPACE);
+
+ int nRet = -1;
+ Eina_List *list = NULL;
+
+ ime_preedit_attribute *attr = NULL;
+ attr = (ime_preedit_attribute *)calloc(1, sizeof(ime_preedit_attribute));
+
+ if(!attr)
+ {
+ FPRINTF("[Line : %d][%s] calloc is failed inside InputMethodUpdatePreeditCursorCb Callback\\n", __LINE__, API_NAMESPACE);
+ g_bSupportAPIFailed = true;
+ return;
+ }
+
+ 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);
+
+ nRet = ime_update_preedit_string("abcd", list);
+ if (nRet != IME_ERROR_NONE)
+ {
+ FPRINTF("[Line : %d][%s] ime_update_preedit_string API failed\\n", __LINE__, API_NAMESPACE);
+ EINA_LIST_FREE(list, attr);
+ free(attr);
+ }
+
+ g_nRet = ime_update_preedit_cursor(1);
+ PRINT_RESULT_NORETURN(IME_ERROR_NONE, g_nRet, "ime_update_preedit_cursor", InputGetError(g_nRet));
+
+ elm_exit();
+}
+
/**
* @function ITs_capi_ui_inputmethod_startup
* @description Called before each test
PRINT_RESULT(IME_ERROR_NONE, g_nRet, "ime_event_set_prediction_hint_data_set_cb", InputGetError(g_nRet));
}
+
+//& purpose Sets and Unsets input_hint_set event callback function
+//& type: auto
+/**
+* @testcase ITc_ime_event_set_unset_input_hint_set_cb_p
+* @since_tizen 6.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(nibha.sharma)
+* @type auto
+* @description Sets and unset input_hint_set event callback function.
+* @scenario The callback function is called to set the input hint to deliver to the input panel.
+* @apicovered ime_event_set_input_hint_set_cb, ime_event_set_input_hint_unset_cb
+* @passcase If callback gets called and api returns IME_ERROR_NONE
+* @failcase If fails to called callback and/or api returns other than IME_ERROR_NONE
+* @precondition NA
+* @postcondition The ime_run() function should be called to start to run IME application's main loop.
+*/
+int ITc_ime_event_set_unset_input_hint_set_cb_p(void)
+{
+ START_TEST;
+
+ g_nRet = -1;
+ g_bCallbackCalled = false;
+ g_bSupportAPIFailed = false;
+
+ int nRet = ime_run(&basic_callback, (void *)InputMethodEventSetInputHintSetCb);
+
+ PRINT_RESULT(IME_ERROR_NONE, nRet, "ime_run", InputGetError(nRet));
+ PRINT_RESULT(true, g_bCallbackCalled, "ime_event_set_input_hint_set_cb", "Callback not invoked");
+ PRINT_RESULT(false, g_bSupportAPIFailed, "ime_event_set_input_hint_set_cb", "Support APIs caled inside callback failed");
+ PRINT_RESULT(IME_ERROR_NONE, g_nRet, "ime_event_set_input_hint_set_cb", InputGetError(g_nRet));
+
+
+ nRet = ime_run(&basic_callback, (void *)InputMethodEventUnsetInputHintSetCb);
+
+ PRINT_RESULT(IME_ERROR_NONE, nRet, "ime_run", InputGetError(nRet));
+ PRINT_RESULT(true, g_bCallbackCalled, "ime_event_unset_input_hint_set_cb", "Callback not invoked");
+ PRINT_RESULT(IME_ERROR_NONE, g_nRet, "ime_event_unset_input_hint_set_cb", InputGetError(g_nRet));
+ return 0;
+}
+
+//& purpose Updates the cursor position in the preedit string.
+//& type: auto
+/**
+* @testcase ITc_ime_update_preedit_cursor_p
+* @since_tizen 6.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(nibha.sharma)
+* @type auto
+* @description Updates the cursor position in the preedit string.
+* @scenario Create preedit list and update the cursor position followed by the list
+* @apicovered ime_update_preedit_cursor
+* @passcase If callback gets called and api returns IME_ERROR_NONE
+* @failcase If fails to called callback and/or api returns other than IME_ERROR_NONE
+* @precondition NA
+* @postcondition The ime_run() function should be called to start to run IME application's main loop.
+* This API is supposed to be followed by the ime_update_preedit_string() function.
+*/
+int ITc_ime_update_preedit_cursor_p(void)
+{
+ START_TEST;
+
+ g_nRet = -1;
+ g_bCallbackCalled = false;
+ g_bSupportAPIFailed = false;
+
+ int nRet = ime_run(&basic_callback, (void *)InputMethodUpdatePreeditCursorCb);
+
+ PRINT_RESULT(IME_ERROR_NONE, nRet, "ime_run", InputGetError(nRet));
+ PRINT_RESULT(true, g_bCallbackCalled, "ime_update_preedit_cursor", "Callback not invoked");
+ PRINT_RESULT(false, g_bSupportAPIFailed, "ime_update_preedit_cursor", "Support APIs caled inside callback failed");
+ PRINT_RESULT(IME_ERROR_NONE, g_nRet, "ime_update_preedit_cursor", InputGetError(g_nRet));
+
+ return 0;
+}
/** @} */
/** @} */