Add guide.tutorial for new API ime_manager_get_enabled_ime_count
authorsungwook79.park <sungwook79.park@samsung.com>
Mon, 16 May 2016 02:49:29 +0000 (11:49 +0900)
committersungwook79.park <sungwook79.park@samsung.com>
Mon, 16 May 2016 04:18:31 +0000 (13:18 +0900)
Change-Id: Idbd508f7214a2c7b63832de02afc165a62b95c65
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
org.tizen.guides/html/native/uix/ime_n.htm
org.tizen.tutorials/html/native/uix/ime_tutorial_n.htm

index b21401b..0f3ad95 100644 (file)
@@ -84,7 +84,7 @@
                        <p align="center"><img alt="IME selector" src="../../images/ime_selector.png" /></p>
 </li>
 <li>Checking the IME status
-<p>You can check whether a specific IME is enabled or disabled in the system keyboard setting. You can also check which IME is currently selected as the default keyboard. These features are useful when the user installs a new keyboard.</p></li>
+<p>You can check whether a specific IME is enabled or disabled in the system keyboard setting. You can also check which IME is currently selected as the default keyboard. These features are useful when the user installs a new keyboard. And you can also get the number of IMEs which enabled (usable). </p></li>
 </ul>
 
 
index 672e1db..7b50fc1 100644 (file)
@@ -363,7 +363,7 @@ void show_ime_selector()
 
       <h2 id="enable" name="enable">Checking the IME State</h2>
          
-<p>To check the current default keyboard or whether a specific IME is enabled:</p>
+<p>To check the current default keyboard or whether a specific IME is enabled or to get the number of IMEs which are enabled (usable):</p>
 
 <ol>
 <li>Add the <span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/imemanager</span> privilege to the application manifest file.</li>
@@ -403,6 +403,27 @@ void get_active_ime()
 </pre>
 
 <p>If the function is successful, it returns 0.</p>
+</li>
+<li>To get the number of IMEs which are enabled (usable), call the <span style="font-family: Courier New,Courier,monospace">ime_manager_get_enabled_ime_count()</span> function:
+
+<pre class="prettyprint">
+int get_enabled_ime_count()
+{
+&nbsp;&nbsp;&nbsp;int count = ime_manager_get_enabled_ime_count();
+&nbsp;&nbsp;&nbsp;if (count == 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (get_last_result() != IME_MANAGER_ERROR_NONE)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;// Take action
+
+&nbsp;&nbsp;&nbsp;return count;
+}
+</pre>
+
+<p>If the function is successful, it returns the number of enabled IMEs. Otherwise 0.</p>
 </li></ol>
   
 <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>