diff options
author | InHong Han <inhong1.han@samsung.com> | 2018-05-25 10:42:45 +0900 |
---|---|---|
committer | InHong Han <inhong1.han@samsung.com> | 2018-05-25 10:43:03 +0900 |
commit | 77ec994279830b4001d28696a7c69ac3f7e84f4d (patch) | |
tree | 19fa7d5cc3d0f2188044bad0392e121e9fcdd757 | |
parent | 2ce7be691e54a2d4882b1ac1129d57464636b8df (diff) | |
download | uix-inputmethod-manager-77ec994279830b4001d28696a7c69ac3f7e84f4d.tar.gz uix-inputmethod-manager-77ec994279830b4001d28696a7c69ac3f7e84f4d.tar.bz2 uix-inputmethod-manager-77ec994279830b4001d28696a7c69ac3f7e84f4d.zip |
Add API to launch IME in on-demand mode
Change-Id: I9f90e4ec8c07d2df5f07fff07fbe8fd27f24e6a3
-rwxr-xr-x | Tizen.Uix.InputMethodManager/Interop/Interop.InputMethodManager.cs | 5 | ||||
-rwxr-xr-x | Tizen.Uix.InputMethodManager/Tizen.Uix.InputMethodManager/InputMethodManager.cs | 24 |
2 files changed, 27 insertions, 2 deletions
diff --git a/Tizen.Uix.InputMethodManager/Interop/Interop.InputMethodManager.cs b/Tizen.Uix.InputMethodManager/Interop/Interop.InputMethodManager.cs index 7f52165..e6a5882 100755 --- a/Tizen.Uix.InputMethodManager/Interop/Interop.InputMethodManager.cs +++ b/Tizen.Uix.InputMethodManager/Interop/Interop.InputMethodManager.cs @@ -54,5 +54,8 @@ internal static partial class Interop [DllImport(Libraries.InputMethodManager, EntryPoint = "ime_manager_get_enabled_ime_count")]
internal static extern int ImeManagerGetEnabledImeCount();
+
+ [DllImport(Libraries.InputMethodManager, EntryPoint = "ime_manager_prelaunch_ime")]
+ internal static extern ErrorCode ImeManagerPrelaunchIme();
}
-}
\ No newline at end of file +}
diff --git a/Tizen.Uix.InputMethodManager/Tizen.Uix.InputMethodManager/InputMethodManager.cs b/Tizen.Uix.InputMethodManager/Tizen.Uix.InputMethodManager/InputMethodManager.cs index 4166edd..c6fa772 100755 --- a/Tizen.Uix.InputMethodManager/Tizen.Uix.InputMethodManager/InputMethodManager.cs +++ b/Tizen.Uix.InputMethodManager/Tizen.Uix.InputMethodManager/InputMethodManager.cs @@ -154,5 +154,27 @@ namespace Tizen.Uix.InputMethodManager return activeIME;
}
+
+ /// <summary>
+ /// Requests to pre-launch the IME.
+ /// The developers can use this function to launch IME in On-demand mode.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/imemanager
+ /// </privilege>
+ /// <exception cref="InvalidOperationException">
+ /// This exception can occur if:
+ /// 1) The application does not have the privilege to call this function.
+ /// 2) Operation failed.
+ /// </exception>
+ public static void PrelaunchIME()
+ {
+ ErrorCode error = ImeManagerPrelaunchIme();
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "PrelaunchIME Failed with error " + error);
+ throw InputMethodManagerExceptionFactory.CreateException(error);
+ }
+ }
}
-}
\ No newline at end of file +}
|