wut
1.0.0-beta9
Wii U Toolchain
|
Graphical software keyboard, supporting several languages and configurations. More...
Data Structures | |
struct | AppearArg |
Arguments for the swkbd input form and keyboard. More... | |
struct | ConfigArg |
Configuration options for the virtual keyboard. More... | |
struct | ControllerInfo |
Input and controller information for swkbd. More... | |
struct | CreateArg |
The arguments used to initialise swkbd and pass in its required resources. More... | |
struct | DrawStringInfo |
struct | InputFormArg |
Arguments for swkbd the input form (text area). More... | |
struct | KeyboardArg |
Arguments for the swkbd keyboard. More... | |
struct | KeyboardCondition |
struct | ReceiverArg |
Enumerations | |
enum | ControllerType { Unknown0 = 0 } |
enum | LanguageType { Japanese = 0, English = 1 } |
enum | RegionType { Japan = 0, USA = 1, Europe = 2 } |
enum | State { Unknown0 = 0 } |
Functions | |
bool | AppearInputForm (const AppearArg &args) |
Show an input form (keyboard with text area) with the given configuration. More... | |
bool | AppearKeyboard (const KeyboardArg &args) |
Show a keyboard with the given configuration. More... | |
void | CalcSubThreadFont () |
Calculate font data. More... | |
void | CalcSubThreadPredict () |
Calculate word prediction data. More... | |
void | Calc (const ControllerInfo &controllerInfo) |
Respond to user inputs and calculate the state of input buffers and graphics. More... | |
void | ConfirmUnfixAll () |
bool | Create (const CreateArg &args) |
Initialise the swkbd library and create the keyboard and input form. More... | |
void | Destroy () |
Clean up and shut down the swkbd library. More... | |
bool | DisappearInputForm () |
Hide a previously shown input form. More... | |
bool | DisappearKeyboard () |
Hide a previously shown keyboard. More... | |
void | DrawDRC () |
Draw the keyboard to the DRC. More... | |
void | DrawTV () |
Draw the keyboard to the TV. More... | |
void | GetDrawStringInfo (DrawStringInfo *drawStringInfo) |
const char16_t * | GetInputFormString () |
Get the string the user typed into the input form. More... | |
void | GetKeyboardCondition (KeyboardCondition *keyboardCondition) |
State | GetStateInputForm () |
State | GetStateKeyboard () |
uint32_t | GetWorkMemorySize (uint32_t unk) |
Get the required size for swkbd's work memory buffer. More... | |
void | InactivateSelectCursor () |
bool | InitLearnDic (void *dictionary) |
bool | IsCoveredWithSubWindow () |
bool | IsDecideCancelButton (bool *outIsSelected) |
Gets the current status of the Cancel button on the keyboard. More... | |
bool | IsDecideOkButton (bool *outIsSelected) |
Gets the current status of the OK button on the keyboard. More... | |
bool | IsKeyboardTarget (IEventReceiver *eventReceiver) |
bool | IsNeedCalcSubThreadFont () |
Determines whether the font data needs calculating. More... | |
bool | IsNeedCalcSubThreadPredict () |
Determines whether the prediction data needs calculating. More... | |
bool | IsSelectCursorActive () |
Determines whether the selection cursor is active. More... | |
void | MuteAllSound (bool muted) |
Mutes or unmutes the sounds generated by the keyboard. More... | |
void | SetControllerRemo (ControllerType type) |
void | SetCursorPos (int pos) |
Set the character at which the cursor is positioned. More... | |
void | SetEnableOkButton (bool enable) |
Enables and disables the OK button on the keyboard. More... | |
void | SetInputFormString (const char16_t *str) |
Sets the text in the input form. More... | |
void | SetReceiver (const ReceiverArg &receiver) |
void | SetSelectFrom (int) |
void | SetUserControllerEventObj (IControllerEventObj *controllerEventObj) |
void | SetUserSoundObj (ISoundObj *soundObj) |
Graphical software keyboard, supporting several languages and configurations.
Applications should first call Create to initialise the library, followed by AppearInputForm to show a text area and virtual keyboard. Input should be forwarded to the keyboard via Calc, along with calls to CalcSubThreadFont and CalcSubThreadPredict. Finally, the keyboard can be rendered with DrawTV and DrawDRC. The user's interaction with the keyboard can be tracked with GetInputFormString, IsDecideOkButton and IsDecideCancelButton; and once satisfied the application can dismiss the keyboard with DisappearInputForm. Don't forget Destroy!
struct nn::swkbd::AppearArg |
Arguments for the swkbd input form and keyboard.
Definition at line 153 of file swkbd_cpp.h.
Data Fields | ||
---|---|---|
KeyboardArg | keyboardArg | Arguments for the virtual keyboard. |
InputFormArg | inputFormArg | Arguments for the input form (text area) |
struct nn::swkbd::ControllerInfo |
Input and controller information for swkbd.
Definition at line 180 of file swkbd_cpp.h.
Data Fields | ||
---|---|---|
VPADStatus * | vpad | DRC input information, see VPADRead. |
KPADStatus * | kpad[4] | Wiimote and extension controller inputs, see KPADRead. |
struct nn::swkbd::CreateArg |
The arguments used to initialise swkbd and pass in its required resources.
Definition at line 163 of file swkbd_cpp.h.
Data Fields | ||
---|---|---|
void * | workMemory | A pointer to a work memory buffer; see GetWorkMemorySize. |
RegionType | regionType | The swkbd region to use. |
uint32_t | unk_0x08 | |
FSClient * | fsClient | An FSClient for swkbd to use while loading resources. |
struct nn::swkbd::InputFormArg |
Arguments for swkbd the input form (text area).
Definition at line 125 of file swkbd_cpp.h.
struct nn::swkbd::KeyboardArg |
Arguments for the swkbd keyboard.
Definition at line 116 of file swkbd_cpp.h.
Data Fields | ||
---|---|---|
ConfigArg | configArg | Configuration for the keyboard itself. |
ReceiverArg | receiverArg |
struct nn::swkbd::KeyboardCondition |
Definition at line 202 of file swkbd_cpp.h.
Data Fields | ||
---|---|---|
uint32_t | unk_0x00 | |
uint32_t | unk_0x04 |
struct nn::swkbd::ReceiverArg |
Definition at line 98 of file swkbd_cpp.h.
Data Fields | ||
---|---|---|
uint32_t | unk_0x00 | |
uint32_t | unk_0x04 | |
uint32_t | unk_0x08 | |
int32_t | unk_0x0C | |
uint32_t | unk_0x10 | |
int32_t | unk_0x14 |
|
strong |
Enumerator | |
---|---|
Unknown0 |
Definition at line 38 of file swkbd_cpp.h.
|
strong |
Enumerator | |
---|---|
Japanese | |
English |
Definition at line 43 of file swkbd_cpp.h.
|
strong |
Enumerator | |
---|---|
Japan | |
USA | |
Europe |
Definition at line 49 of file swkbd_cpp.h.
|
strong |
Enumerator | |
---|---|
Unknown0 |
Definition at line 56 of file swkbd_cpp.h.
bool nn::swkbd::AppearInputForm | ( | const AppearArg & | args | ) |
Show an input form (keyboard with text area) with the given configuration.
args | An AppearArg struct with the desired configuration for the keyboard and input form. |
true
on success, or false
on error.bool nn::swkbd::AppearKeyboard | ( | const KeyboardArg & | args | ) |
Show a keyboard with the given configuration.
args | An KeyboardArg struct with the desired configuration for the keyboard. |
true
on success, or false
on error.void nn::swkbd::CalcSubThreadFont | ( | ) |
void nn::swkbd::CalcSubThreadPredict | ( | ) |
void nn::swkbd::Calc | ( | const ControllerInfo & | controllerInfo | ) |
Respond to user inputs and calculate the state of input buffers and graphics.
controllerInfo | A ControllerInfo structure containing fresh data from the controllers (see VPADRead and KPADRead). Each controller can also be nullptr if data is not available. |
void nn::swkbd::ConfirmUnfixAll | ( | ) |
bool nn::swkbd::Create | ( | const CreateArg & | args | ) |
void nn::swkbd::Destroy | ( | ) |
bool nn::swkbd::DisappearInputForm | ( | ) |
Hide a previously shown input form.
true
on success, false
otherwise.bool nn::swkbd::DisappearKeyboard | ( | ) |
void nn::swkbd::DrawDRC | ( | ) |
Draw the keyboard to the DRC.
Must be called inside a valid GX2 rendering context, after rendering all other DRC graphics (to appear under the keyboard)
void nn::swkbd::DrawTV | ( | ) |
Draw the keyboard to the TV.
Must be called inside a valid GX2 rendering context, after rendering all other TV graphics (to appear under the keyboard)
void nn::swkbd::GetDrawStringInfo | ( | DrawStringInfo * | drawStringInfo | ) |
const char16_t* nn::swkbd::GetInputFormString | ( | ) |
Get the string the user typed into the input form.
void nn::swkbd::GetKeyboardCondition | ( | KeyboardCondition * | keyboardCondition | ) |
State nn::swkbd::GetStateInputForm | ( | ) |
State nn::swkbd::GetStateKeyboard | ( | ) |
uint32_t nn::swkbd::GetWorkMemorySize | ( | uint32_t | unk | ) |
void nn::swkbd::InactivateSelectCursor | ( | ) |
bool nn::swkbd::InitLearnDic | ( | void * | dictionary | ) |
bool nn::swkbd::IsCoveredWithSubWindow | ( | ) |
bool nn::swkbd::IsDecideCancelButton | ( | bool * | outIsSelected | ) |
Gets the current status of the Cancel button on the keyboard.
outIsSelected | Pointer to a boolean to write the button status to, or nullptr if the return value is enough. |
true
if the Cancel button has been pressed, or false
otherwise.bool nn::swkbd::IsDecideOkButton | ( | bool * | outIsSelected | ) |
Gets the current status of the OK button on the keyboard.
outIsSelected | Pointer to a boolean to write the button status to, or nullptr if the return value is enough. |
true
if the OK button has been pressed, or false
otherwise.bool nn::swkbd::IsKeyboardTarget | ( | IEventReceiver * | eventReceiver | ) |
bool nn::swkbd::IsNeedCalcSubThreadFont | ( | ) |
Determines whether the font data needs calculating.
If it does, a call to CalcSubThreadFont is required.
true
if the font data needs calculating, false
otherwise.bool nn::swkbd::IsNeedCalcSubThreadPredict | ( | ) |
Determines whether the prediction data needs calculating.
If it does, a call to CalcSubThreadPredict is required.
true
if the prediction data needs calculating, false
otherwise.bool nn::swkbd::IsSelectCursorActive | ( | ) |
Determines whether the selection cursor is active.
true
if the selection cursor is active, false
otherwise. void nn::swkbd::MuteAllSound | ( | bool | muted | ) |
Mutes or unmutes the sounds generated by the keyboard.
muted | true to disable all sounds, or false to enable them. |
void nn::swkbd::SetControllerRemo | ( | ControllerType | type | ) |
void nn::swkbd::SetCursorPos | ( | int | pos | ) |
Set the character at which the cursor is positioned.
pos | The position at which to move the cursor, with 0 corresponding to the start of the string (before the first character). |
void nn::swkbd::SetEnableOkButton | ( | bool | enable | ) |
Enables and disables the OK button on the keyboard.
When disabled, the button cannot be pressed.
enable | true to enable the button, or false to disable it. |
void nn::swkbd::SetInputFormString | ( | const char16_t * | str | ) |
Sets the text in the input form.
str | The UTF-16 string to set the input form to. |
void nn::swkbd::SetReceiver | ( | const ReceiverArg & | receiver | ) |
void nn::swkbd::SetSelectFrom | ( | int | ) |
void nn::swkbd::SetUserControllerEventObj | ( | IControllerEventObj * | controllerEventObj | ) |
void nn::swkbd::SetUserSoundObj | ( | ISoundObj * | soundObj | ) |