nn::swkbd::CTR::StartKeyboardApplet Function
bool StartKeyboardApplet(
nn::applet::AppletWakeupState * pWakeupState,
Parameter * pParameter,
void * pSharedMemoryAddr,
size_t sharedMemorySize,
const wchar_t * pInitialInputText = NULL,
const UserWord * pUserWordArray = NULL,
const void * pInitialStatusData = NULL,
const void * pInitialLearningData = NULL,
AppTextCheckCallback callback = NULL
);
| Name | Description | |
|---|---|---|
| out | pWakeupState | The type of startup request. An undefined value is stored here on failure. |
| inout | pParameter | Parameter's structure. |
| in | pSharedMemoryAddr | Starting address of the shared memory region. Must be aligned to 4096 bytes. Device memory cannot be specified. |
| in | sharedMemorySize | The size of the shared memory region. Must be a multiple of 4096. |
| in | pInitialInputText | The starting address of the initial input text. |
| in | pUserWordArray | The starting address of the user dictionary's registered word array. |
| in | pInitialStatusData | The starting address of the initial operating status data at startup. |
| in | pInitialLearningData | The starting address of the initial predictive text learning data at startup. |
| in | callback | The callback for text checking by the application. |
true on success. Starts up the software keyboard applet.
Before calling this function, allocate a shared memory region of the size obtained with the nn::swkbd::CTR::GetSharedMemorySize function. Specify that region's starting address and size for pSharedMemoryAddr and sharedMemorySize, respectively. You cannot specify device memory.
If for some reason a shared memory region was allocated with a size larger than that obtained by the nn::swkbd::CTR::GetSharedMemorySize function, you must be sure to specify the actual allocated size for sharedMemorySize.
When the shared memory size is 0, specify NULL for pSharedMemoryAddr.
For pParameter, specify the starting address of a parameter structure that holds the same nn::swkbd::CTR::Config structure as its member variables as was specified in the argument to the nn::swkbd::CTR::GetSharedMemorySize function.
For pInitialInputText, specify the starting address of a NULL-terminated string that you want to use as preexisting input when the software keyboard starts up.
If you specify a string whose length exceeds the value of the textLengthMax member variable of the nn::swkbd::CTR::Config structure, only textLengthMax characters from the start of the string are input. In addition, if false is specified for the lineFeed member variable of the nn::swkbd::CTR::Config structure, only the string up until the first newline is input when the string includes newlines.
If not specifying a string, specify NULL.
For pUserWordArray, specify the starting address of the nn::swkbd::CTR::UserWord structure array. The number of elements in this array is specified by the numUserWords member variable of the nn::swkbd::CTR::Config 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 nn::swkbd::CTR::NUM_USER_WORDS_MAX number of words per any single language, those extra words are ignored and not registered.
Specify NULL when not using a user dictionary.
For pInitialStatusData, specify the starting address of the operating status data to apply to the software keyboard's operating status when it is started up.
If not specifying the operating status, specify NULL.
If you specify EXT_OUTPUT_DATA_STATUS for the extOutputDataFlag member variable of the nn::swkbd::CTR::Config structure, you can output the operating status data when the software keyboard ends.
The output operating status data can be obtained by checking the value of the statusData member variable of the nn::swkbd::CTR::Config structure.
For pInitialLearningData, 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.
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.
However, the learning status is reset if the dictionary language setting is changed by the user while the software keyboard is running.
If not specifying any predictive text learning data, specify NULL.
If you specify EXT_OUTPUT_DATA_LEARNING for the extOutputDataFlag member variable of the nn::swkbd::CTR::Config 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 learningData member variable of the nn::swkbd::CTR::Config structure.
If the TEXT_CHECK_APP flag has been set in the textCheckFlag member variable of the nn::swkbd::CTR::Config structure, specify the text checking callback function in callback.
In all other instances the value of this argument is ignored.
When a library applet other than the software keyboard applet has been preloaded, you must cancel that preload before calling this function.
This function calls the nn::applet::CTR::WaitForStarting function.
Because you must determine whether to close the application when this function returns, call the nn::applet::CTR::IsExpectedToCloseApplication function immediately after control exits this function.
CONFIDENTIAL