Add deferring window creation feature 28/163528/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 11 Dec 2017 11:54:50 +0000 (20:54 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 13 Dec 2017 08:44:05 +0000 (17:44 +0900)
Change-Id: Ie45df0f725fa5fe2b4888725bf8396ca0ee4f0e6

include/inputmethod_internal.h
src/inputmethod.cpp

index 4e9f74d..711bad3 100644 (file)
@@ -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
index 5401456..b260987 100644 (file)
@@ -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;
+}