summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInHong Han <inhong1.han@samsung.com>2018-05-25 10:42:45 +0900
committerInHong Han <inhong1.han@samsung.com>2018-05-25 10:43:03 +0900
commit77ec994279830b4001d28696a7c69ac3f7e84f4d (patch)
tree19fa7d5cc3d0f2188044bad0392e121e9fcdd757
parent2ce7be691e54a2d4882b1ac1129d57464636b8df (diff)
downloaduix-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-xTizen.Uix.InputMethodManager/Interop/Interop.InputMethodManager.cs5
-rwxr-xr-xTizen.Uix.InputMethodManager/Tizen.Uix.InputMethodManager/InputMethodManager.cs24
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
+}