1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <title>StartKeyboardApplet</title>
8  </head>
9  <body>
10    <h1><CODE>nn::swkbd::CTR::StartKeyboardApplet</CODE> Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14bool StartKeyboardApplet(
15     <a href="../../../nn/applet/CTR/WakeupState.html">nn::applet::AppletWakeupState</a> * pWakeupState,
16     <a href="../../../nn/swkbd/CTR/Parameter/Overview.html">Parameter</a> * pParameter,
17     void * pSharedMemoryAddr,
18     size_t sharedMemorySize,
19     const wchar_t * pInitialInputText = NULL,
20     const <a href="../../../nn/swkbd/CTR/UserWord/Overview.html">UserWord</a> * pUserWordArray = NULL,
21     const void * pInitialStatusData = NULL,
22     const void * pInitialLearningData = NULL,
23     <a href="../../../nn/swkbd/CTR/AppTextCheckCallback.html">AppTextCheckCallback</a> callback = NULL
24);
25</pre>
26    </div>
27    <h2>Arguments</h2>
28    <div class="section">
29      <table class="arguments">
30        <thead>
31          <tr>
32            <td width="15" />
33            <th>Name</th>
34            <td>Description</td>
35          </tr>
36        </thead>
37        <tr>
38          <td>out</td>
39          <th>pWakeupState</th>
40          <td>The type of startup request. An undefined value is stored here on failure.</td>
41        </tr>
42        <tr>
43          <td>inout</td>
44          <th>pParameter</th>
45          <td>Parameter's structure.</td>
46        </tr>
47        <tr>
48          <td>in</td>
49          <th>pSharedMemoryAddr</th>
50          <td>Starting address of the shared memory region. Must be aligned to 4096 bytes. Device memory cannot be specified.</td>
51        </tr>
52        <tr>
53          <td>in</td>
54          <th>sharedMemorySize</th>
55          <td>The size of the shared memory region. Must be a multiple of 4096.</td>
56        </tr>
57        <tr>
58          <td>in</td>
59          <th>pInitialInputText</th>
60          <td>The starting address of the initial input text.</td>
61        </tr>
62        <tr>
63          <td>in</td>
64          <th>pUserWordArray</th>
65          <td>The starting address of the user dictionary's registered word array.</td>
66        </tr>
67        <tr>
68          <td>in</td>
69          <th>pInitialStatusData</th>
70          <td>The starting address of the initial operating status data at startup.</td>
71        </tr>
72        <tr>
73          <td>in</td>
74          <th>pInitialLearningData</th>
75          <td>The starting address of the initial predictive text learning data at startup.</td>
76        </tr>
77        <tr>
78          <td>in</td>
79          <th>callback</th>
80          <td>The callback for text checking by the application.</td>
81        </tr> </table>
82    </div>
83    <h2>Return Values</h2>
84    <div class="section">Returns <CODE>true</CODE> on success. </div>
85    <h2>Description</h2>
86    <div class="section">
87      <p>Starts up the software keyboard applet.</p><p>Before calling this function, allocate a shared memory region of the size obtained with the <a href="../../../nn/swkbd/CTR/GetSharedMemorySize.html"><CODE>nn::swkbd::CTR::GetSharedMemorySize</CODE></a> function. Specify that region's starting address and size for <span class="argument">pSharedMemoryAddr</span> and <span class="argument">sharedMemorySize</span>, respectively. You cannot specify device memory. <br /> If for some reason a shared memory region was allocated with a size larger than that obtained by the <a href="../../../nn/swkbd/CTR/GetSharedMemorySize.html"><CODE>nn::swkbd::CTR::GetSharedMemorySize</CODE></a> function, you must be sure to specify the actual allocated size for <span class="argument">sharedMemorySize</span>. <br /> When the shared memory size is <CODE>0</CODE>, specify <CODE>NULL</CODE> for <span class="argument">pSharedMemoryAddr</span>.</p><p>For <span class="argument">pParameter</span>, specify the starting address of a parameter structure that holds the same <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure as its member variables as was specified in the argument to the <a href="../../../nn/swkbd/CTR/GetSharedMemorySize.html"><CODE>nn::swkbd::CTR::GetSharedMemorySize</CODE></a> function.</p><p>For <span class="argument">pInitialInputText</span>, specify the starting address of a <CODE>NULL</CODE>-terminated string that you want to use as preexisting input when the software keyboard starts up. <br />If you specify a string whose length exceeds the value of the <CODE>textLengthMax</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure, only <CODE>textLengthMax</CODE> characters from the start of the string are input. In addition, if <CODE>false</CODE> is specified for the <CODE>lineFeed</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure, only the string up until the first newline is input when the string includes newlines. <br /> If not specifying a string, specify <CODE>NULL</CODE>.</p><p>For <span class="argument">pUserWordArray</span>, specify the starting address of the <a href="../../../nn/swkbd/CTR/UserWord/Overview.html"><CODE>nn::swkbd::CTR::UserWord</CODE></a> structure array. The number of elements in this array is specified by the <CODE>numUserWords</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure. Words are registered to the user dictionary in order from the start of the array. However if an attempt is made to register more than <a href="../../../nn/swkbd/CTR/NUM_USER_WORDS_MAX.html"><CODE>nn::swkbd::CTR::NUM_USER_WORDS_MAX</CODE></a> number of words per any single language, those extra words are ignored and not registered. <br /> Specify <CODE>NULL</CODE> when not using a user dictionary.</p><p>For <span class="argument">pInitialStatusData</span>, specify the starting address of the operating status data to apply to the software keyboard's operating status when it is started up.<br /> If not specifying the operating status, specify <CODE>NULL</CODE>. <br /> If you specify <CODE>EXT_OUTPUT_DATA_STATUS</CODE> for the <CODE>extOutputDataFlag</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure, you can output the operating status data when the software keyboard ends. <br /> The output operating status data can be obtained by checking the value of the <CODE>statusData</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure.</p><p>For <span class="argument">pInitialLearningData</span>, specify the starting address of the predictive text learning data to apply to the software keyboard's predictive text learning status when it is started up.<br /> This data includes information pertaining to the corresponding language, so the learning data is applied only when this information matches the software keyboard's dictionary language setting at startup.<br /> However, the learning status is reset if the dictionary language setting is changed by the user while the software keyboard is running.<br /> If not specifying any predictive text learning data, specify <CODE>NULL</CODE>. <br /> If you specify <CODE>EXT_OUTPUT_DATA_LEARNING</CODE> for the <CODE>extOutputDataFlag</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure, you can output the predictive text learning data when the software keyboard ends. The output data can be obtained by checking the value of the <CODE>learningData</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure.</p><p>If the <CODE>TEXT_CHECK_APP</CODE> flag has been set in the <CODE>textCheckFlag</CODE> member variable of the <a href="../../../nn/swkbd/CTR/Config/Overview.html"><CODE>nn::swkbd::CTR::Config</CODE></a> structure, specify the text checking callback function in <span class="argument">callback</span>. <br /> In all other instances the value of this argument is ignored.</p><p>When a library applet other than the software keyboard applet has been preloaded, you must cancel that preload before calling this function.</p><p>This function calls the <a href="../../../nn/applet/CTR/WaitForStarting.html"><CODE>nn::applet::CTR::WaitForStarting</CODE></a> function. <br /> Because you must determine whether to close the application when this function returns, call the <a href="../../../nn/applet/CTR/IsExpectedToCloseApplication.html"><CODE>nn::applet::CTR::IsExpectedToCloseApplication</CODE></a> function immediately after control exits this function.</p></div>
88    <h2>Revision History</h2>
89    <div class="section">
90      <dl class="history">
91        <dt>2011/03/01</dt>
92        <dd>Initial version.<br />
93        </dd>
94      </dl>
95    </div>
96  <hr><p>CONFIDENTIAL</p></body>
97</html>