From: Ji-hoon Lee Date: Mon, 11 Dec 2017 11:54:50 +0000 (+0900) Subject: Add deferring window creation feature X-Git-Tag: accepted/tizen/unified/20171219.183923~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c9cd418928e73101b6de50fcf99e32b7f5bdf09;p=platform%2Fcore%2Fapi%2Finputmethod.git Add deferring window creation feature Change-Id: Ie45df0f725fa5fe2b4888725bf8396ca0ee4f0e6 --- diff --git a/include/inputmethod_internal.h b/include/inputmethod_internal.h index 4e9f74d..711bad3 100644 --- a/include/inputmethod_internal.h +++ b/include/inputmethod_internal.h @@ -337,6 +337,20 @@ int ime_finalize(); */ int ime_set_dotnet_flag(bool set); +/** + * @brief Set flag whether creating IME window should be defered until there is a access request + * + * @since_tizen 5.0 + * + * @privilege %http://tizen.org/privilege/ime + * + * @param[in] flag true if deferring window creation is desired + * @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 + */ +int ime_set_window_creation_defer_flag(bool flag); + #ifdef __cplusplus } #endif diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index 5401456..b260987 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -1980,3 +1980,15 @@ EXPORT_API int ime_set_floating_drag_end(void) return IME_ERROR_NONE; } + +EXPORT_API int ime_set_window_creation_defer_flag(bool flag) +{ + ime_error_e retVal = IME_ERROR_NONE; + + retVal = _check_privilege(); + if (retVal != IME_ERROR_NONE) return retVal; + + g_core.set_window_creation_defer_flag(flag); + + return IME_ERROR_NONE; +}