Add Tizen .NET API Guide for Tizen.Uix.InputMethodManager 06/151206/3
authorsungwook79.park <sungwook79.park@samsung.com>
Wed, 20 Sep 2017 07:41:50 +0000 (16:41 +0900)
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Thu, 21 Sep 2017 06:51:58 +0000 (09:51 +0300)
PS3: Reviewed

Change-Id: I8d4908f5ddec60970c005a6d503b5d7fe2cffbe7
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
org.tizen.guides/html/dotnet/uix/inputmethod_manager_n.htm [new file with mode: 0644]

diff --git a/org.tizen.guides/html/dotnet/uix/inputmethod_manager_n.htm b/org.tizen.guides/html/dotnet/uix/inputmethod_manager_n.htm
new file mode 100644 (file)
index 0000000..e8d904e
--- /dev/null
@@ -0,0 +1,196 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <link rel="stylesheet" type="text/css" href="../../css/styles.css" />
+    <link rel="stylesheet" type="text/css" href="../../css/snippet.css" />
+    <script type="text/javascript" src="../../scripts/snippet.js"></script>
+    <script type="text/javascript" src="../../scripts/jquery.util.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../scripts/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../scripts/core.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../scripts/search.js" charset="utf-8"></script>
+    <title>Input Method Manager</title>
+ </head>
+ <body onload="prettyPrint()" style="overflow: auto;">
+
+ <div id="toc-navigation">
+
+     <div id="toc_border"><div id="toc">
+               <p class="toc-title">Dependencies</p>
+               <ul class="toc">
+                       <li>Tizen 4.0 and Higher</li>
+               </ul>
+               <p class="toc-title">Content</p>
+               <ul class="toc">
+                 <li><a href="#prerequisites">Prerequisites</a></li>
+                 <li><a href="#list">Showing the IME List</a></li>
+                 <li><a href="#selector">Showing the IME Selector</a></li>
+                 <li><a href="#enable">Checking the IME State</a></li>
+               </ul>
+        <p class="toc-title">Related Info</p>
+        <ul class="toc">
+                       <li><a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Uix_1_1InputMethodManager.html">Tizen.Uix.InputMethodManager Namespace</a></li>
+        </ul>
+    </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1 id="manager">Input Method Manager</h1>
+<p>You can manage the input method editors (IMEs) installed on the device. After your IME application is installed, you can use the input method manager to open a list of installed IMEs, allow the user to enable an installed IME, and show an IME selector, in which the user can see the enabled IMEs and select one as a default keyboard.</p>
+<p>The main features of the Tizen.Uix.InputMethodManager namespace include:</p>
+
+<ul>
+<li>Showing the IME list
+<p>You can <a href="#list">open the installed IME list menu</a>. If a new IME has been installed, the user can see its name in the IME list, and can use the toggle button to enable the keyboard they want. All keyboards enabled in the IME list are shown in the IME selector to allow the user to select them as the default keyboard.</p>
+                       <p align="center"><strong>Figure: IME list</strong></p>
+                       <p align="center"><img alt="IME list" src="../../images/ime_list.png" /></p>
+</li>
+<li>Showing the IME selector
+<p>You can <a href="#selector">open the IME selector menu</a>. When the user opens the IME selector menu, it shows all the keyboards enabled in the IME list. The user can change the default keyboard by selecting a new one. By clicking <strong>Select keyboard</strong>, the user can return to the IME list menu to enable a new IME.</p>
+                       <p align="center"><strong>Figure: IME selector</strong></p>
+                       <p align="center"><img alt="IME selector" src="../../images/ime_selector.png" /></p>
+</li>
+<li>Checking the IME status
+<p>You can <a href="#enable">check whether a specific IME is enabled or disabled</a> in the system keyboard setting. You can also check which IME is currently selected as the default keyboard, or how many IMEs are enabled (usable). These features are useful when the user installs a new keyboard.</p></li>
+</ul>
+
+<h2 id="prerequisites">Prerequisites</h2>
+
+<p>To enable your application to use the input method manager functionality:</p>
+<ol>
+<li>To use the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Uix_1_1InputMethodManager.html">Tizen.Uix.InputMethodManager</a> namespace, the application has to request permission by adding the following privilege to the <code>tizen-manifest.xml</code> file:
+<pre class="prettyprint">
+&lt;privileges&gt;
+   &lt;privilege&gt;http://tizen.org/privilege/imemanager&lt;/privilege&gt;
+&lt;/privileges&gt;
+</pre>
+</li>
+<li>To use the methods and properties of the Tizen.Uix.InputMethodManager namespace, include it in your application:
+<pre class="prettyprint">
+using Tizen.Uix.InputMethodManager;
+</pre>
+</li>
+</ol>
+
+    <h2 id="list">Showing the IME List</h2>
+
+<p>To launch the IME list menu to show the installed IMEs, use the <code>ShowIMEList()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1InputMethodManager_1_1Manager.html">Tizen.Uix.InputMethodManager.Manager</a> class:</p>
+
+<pre class="prettyprint">
+void show_ime_list()
+{
+    try
+    {
+        Manager.ShowIMEList();
+    }
+    catch (Exception e)
+    {
+        /// Error handling
+    }
+}
+</pre>
+
+
+    <h2 id="selector">Showing the IME Selector</h2>
+
+<p>To launch the IME selector menu to allow the user to select the default keyboard, use the <code>ShowIMESelector()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1InputMethodManager_1_1Manager.html">Tizen.Uix.InputMethodManager.Manager</a> class:</p>
+
+<pre class="prettyprint">
+void show_ime_selector()
+{
+    try
+    {
+        Manager.ShowIMESelector();
+    }
+    catch (Exception e)
+    {
+        /// Error handling
+    }
+}
+</pre>
+
+
+    <h2 id="enable">Checking the IME State</h2>
+
+<p>To check whether a specific IME is enabled, to check the current default keyboard, or to get the number of enabled (usable) IMEs:</p>
+
+<ul>
+<li>To check whether a specific IME is enabled, use the <code>IsIMEEnabled()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1InputMethodManager_1_1Manager.html">Tizen.Uix.InputMethodManager.Manager</a> class. As a parameter, use the application ID of the IME whose status you want to check.
+
+<pre class="prettyprint">
+bool is_ime_enabled(string appId)
+{
+    try
+    {
+        bool result = Manager.IsIMEEnabled(app_id);
+    }
+    catch (Exception e)
+    {
+        /// Error handling
+    }
+
+    return result;
+}
+</pre>
+<p>If the IME is enabled, the method returns <code>true</code>.</p>
+</li>
+
+<li>To check which IME is currently selected as the default keyboard, use the <code>GetActiveIME()</code> method, which returns the application ID of the currently selected IME as a string:
+
+<pre class="prettyprint">
+string get_active_ime()
+{
+    string app_id = null;
+    try
+    {
+        app_id = Manager.GetActiveIME();
+    }
+    catch (Exception e)
+    {
+        /// Error handling
+    }
+
+    return app_id;
+}
+</pre>
+</li>
+
+<li>To get the number of enabled (usable) IMEs, use the <code>GetEnabledIMECount()</code> method:
+
+<pre class="prettyprint">
+int get_enabled_ime_count()
+{
+    int count = Manager.GetEnabledIMECount();
+
+    return count;
+}
+</pre>
+</li>
+</ul>
+
+<script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../../scripts/showhide.js"></script>
+
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>