libnx
v4.8.0
|
Wrapper for using the swkbd (software keyboard) LibraryApplet. More...
Go to the source code of this file.
Data Structures | |
struct | SwkbdDictWord |
User dictionary word. More... | |
struct | SwkbdCustomizeDicInfo |
Input data for SwkbdInline request SetCustomizeDic. More... | |
struct | SwkbdCustomizedDictionarySet |
struct | SwkbdArgCommon |
Base swkbd arg struct. More... | |
struct | SwkbdArgV0 |
struct | SwkbdArgV7 |
Arg struct for version 0x30007+. More... | |
struct | SwkbdArgVB |
Arg struct for version 0x6000B+. More... | |
struct | SwkbdConfig |
struct | SwkbdRect |
Rect. More... | |
struct | SwkbdInitializeArg |
InitializeArg for SwkbdInline. More... | |
struct | SwkbdAppearArg |
struct | SwkbdInlineCalcArg |
struct | SwkbdChangedStringArg |
Struct data for SwkbdInline Interactive reply storage ChangedString*, at the end following the string. More... | |
struct | SwkbdMovedCursorArg |
Struct data for SwkbdInline Interactive reply storage MovedCursor*, at the end following the string. More... | |
struct | SwkbdMovedTabArg |
Struct data for SwkbdInline Interactive reply storage MovedTab*, at the end following the string. More... | |
struct | SwkbdDecidedEnterArg |
Struct data for SwkbdInline Interactive reply storage DecidedEnter*, at the end following the string. More... | |
struct | SwkbdInline |
InlineKeyboard. More... | |
Typedefs | |
typedef SwkbdTextCheckResult(* | SwkbdTextCheckCb) (char *tmp_string, size_t tmp_string_size) |
TextCheck callback set by swkbdConfigSetTextCheckCallback, for validating the input string when the swkbd ok-button is pressed. This buffer contains an UTF-8 string. This callback should validate the input string, then return a SwkbdTextCheckResult indicating success/failure. On failure, this function must write an error message to the tmp_string buffer, which will then be displayed by swkbd. | |
typedef void(* | SwkbdChangedStringCb) (const char *str, SwkbdChangedStringArg *arg) |
This callback is used by swkbdInlineUpdate when handling ChangedString* replies (text changed by the user or by swkbdInlineSetInputText). More... | |
typedef void(* | SwkbdChangedStringV2Cb) (const char *str, SwkbdChangedStringArg *arg, bool flag) |
This callback is used by swkbdInlineUpdate when handling ChangedString*V2 replies (text changed by the user or by swkbdInlineSetInputText). More... | |
typedef void(* | SwkbdMovedCursorCb) (const char *str, SwkbdMovedCursorArg *arg) |
This callback is used by swkbdInlineUpdate when handling MovedCursor* replies. More... | |
typedef void(* | SwkbdMovedCursorV2Cb) (const char *str, SwkbdMovedCursorArg *arg, bool flag) |
This callback is used by swkbdInlineUpdate when handling MovedCursor*V2 replies. More... | |
typedef void(* | SwkbdMovedTabCb) (const char *str, SwkbdMovedTabArg *arg) |
This callback is used by swkbdInlineUpdate when handling MovedTab* replies. More... | |
typedef void(* | SwkbdDecidedEnterCb) (const char *str, SwkbdDecidedEnterArg *arg) |
This callback is used by swkbdInlineUpdate when handling DecidedEnter* replies (when the final text was submitted via the button). More... | |
Enumerations | |
enum | SwkbdTextCheckResult { SwkbdTextCheckResult_OK = 0 , SwkbdTextCheckResult_Bad = 1 , SwkbdTextCheckResult_Prompt = 2 , SwkbdTextCheckResult_Silent = 3 } |
Output result returned by SwkbdTextCheckCb. More... | |
enum | SwkbdType { SwkbdType_Normal = 0 , SwkbdType_NumPad = 1 , SwkbdType_QWERTY = 2 , SwkbdType_Unknown3 = 3 , SwkbdType_Latin = 4 , SwkbdType_ZhHans = 5 , SwkbdType_ZhHant = 6 , SwkbdType_Korean = 7 , SwkbdType_All = 8 , SwkbdType_Unknown9 = 9 } |
Type of keyboard. More... | |
enum | { SwkbdKeyDisableBitmask_Space = (1U<<( 1 )) , SwkbdKeyDisableBitmask_At = (1U<<( 2 )) , SwkbdKeyDisableBitmask_Percent = (1U<<( 3 )) , SwkbdKeyDisableBitmask_ForwardSlash = (1U<<( 4 )) , SwkbdKeyDisableBitmask_Backslash = (1U<<( 5 )) , SwkbdKeyDisableBitmask_Numbers = (1U<<( 6 )) , SwkbdKeyDisableBitmask_DownloadCode = (1U<<( 7 )) , SwkbdKeyDisableBitmask_UserName = (1U<<( 8 )) } |
Bitmask for SwkbdArgCommon::keySetDisableBitmask. This disables keys on the keyboard when the corresponding bit(s) are set. More... | |
enum | SwkbdTextDrawType { SwkbdTextDrawType_Line = 0 , SwkbdTextDrawType_Box = 1 , SwkbdTextDrawType_DownloadCode = 2 } |
Value for SwkbdArgCommon::textDrawType. Only applies when stringLenMax is 1..32, otherwise swkbd will only use SwkbdTextDrawType_Box. More... | |
enum | SwkbdRequestCommand { SwkbdRequestCommand_Finalize = 0x4 , SwkbdRequestCommand_SetUserWordInfo = 0x6 , SwkbdRequestCommand_SetCustomizeDic = 0x7 , SwkbdRequestCommand_Calc = 0xA , SwkbdRequestCommand_SetCustomizedDictionaries = 0xB , SwkbdRequestCommand_UnsetCustomizedDictionaries = 0xC , SwkbdRequestCommand_SetChangedStringV2Flag = 0xD , SwkbdRequestCommand_SetMovedCursorV2Flag = 0xE } |
SwkbdInline Interactive input storage request ID. | |
enum | SwkbdReplyType { SwkbdReplyType_FinishedInitialize = 0x0 , SwkbdReplyType_ChangedString = 0x2 , SwkbdReplyType_MovedCursor = 0x3 , SwkbdReplyType_MovedTab = 0x4 , SwkbdReplyType_DecidedEnter = 0x5 , SwkbdReplyType_DecidedCancel = 0x6 , SwkbdReplyType_ChangedStringUtf8 = 0x7 , SwkbdReplyType_MovedCursorUtf8 = 0x8 , SwkbdReplyType_DecidedEnterUtf8 = 0x9 , SwkbdReplyType_UnsetCustomizeDic = 0xA , SwkbdReplyType_ReleasedUserWordInfo = 0xB , SwkbdReplyType_UnsetCustomizedDictionaries = 0xC , SwkbdReplyType_ChangedStringV2 = 0xD , SwkbdReplyType_MovedCursorV2 = 0xE , SwkbdReplyType_ChangedStringUtf8V2 = 0xF , SwkbdReplyType_MovedCursorUtf8V2 = 0x10 } |
SwkbdInline Interactive output storage reply ID. | |
enum | SwkbdState { SwkbdState_Inactive = 0x0 , SwkbdState_Initialized = 0x1 , SwkbdState_Appearing = 0x2 , SwkbdState_Shown = 0x3 , SwkbdState_Disappearing = 0x4 , SwkbdState_Unknown5 = 0x5 , SwkbdState_Unknown6 = 0x6 } |
SwkbdInline State. More... | |
enum | SwkbdInlineMode { SwkbdInlineMode_UserDisplay = 0 , SwkbdInlineMode_AppletDisplay = 1 } |
Value for SwkbdInitializeArg mode. Controls the LibAppletMode when launching the applet. More... | |
Wrapper for using the swkbd (software keyboard) LibraryApplet.
typedef void(* SwkbdChangedStringCb) (const char *str, SwkbdChangedStringArg *arg) |
This callback is used by swkbdInlineUpdate when handling ChangedString* replies (text changed by the user or by swkbdInlineSetInputText).
str is the UTF-8 string for the current text.
typedef void(* SwkbdChangedStringV2Cb) (const char *str, SwkbdChangedStringArg *arg, bool flag) |
This callback is used by swkbdInlineUpdate when handling ChangedString*V2 replies (text changed by the user or by swkbdInlineSetInputText).
str is the UTF-8 string for the current text.
typedef void(* SwkbdDecidedEnterCb) (const char *str, SwkbdDecidedEnterArg *arg) |
This callback is used by swkbdInlineUpdate when handling DecidedEnter* replies (when the final text was submitted via the button).
str is the UTF-8 string for the current text.
typedef void(* SwkbdMovedCursorCb) (const char *str, SwkbdMovedCursorArg *arg) |
This callback is used by swkbdInlineUpdate when handling MovedCursor* replies.
str is the UTF-8 string for the current text.
typedef void(* SwkbdMovedCursorV2Cb) (const char *str, SwkbdMovedCursorArg *arg, bool flag) |
This callback is used by swkbdInlineUpdate when handling MovedCursor*V2 replies.
str is the UTF-8 string for the current text.
typedef void(* SwkbdMovedTabCb) (const char *str, SwkbdMovedTabArg *arg) |
This callback is used by swkbdInlineUpdate when handling MovedTab* replies.
str is the UTF-8 string for the current text.
anonymous enum |
Bitmask for SwkbdArgCommon::keySetDisableBitmask. This disables keys on the keyboard when the corresponding bit(s) are set.
Enumerator | |
---|---|
SwkbdKeyDisableBitmask_Space | Disable space-bar. |
SwkbdKeyDisableBitmask_At | Disable '@'. |
SwkbdKeyDisableBitmask_Percent | Disable ''. |
SwkbdKeyDisableBitmask_ForwardSlash | Disable '/'. |
SwkbdKeyDisableBitmask_Backslash | Disable '\'. |
SwkbdKeyDisableBitmask_Numbers | Disable numbers. |
SwkbdKeyDisableBitmask_DownloadCode | Used for swkbdConfigMakePresetDownloadCode. |
SwkbdKeyDisableBitmask_UserName | Used for swkbdConfigMakePresetUserName. Disables '@', '', and '\'. |
enum SwkbdInlineMode |
Value for SwkbdInitializeArg mode. Controls the LibAppletMode when launching the applet.
Enumerator | |
---|---|
SwkbdInlineMode_UserDisplay | LibAppletMode_BackgroundIndirect. This is the default. The user-process must handle displaying the swkbd gfx on the screen, by loading the image with swkbdInlineGetImage. |
SwkbdInlineMode_AppletDisplay | LibAppletMode_Background. The applet will handle displaying gfx on the screen. |
enum SwkbdState |
SwkbdInline State.
Enumerator | |
---|---|
SwkbdState_Inactive | Default state from swkbdInlineCreate, before a state is set by swkbdInlineUpdate when a reply is received. Also indicates that the applet is no longer running. |
SwkbdState_Initialized | Applet is initialized but hidden. |
SwkbdState_Appearing | Applet is appearing. |
SwkbdState_Shown | Applet is fully shown and ready to accept text input. |
SwkbdState_Disappearing | The user pressed the ok or cancel button, causing the applet to disappear. |
enum SwkbdTextCheckResult |
Output result returned by SwkbdTextCheckCb.
enum SwkbdTextDrawType |
Value for SwkbdArgCommon::textDrawType. Only applies when stringLenMax is 1..32, otherwise swkbd will only use SwkbdTextDrawType_Box.
Enumerator | |
---|---|
SwkbdTextDrawType_Line | The text will be displayed on a line. Also enables displaying the Header and Sub text. |
SwkbdTextDrawType_Box | The text will be displayed in a box. |
SwkbdTextDrawType_DownloadCode | Used by swkbdConfigMakePresetDownloadCode on [5.0.0+]. Enables using SwkbdArgV7 unk_x3e0. |
enum SwkbdType |
Type of keyboard.
Enumerator | |
---|---|
SwkbdType_Normal | Normal keyboard. |
SwkbdType_NumPad | Number pad. The buttons at the bottom left/right are only available when they're set by swkbdConfigSetLeftOptionalSymbolKey / swkbdConfigSetRightOptionalSymbolKey. |
SwkbdType_QWERTY | QWERTY (and variants) keyboard only. |
SwkbdType_Unknown3 | The same as SwkbdType_Normal keyboard. |
SwkbdType_Latin | All Latin like languages keyboard only (without CJK keyboard). |
SwkbdType_ZhHans | Chinese Simplified keyboard only. |
SwkbdType_ZhHant | Chinese Traditional keyboard only. |
SwkbdType_Korean | Korean keyboard only. |
SwkbdType_All | All language keyboards. |
SwkbdType_Unknown9 | Unknown. |
void swkbdClose | ( | SwkbdConfig * | c | ) |
Closes a SwkbdConfig struct.
c | SwkbdConfig struct. |
void swkbdConfigMakePresetDefault | ( | SwkbdConfig * | c | ) |
Clears the args in the SwkbdConfig struct and initializes it with the Default Preset.
c | SwkbdConfig struct. |
void swkbdConfigMakePresetDownloadCode | ( | SwkbdConfig * | c | ) |
Clears the args in the SwkbdConfig struct and initializes it with the DownloadCode Preset.
c | SwkbdConfig struct. |
void swkbdConfigMakePresetPassword | ( | SwkbdConfig * | c | ) |
Clears the args in the SwkbdConfig struct and initializes it with the Password Preset.
c | SwkbdConfig struct. |
void swkbdConfigMakePresetUserName | ( | SwkbdConfig * | c | ) |
Clears the args in the SwkbdConfig struct and initializes it with the UserName Preset.
c | SwkbdConfig struct. |
|
inlinestatic |
Sets SwkbdArgCommon::blurBackground.
c | SwkbdConfig struct. |
blurBackground | blurBackground |
Result swkbdConfigSetCustomizedDictionaries | ( | SwkbdConfig * | c, |
const SwkbdCustomizedDictionarySet * | dic | ||
) |
Sets the CustomizedDictionaries.
c | SwkbdConfig struct. |
dic | Input SwkbdCustomizedDictionarySet |
|
inlinestatic |
Sets SwkbdArgCommon::dicFlag.
c | SwkbdConfig struct. |
flag | Flag |
void swkbdConfigSetDictionary | ( | SwkbdConfig * | c, |
const SwkbdDictWord * | input, | ||
s32 | entries | ||
) |
Sets the user dictionary.
c | SwkbdConfig struct. |
input | Input data. |
entries | Total entries in the buffer. |
void swkbdConfigSetGuideText | ( | SwkbdConfig * | c, |
const char * | str | ||
) |
Sets the Guide text.
The default is "".
c | SwkbdConfig struct. |
str | UTF-8 input string. |
void swkbdConfigSetHeaderText | ( | SwkbdConfig * | c, |
const char * | str | ||
) |
Sets the Header text.
The default is "".
c | SwkbdConfig struct. |
str | UTF-8 input string. |
|
inlinestatic |
Sets SwkbdArgCommon::initialCursorPos.
c | SwkbdConfig struct. |
initialCursorPos | initialCursorPos |
void swkbdConfigSetInitialText | ( | SwkbdConfig * | c, |
const char * | str | ||
) |
|
inlinestatic |
Sets SwkbdArgCommon::keySetDisableBitmask.
c | SwkbdConfig struct. |
keySetDisableBitmask | keySetDisableBitmask |
void swkbdConfigSetLeftOptionalSymbolKey | ( | SwkbdConfig * | c, |
const char * | str | ||
) |
Sets the LeftOptionalSymbolKey, for SwkbdType_NumPad.
The default is "".
c | SwkbdConfig struct. |
str | UTF-8 input string. |
void swkbdConfigSetOkButtonText | ( | SwkbdConfig * | c, |
const char * | str | ||
) |
|
inlinestatic |
Sets SwkbdArgCommon::passwordFlag.
c | SwkbdConfig struct. |
flag | Flag |
|
inlinestatic |
Sets SwkbdArgCommon::returnButtonFlag.
c | SwkbdConfig struct. |
flag | Flag |
void swkbdConfigSetRightOptionalSymbolKey | ( | SwkbdConfig * | c, |
const char * | str | ||
) |
Sets the RightOptionalSymbolKey, for SwkbdType_NumPad.
The default is "".
c | SwkbdConfig struct. |
str | UTF-8 input string. |
|
inlinestatic |
Sets SwkbdArgCommon::stringLenMax.
c | SwkbdConfig struct. |
stringLenMax | stringLenMax |
|
inlinestatic |
Sets SwkbdArgCommon::stringLenMin.
c | SwkbdConfig struct. |
stringLenMin | stringLenMin |
void swkbdConfigSetSubText | ( | SwkbdConfig * | c, |
const char * | str | ||
) |
Sets the Sub text.
The default is "".
c | SwkbdConfig struct. |
str | UTF-8 input string. |
void swkbdConfigSetTextCheckCallback | ( | SwkbdConfig * | c, |
SwkbdTextCheckCb | cb | ||
) |
Sets the TextCheck callback.
c | SwkbdConfig struct. |
cb | SwkbdTextCheckCb callback. |
|
inlinestatic |
Sets SwkbdArgCommon::textDrawType.
c | SwkbdConfig struct. |
textDrawType | SwkbdTextDrawType |
|
inlinestatic |
Sets SwkbdArgV7::textGrouping.
index | Array index. |
value | Value to write. |
|
inlinestatic |
Sets SwkbdConfig::trigger, default is 0.
Copied to SwkbdArgVB::trigger with [8.0.0+].
trigger | Trigger |
|
inlinestatic |
Sets SwkbdArgCommon::SwkbdType.
c | SwkbdConfig struct. |
type | SwkbdType |
|
inlinestatic |
Sets SwkbdConfig::unkFlag, default is 0.
Copied to SwkbdArgVB::unkFlag with [8.0.0+].
flag | Flag |
Result swkbdCreate | ( | SwkbdConfig * | c, |
s32 | max_dictwords | ||
) |
Creates a SwkbdConfig struct.
c | SwkbdConfig struct. |
max_dictwords | Max SwkbdDictWord entries, 0 for none. |
void swkbdInlineAppear | ( | SwkbdInline * | s, |
const SwkbdAppearArg * | arg | ||
) |
Appear the kbd and set SwkbdAppearArg.
s | SwkbdInline object. |
arg | Input SwkbdAppearArg. |
void swkbdInlineAppearArgSetLeftButtonText | ( | SwkbdAppearArg * | arg, |
const char * | str | ||
) |
Sets the LeftButtonText, for SwkbdType_NumPad.
The default is "". Equivalent to swkbdConfigSetLeftOptionalSymbolKey.
arg | SwkbdAppearArg, previously initialized by swkbdInlineMakeAppearArg. |
str | UTF-8 input string. |
void swkbdInlineAppearArgSetOkButtonText | ( | SwkbdAppearArg * | arg, |
const char * | str | ||
) |
Sets okButtonText for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg.
arg | SwkbdAppearArg |
str | Input UTF-8 string for the Ok button text, this can be empty/NULL to use the default. |
void swkbdInlineAppearArgSetRightButtonText | ( | SwkbdAppearArg * | arg, |
const char * | str | ||
) |
Sets the RightButtonText, for SwkbdType_NumPad.
The default is "". Equivalent to swkbdConfigSetRightOptionalSymbolKey.
arg | SwkbdAppearArg, previously initialized by swkbdInlineMakeAppearArg. |
str | UTF-8 input string. |
|
inlinestatic |
Sets the stringLenMax for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg.
arg | SwkbdAppearArg |
stringLenMax | Max string length |
|
inlinestatic |
Sets the stringLenMin for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg.
arg | SwkbdAppearArg |
stringLenMin | Min string length |
void swkbdInlineAppearEx | ( | SwkbdInline * | s, |
const SwkbdAppearArg * | arg, | ||
u8 | trigger | ||
) |
Appear the kbd and set SwkbdAppearArg.
s | SwkbdInline object. |
arg | Input SwkbdAppearArg. |
trigger | Trigger, default is 0. Requires [6.0.0+], on eariler versions this will always use value 0 internally. |
Result swkbdInlineClose | ( | SwkbdInline * | s | ) |
Closes a SwkbdInline object.
If the applet is running, this will tell the applet to exit, then wait for the applet to exit + applet exit handling.
s | SwkbdInline object. |
Result swkbdInlineCreate | ( | SwkbdInline * | s | ) |
Creates a SwkbdInline object.
Only available on [2.0.0+].
s | SwkbdInline object. |
void swkbdInlineDisappear | ( | SwkbdInline * | s | ) |
Disappear the kbd.
s | SwkbdInline object. |
Result swkbdInlineGetImage | ( | SwkbdInline * | s, |
void * | buffer, | ||
u64 | size, | ||
bool * | data_available | ||
) |
GetImage.
s | SwkbdInline object. | |
[out] | buffer | Output RGBA8 image buffer, this must use the alignment from swkbdInlineGetImageMemoryRequirement. |
[in] | size | Output buffer size, this must match the size from swkbdInlineGetImageMemoryRequirement. |
[out] | data_available | Whether data is available. |
GetImageMemoryRequirement.
[out] | out_size | Output size. |
[out] | out_alignment | Output alignment. |
s32 swkbdInlineGetMaxHeight | ( | SwkbdInline * | s | ) |
Gets the image max height, relative to the bottom of the screen.
s | SwkbdInline object. |
s32 swkbdInlineGetMiniaturizedHeight | ( | SwkbdInline * | s | ) |
Gets the MiniaturizedHeight, relative to the bottom of the screen.
s | SwkbdInline object. |
s32 swkbdInlineGetTouchRectangles | ( | SwkbdInline * | s, |
SwkbdRect * | keytop, | ||
SwkbdRect * | footer | ||
) |
GetTouchRectangles.
Returns number of valid Rects: 1 for only keytop, 2 for keytop/footer.
s | SwkbdInline object. | |
[out] | keytop | SwkbdRect for keytop. Optional, can be NULL. |
[out] | footer | SwkbdRect for footer. Optional, can be NULL. |
GetWindowSize.
[out] | width | Output width. |
[out] | height | Output height. |
bool swkbdInlineIsUsedTouchPointByKeyboard | ( | SwkbdInline * | s, |
s32 | x, | ||
s32 | y | ||
) |
Gets whether the input x/y are within the output from swkbdInlineGetTouchRectangles.
s | SwkbdInline object. | |
[out] | x | X |
[out] | y | Y |
Result swkbdInlineLaunch | ( | SwkbdInline * | s | ) |
Does setup for SwkbdInitializeArg and launches the applet with the SwkbdInline object.
s | SwkbdInline object. |
Result swkbdInlineLaunchForLibraryApplet | ( | SwkbdInline * | s, |
u8 | mode, | ||
u8 | unk_x5 | ||
) |
Same as swkbdInlineLaunch, except mode and unk_x5 for SwkbdInitializeArg are set to the input params.
s | SwkbdInline object. |
mode | Value for SwkbdInitializeArg::mode. |
unk_x5 | Value for SwkbdInitializeArg::unk_x5. |
void swkbdInlineMakeAppearArg | ( | SwkbdAppearArg * | arg, |
SwkbdType | type | ||
) |
Creates a SwkbdAppearArg which can then be passed to swkbdInlineAppear.
arg is initialized with the defaults, with type being set to the input type.
arg | Output SwkbdAppearArg. |
type | SwkbdType type |
void swkbdInlineSetAlphaEnabledInInputMode | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets AlphaEnabledInInputMode.
s | SwkbdInline object. |
flag | Flag |
void swkbdInlineSetBackspaceFlag | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets whether the backspace button is enabled.
The default is enabled.
s | SwkbdInline object. |
flag | Flag |
void swkbdInlineSetChangedStringCallback | ( | SwkbdInline * | s, |
SwkbdChangedStringCb | cb | ||
) |
Sets the ChangedString callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | SwkbdChangedStringCb Callback |
void swkbdInlineSetChangedStringV2Callback | ( | SwkbdInline * | s, |
SwkbdChangedStringV2Cb | cb | ||
) |
Sets the ChangedStringV2 callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | SwkbdChangedStringV2Cb Callback |
void swkbdInlineSetCursorPos | ( | SwkbdInline * | s, |
s32 | pos | ||
) |
Sets the cursor character position in the string.
s | SwkbdInline object. |
pos | Position |
Result swkbdInlineSetCustomizedDictionaries | ( | SwkbdInline * | s, |
const SwkbdCustomizedDictionarySet * | dic | ||
) |
Sets the CustomizedDictionaries.
s | SwkbdInline object. |
dic | Input SwkbdCustomizedDictionarySet |
Result swkbdInlineSetCustomizeDic | ( | SwkbdInline * | s, |
void * | buffer, | ||
size_t | size, | ||
SwkbdCustomizeDicInfo * | info | ||
) |
Sets the CustomizeDic.
s | SwkbdInline object. |
buffer | 0x1000-byte aligned buffer. |
size | 0x1000-byte aligned buffer size. |
info | Input SwkbdCustomizeDicInfo |
void swkbdInlineSetDecidedCancelCallback | ( | SwkbdInline * | s, |
VoidFn | cb | ||
) |
Sets the DecidedCancel callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | Callback |
void swkbdInlineSetDecidedEnterCallback | ( | SwkbdInline * | s, |
SwkbdDecidedEnterCb | cb | ||
) |
Sets the DecidedEnter callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | SwkbdDecidedEnterCb Callback |
void swkbdInlineSetDirectionalButtonAssignFlag | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets whether DirectionalButtonAssign is enabled.
The default is disabled.
s | SwkbdInline object. |
flag | Flag |
void swkbdInlineSetFinishedInitializeCallback | ( | SwkbdInline * | s, |
VoidFn | cb | ||
) |
Sets the FinishedInitialize callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | Callback |
void swkbdInlineSetFooterBgAlpha | ( | SwkbdInline * | s, |
float | alpha | ||
) |
Sets FooterBgAlpha.
s | SwkbdInline object. |
alpha | Alpha, clamped to range 0.0f..1.0f. |
void swkbdInlineSetFooterScalable | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets FooterScalable.
s | SwkbdInline object. |
flag | Flag |
void swkbdInlineSetHardwareKeyboardFlag | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets whether Hardware-keyboard is enabled.
The default is enabled.
s | SwkbdInline object. |
flag | Flag |
void swkbdInlineSetInputModeFadeType | ( | SwkbdInline * | s, |
u8 | type | ||
) |
Sets InputModeFadeType.
s | SwkbdInline object. |
type | Type |
void swkbdInlineSetInputText | ( | SwkbdInline * | s, |
const char * | str | ||
) |
Sets the current input text string.
Overrides the entire user input string if the user previously entered any text.
s | SwkbdInline object. |
str | UTF-8 input string. |
void swkbdInlineSetKeytopAsFloating | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets KeytopAsFloating.
s | SwkbdInline object. |
flag | Flag |
void swkbdInlineSetKeytopBgAlpha | ( | SwkbdInline * | s, |
float | alpha | ||
) |
Sets KeytopBgAlpha.
s | SwkbdInline object. |
alpha | Alpha, clamped to range 0.0f..1.0f. |
void swkbdInlineSetKeytopScale | ( | SwkbdInline * | s, |
float | scale | ||
) |
Sets gfx scaling.
Configures KeytopScale* and BalloonScale based on the input value.
s | SwkbdInline object. |
scale | Scale |
void swkbdInlineSetKeytopTranslate | ( | SwkbdInline * | s, |
float | x, | ||
float | y | ||
) |
Sets gfx translation for the displayed swkbd image position.
s | SwkbdInline object. |
x | X |
y | Y |
void swkbdInlineSetMovedCursorCallback | ( | SwkbdInline * | s, |
SwkbdMovedCursorCb | cb | ||
) |
Sets the MovedCursor callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | SwkbdMovedCursorCb Callback |
void swkbdInlineSetMovedCursorV2Callback | ( | SwkbdInline * | s, |
SwkbdMovedCursorV2Cb | cb | ||
) |
Sets the MovedCursorV2 callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | SwkbdMovedCursorV2Cb Callback |
void swkbdInlineSetMovedTabCallback | ( | SwkbdInline * | s, |
SwkbdMovedTabCb | cb | ||
) |
Sets the MovedTab callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | SwkbdMovedTabCb Callback |
void swkbdInlineSetReleasedUserWordInfoCallback | ( | SwkbdInline * | s, |
VoidFn | cb | ||
) |
Sets the ReleasedUserWordInfo callback, used by swkbdInlineUpdate.
The default is NULL for none.
s | SwkbdInline object. |
cb | Callback |
void swkbdInlineSetSeGroup | ( | SwkbdInline * | s, |
u8 | seGroup, | ||
bool | flag | ||
) |
Sets whether the specified SeGroup (sound effect) is enabled.
The default is enabled.
s | SwkbdInline object. |
seGroup | SeGroup |
flag | Flag |
void swkbdInlineSetTouchFlag | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets whether touch is enabled.
The default is enabled.
s | SwkbdInline object. |
flag | Flag |
Result swkbdInlineSetUserWordInfo | ( | SwkbdInline * | s, |
const SwkbdDictWord * | input, | ||
s32 | entries | ||
) |
Sets the UserWordInfo.
s | SwkbdInline object. |
input | Input data. |
entries | Total entries in the buffer. |
void swkbdInlineSetUtf8Mode | ( | SwkbdInline * | s, |
bool | flag | ||
) |
Sets the utf8Mode.
s | SwkbdInline object. |
flag | Flag |
void swkbdInlineSetVolume | ( | SwkbdInline * | s, |
float | volume | ||
) |
Sets the audio volume.
s | SwkbdInline object. |
volume | Volume |
Result swkbdInlineUnsetCustomizedDictionaries | ( | SwkbdInline * | s | ) |
Request UnsetCustomizedDictionaries.
s | SwkbdInline object. |
void swkbdInlineUnsetCustomizeDic | ( | SwkbdInline * | s | ) |
Request UnsetCustomizeDic.
s | SwkbdInline object. |
Result swkbdInlineUnsetUserWordInfo | ( | SwkbdInline * | s | ) |
Request UnsetUserWordInfo.
s | SwkbdInline object. |
Result swkbdInlineUpdate | ( | SwkbdInline * | s, |
SwkbdState * | out_state | ||
) |
Handles updating SwkbdInline state, this should be called periodically.
s | SwkbdInline object. |
out_state | Optional output SwkbdState. |
Result swkbdShow | ( | SwkbdConfig * | c, |
char * | out_string, | ||
size_t | out_string_size | ||
) |
Launch swkbd with the specified config.
This will return once swkbd is finished running.
c | SwkbdConfig struct. |
out_string | UTF-8 Output string buffer. |
out_string_size | UTF-8 Output string buffer size, including NUL-terminator. |