return (ret == APP_CONTROL_ERROR_NONE);
}
+static int open_ime_optipn_window(app_control_launch_mode_e mode)
+{
+ IMControlClient imcontrol_client;
+ int ret = 0;
+ String ime_setting_appid;
+
+ if (!imcontrol_client.open_connection ())
+ return -1;
+
+ imcontrol_client.prepare ();
+ imcontrol_client.get_ise_setting_appid (ime_setting_appid);
+
+ if (!ime_setting_appid.empty ()) {
+ if (app_control_launch (ime_setting_appid.c_str (), mode)) {
+ LOGI("Succeeded to launch IME setting app : %s", ime_setting_appid.c_str ());
+ }
+ else {
+ LOGE("Failed to launch IME setting app : %s", ime_setting_appid.c_str ());
+ ret = -1;
+ }
+ }
+ else {
+ LOGD("No setting app ID. Request to show option window in IME");
+ imcontrol_client.prepare ();
+ imcontrol_client.show_ise_option_window ();
+
+ if (!imcontrol_client.send ()) {
+ LOGW("Failed to send show ise_option_window");
+ ret = -1;
+ }
+ }
+
+ imcontrol_client.close_connection ();
+
+ return ret;
+}
+
EXAPI int isf_control_set_active_ise_by_uuid (const char *uuid)
{
if (uuid == NULL)
EXAPI int isf_control_show_ise_option_window (void)
{
- IMControlClient imcontrol_client;
- int ret = 0;
- String ime_setting_appid;
-
- if (!imcontrol_client.open_connection ())
- return -1;
-
- imcontrol_client.prepare ();
- imcontrol_client.get_ise_setting_appid (ime_setting_appid);
-
- if (!ime_setting_appid.empty ()) {
- if (app_control_launch (ime_setting_appid.c_str (), APP_CONTROL_LAUNCH_MODE_GROUP)) {
- LOGI("Succeeded to launch IME setting app : %s", ime_setting_appid.c_str ());
- }
- else {
- LOGE("Failed to launch IME setting app : %s", ime_setting_appid.c_str ());
- ret = -1;
- }
- }
- else {
- LOGD("No setting app ID. Request to show option window in IME");
- imcontrol_client.prepare ();
- imcontrol_client.show_ise_option_window ();
-
- if (!imcontrol_client.send ()) {
- LOGW("Failed to send show ise_option_window");
- ret = -1;
- }
- }
-
- imcontrol_client.close_connection ();
-
- return ret;
+ return open_ime_optipn_window (APP_CONTROL_LAUNCH_MODE_GROUP);
}
EXAPI int isf_control_get_all_ime_info (ime_info_s **info)
EXAPI int isf_control_open_ime_option_window (void)
{
- return isf_control_show_ise_option_window ();
+ return open_ime_optipn_window (APP_CONTROL_LAUNCH_MODE_GROUP);
+}
+
+EXAPI int isf_control_open_ime_optipn_window_with_single_mode (void)
+{
+ return open_ime_optipn_window (APP_CONTROL_LAUNCH_MODE_SINGLE);
}
EXAPI int isf_control_resume_ime_option_window (void)
int isf_control_open_ime_option_window (void);
/**
+ * @brief Requests to open the current IME's option window using APP_CONTROL_LAUNCH_MODE_SINGLE.
+ *
+ * @remarks Each IME might have its option (setting) or not. This function should be called only if the current IME provides its option.
+ *
+ * @since_tizen 7.0
+ *
+ * @privlevel public
+ *
+ * @privilege %http://tizen.org/privilege/appmanager.launch
+ *
+ * @return 0 on success, otherwise return -1
+ *
+ * @pre The availability of IME option can be found using isf_control_get_all_ime_info() and isf_control_get_active_ime() functions.
+ */
+int isf_control_open_ime_optipn_window_with_single_mode (void);
+
+/**
* @brief Requests to resume the current IME's option window.
*
* @remarks IME needs to show its option window if it has an option window that was created before and not destroyed yet.