libnx  v4.8.0
Data Structures | Typedefs | Enumerations | Functions
swkbd.h File Reference

Wrapper for using the swkbd (software keyboard) LibraryApplet. More...

#include "../types.h"
#include "../services/applet.h"

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...
 

Functions

Result swkbdCreate (SwkbdConfig *c, s32 max_dictwords)
 Creates a SwkbdConfig struct. More...
 
void swkbdClose (SwkbdConfig *c)
 Closes a SwkbdConfig struct. More...
 
void swkbdConfigMakePresetDefault (SwkbdConfig *c)
 Clears the args in the SwkbdConfig struct and initializes it with the Default Preset. More...
 
void swkbdConfigMakePresetPassword (SwkbdConfig *c)
 Clears the args in the SwkbdConfig struct and initializes it with the Password Preset. More...
 
void swkbdConfigMakePresetUserName (SwkbdConfig *c)
 Clears the args in the SwkbdConfig struct and initializes it with the UserName Preset. More...
 
void swkbdConfigMakePresetDownloadCode (SwkbdConfig *c)
 Clears the args in the SwkbdConfig struct and initializes it with the DownloadCode Preset. More...
 
void swkbdConfigSetOkButtonText (SwkbdConfig *c, const char *str)
 Sets the Ok button text. More...
 
void swkbdConfigSetLeftOptionalSymbolKey (SwkbdConfig *c, const char *str)
 Sets the LeftOptionalSymbolKey, for SwkbdType_NumPad. More...
 
void swkbdConfigSetRightOptionalSymbolKey (SwkbdConfig *c, const char *str)
 Sets the RightOptionalSymbolKey, for SwkbdType_NumPad. More...
 
void swkbdConfigSetHeaderText (SwkbdConfig *c, const char *str)
 Sets the Header text. More...
 
void swkbdConfigSetSubText (SwkbdConfig *c, const char *str)
 Sets the Sub text. More...
 
void swkbdConfigSetGuideText (SwkbdConfig *c, const char *str)
 Sets the Guide text. More...
 
void swkbdConfigSetInitialText (SwkbdConfig *c, const char *str)
 Sets the Initial text. More...
 
void swkbdConfigSetDictionary (SwkbdConfig *c, const SwkbdDictWord *input, s32 entries)
 Sets the user dictionary. More...
 
Result swkbdConfigSetCustomizedDictionaries (SwkbdConfig *c, const SwkbdCustomizedDictionarySet *dic)
 Sets the CustomizedDictionaries. More...
 
void swkbdConfigSetTextCheckCallback (SwkbdConfig *c, SwkbdTextCheckCb cb)
 Sets the TextCheck callback. More...
 
static void swkbdConfigSetType (SwkbdConfig *c, SwkbdType type)
 Sets SwkbdArgCommon::SwkbdType. More...
 
static void swkbdConfigSetDicFlag (SwkbdConfig *c, u8 flag)
 Sets SwkbdArgCommon::dicFlag. More...
 
static void swkbdConfigSetKeySetDisableBitmask (SwkbdConfig *c, u32 keySetDisableBitmask)
 Sets SwkbdArgCommon::keySetDisableBitmask. More...
 
static void swkbdConfigSetInitialCursorPos (SwkbdConfig *c, u32 initialCursorPos)
 Sets SwkbdArgCommon::initialCursorPos. More...
 
static void swkbdConfigSetStringLenMax (SwkbdConfig *c, u32 stringLenMax)
 Sets SwkbdArgCommon::stringLenMax. More...
 
static void swkbdConfigSetStringLenMin (SwkbdConfig *c, u32 stringLenMin)
 Sets SwkbdArgCommon::stringLenMin. More...
 
static void swkbdConfigSetPasswordFlag (SwkbdConfig *c, u32 flag)
 Sets SwkbdArgCommon::passwordFlag. More...
 
static void swkbdConfigSetTextDrawType (SwkbdConfig *c, SwkbdTextDrawType textDrawType)
 Sets SwkbdArgCommon::textDrawType. More...
 
static void swkbdConfigSetReturnButtonFlag (SwkbdConfig *c, u16 flag)
 Sets SwkbdArgCommon::returnButtonFlag. More...
 
static void swkbdConfigSetBlurBackground (SwkbdConfig *c, u8 blurBackground)
 Sets SwkbdArgCommon::blurBackground. More...
 
static void swkbdConfigSetTextGrouping (SwkbdConfig *c, u32 index, u32 value)
 Sets SwkbdArgV7::textGrouping. More...
 
static void swkbdConfigSetUnkFlag (SwkbdConfig *c, u8 flag)
 Sets SwkbdConfig::unkFlag, default is 0. More...
 
static void swkbdConfigSetTrigger (SwkbdConfig *c, u8 trigger)
 Sets SwkbdConfig::trigger, default is 0. More...
 
Result swkbdShow (SwkbdConfig *c, char *out_string, size_t out_string_size)
 Launch swkbd with the specified config. More...
 
Result swkbdInlineCreate (SwkbdInline *s)
 Creates a SwkbdInline object. More...
 
Result swkbdInlineClose (SwkbdInline *s)
 Closes a SwkbdInline object. More...
 
Result swkbdInlineLaunch (SwkbdInline *s)
 Does setup for SwkbdInitializeArg and launches the applet with the SwkbdInline object. More...
 
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. More...
 
static void swkbdInlineGetWindowSize (s32 *width, s32 *height)
 GetWindowSize. More...
 
Result swkbdInlineGetImageMemoryRequirement (u64 *out_size, u64 *out_alignment)
 GetImageMemoryRequirement. More...
 
Result swkbdInlineGetImage (SwkbdInline *s, void *buffer, u64 size, bool *data_available)
 GetImage. More...
 
s32 swkbdInlineGetMaxHeight (SwkbdInline *s)
 Gets the image max height, relative to the bottom of the screen. More...
 
s32 swkbdInlineGetMiniaturizedHeight (SwkbdInline *s)
 Gets the MiniaturizedHeight, relative to the bottom of the screen. More...
 
s32 swkbdInlineGetTouchRectangles (SwkbdInline *s, SwkbdRect *keytop, SwkbdRect *footer)
 GetTouchRectangles. More...
 
bool swkbdInlineIsUsedTouchPointByKeyboard (SwkbdInline *s, s32 x, s32 y)
 Gets whether the input x/y are within the output from swkbdInlineGetTouchRectangles. More...
 
Result swkbdInlineUpdate (SwkbdInline *s, SwkbdState *out_state)
 Handles updating SwkbdInline state, this should be called periodically. More...
 
void swkbdInlineSetFinishedInitializeCallback (SwkbdInline *s, VoidFn cb)
 Sets the FinishedInitialize callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetDecidedCancelCallback (SwkbdInline *s, VoidFn cb)
 Sets the DecidedCancel callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetChangedStringCallback (SwkbdInline *s, SwkbdChangedStringCb cb)
 Sets the ChangedString callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetChangedStringV2Callback (SwkbdInline *s, SwkbdChangedStringV2Cb cb)
 Sets the ChangedStringV2 callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetMovedCursorCallback (SwkbdInline *s, SwkbdMovedCursorCb cb)
 Sets the MovedCursor callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetMovedCursorV2Callback (SwkbdInline *s, SwkbdMovedCursorV2Cb cb)
 Sets the MovedCursorV2 callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetMovedTabCallback (SwkbdInline *s, SwkbdMovedTabCb cb)
 Sets the MovedTab callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetDecidedEnterCallback (SwkbdInline *s, SwkbdDecidedEnterCb cb)
 Sets the DecidedEnter callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineSetReleasedUserWordInfoCallback (SwkbdInline *s, VoidFn cb)
 Sets the ReleasedUserWordInfo callback, used by swkbdInlineUpdate. More...
 
void swkbdInlineAppear (SwkbdInline *s, const SwkbdAppearArg *arg)
 Appear the kbd and set SwkbdAppearArg. More...
 
void swkbdInlineAppearEx (SwkbdInline *s, const SwkbdAppearArg *arg, u8 trigger)
 Appear the kbd and set SwkbdAppearArg. More...
 
void swkbdInlineDisappear (SwkbdInline *s)
 Disappear the kbd. More...
 
void swkbdInlineMakeAppearArg (SwkbdAppearArg *arg, SwkbdType type)
 Creates a SwkbdAppearArg which can then be passed to swkbdInlineAppear. More...
 
void swkbdInlineAppearArgSetOkButtonText (SwkbdAppearArg *arg, const char *str)
 Sets okButtonText for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg. More...
 
void swkbdInlineAppearArgSetLeftButtonText (SwkbdAppearArg *arg, const char *str)
 Sets the LeftButtonText, for SwkbdType_NumPad. More...
 
void swkbdInlineAppearArgSetRightButtonText (SwkbdAppearArg *arg, const char *str)
 Sets the RightButtonText, for SwkbdType_NumPad. More...
 
static void swkbdInlineAppearArgSetStringLenMax (SwkbdAppearArg *arg, s32 stringLenMax)
 Sets the stringLenMax for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg. More...
 
static void swkbdInlineAppearArgSetStringLenMin (SwkbdAppearArg *arg, s32 stringLenMin)
 Sets the stringLenMin for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg. More...
 
void swkbdInlineSetVolume (SwkbdInline *s, float volume)
 Sets the audio volume. More...
 
void swkbdInlineSetInputText (SwkbdInline *s, const char *str)
 Sets the current input text string. More...
 
void swkbdInlineSetCursorPos (SwkbdInline *s, s32 pos)
 Sets the cursor character position in the string. More...
 
Result swkbdInlineSetUserWordInfo (SwkbdInline *s, const SwkbdDictWord *input, s32 entries)
 Sets the UserWordInfo. More...
 
Result swkbdInlineUnsetUserWordInfo (SwkbdInline *s)
 Request UnsetUserWordInfo. More...
 
void swkbdInlineSetUtf8Mode (SwkbdInline *s, bool flag)
 Sets the utf8Mode. More...
 
Result swkbdInlineSetCustomizeDic (SwkbdInline *s, void *buffer, size_t size, SwkbdCustomizeDicInfo *info)
 Sets the CustomizeDic. More...
 
void swkbdInlineUnsetCustomizeDic (SwkbdInline *s)
 Request UnsetCustomizeDic. More...
 
Result swkbdInlineSetCustomizedDictionaries (SwkbdInline *s, const SwkbdCustomizedDictionarySet *dic)
 Sets the CustomizedDictionaries. More...
 
Result swkbdInlineUnsetCustomizedDictionaries (SwkbdInline *s)
 Request UnsetCustomizedDictionaries. More...
 
void swkbdInlineSetInputModeFadeType (SwkbdInline *s, u8 type)
 Sets InputModeFadeType. More...
 
void swkbdInlineSetAlphaEnabledInInputMode (SwkbdInline *s, bool flag)
 Sets AlphaEnabledInInputMode. More...
 
void swkbdInlineSetKeytopBgAlpha (SwkbdInline *s, float alpha)
 Sets KeytopBgAlpha. More...
 
void swkbdInlineSetFooterBgAlpha (SwkbdInline *s, float alpha)
 Sets FooterBgAlpha. More...
 
void swkbdInlineSetKeytopScale (SwkbdInline *s, float scale)
 Sets gfx scaling. More...
 
void swkbdInlineSetKeytopTranslate (SwkbdInline *s, float x, float y)
 Sets gfx translation for the displayed swkbd image position. More...
 
void swkbdInlineSetKeytopAsFloating (SwkbdInline *s, bool flag)
 Sets KeytopAsFloating. More...
 
void swkbdInlineSetFooterScalable (SwkbdInline *s, bool flag)
 Sets FooterScalable. More...
 
void swkbdInlineSetTouchFlag (SwkbdInline *s, bool flag)
 Sets whether touch is enabled. More...
 
void swkbdInlineSetHardwareKeyboardFlag (SwkbdInline *s, bool flag)
 Sets whether Hardware-keyboard is enabled. More...
 
void swkbdInlineSetDirectionalButtonAssignFlag (SwkbdInline *s, bool flag)
 Sets whether DirectionalButtonAssign is enabled. More...
 
void swkbdInlineSetSeGroup (SwkbdInline *s, u8 seGroup, bool flag)
 Sets whether the specified SeGroup (sound effect) is enabled. More...
 
void swkbdInlineSetBackspaceFlag (SwkbdInline *s, bool flag)
 Sets whether the backspace button is enabled. More...
 

Detailed Description

Wrapper for using the swkbd (software keyboard) LibraryApplet.

Author
yellows8

Typedef Documentation

◆ SwkbdChangedStringCb

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.

◆ SwkbdChangedStringV2Cb

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.

◆ SwkbdDecidedEnterCb

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.

◆ SwkbdMovedCursorCb

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.

◆ SwkbdMovedCursorV2Cb

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.

◆ SwkbdMovedTabCb

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.

Enumeration Type Documentation

◆ anonymous enum

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 '\'.

◆ 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.

◆ SwkbdState

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.

◆ SwkbdTextCheckResult

Output result returned by SwkbdTextCheckCb.

Enumerator
SwkbdTextCheckResult_OK 

Success, valid string.

SwkbdTextCheckResult_Bad 

Failure, invalid string. Error message is displayed in a message-box, pressing OK will return to swkbd again.

SwkbdTextCheckResult_Prompt 

Failure, invalid string. Error message is displayed in a message-box, pressing Cancel will return to swkbd again, while pressing OK will continue as if the text was valid.

SwkbdTextCheckResult_Silent 

Failure, invalid string. With value 3 and above, swkbd will silently not accept the string, without displaying any error.

◆ 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.

◆ SwkbdType

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.

Function Documentation

◆ swkbdClose()

void swkbdClose ( SwkbdConfig c)

Closes a SwkbdConfig struct.

Parameters
cSwkbdConfig struct.

◆ swkbdConfigMakePresetDefault()

void swkbdConfigMakePresetDefault ( SwkbdConfig c)

Clears the args in the SwkbdConfig struct and initializes it with the Default Preset.

Note
Do not use this before swkbdCreate.
Uses the following: swkbdConfigSetType() with SwkbdType_QWERTY, swkbdConfigSetInitialCursorPos() with value 1, swkbdConfigSetReturnButtonFlag() with value 1, and swkbdConfigSetBlurBackground() with value 1. Pre-5.0.0: swkbdConfigSetTextDrawType() with SwkbdTextDrawType_Box.
Parameters
cSwkbdConfig struct.

◆ swkbdConfigMakePresetDownloadCode()

void swkbdConfigMakePresetDownloadCode ( SwkbdConfig c)

Clears the args in the SwkbdConfig struct and initializes it with the DownloadCode Preset.

Note
Do not use this before swkbdCreate.
Uses the following: swkbdConfigSetType() with SwkbdType_Normal (SwkbdType_QWERTY on [5.0.0+]), swkbdConfigSetKeySetDisableBitmask() with SwkbdKeyDisableBitmask_DownloadCode, swkbdConfigSetInitialCursorPos() with value 1, and swkbdConfigSetBlurBackground() with value 1. [5.0.0+]: swkbdConfigSetStringLenMax() with value 16, swkbdConfigSetStringLenMin() with value 1, and swkbdConfigSetTextDrawType() with SwkbdTextDrawType_DownloadCode. Uses swkbdConfigSetTextGrouping() for [0-2] with: 0x3, 0x7, and 0xb.
Parameters
cSwkbdConfig struct.

◆ swkbdConfigMakePresetPassword()

void swkbdConfigMakePresetPassword ( SwkbdConfig c)

Clears the args in the SwkbdConfig struct and initializes it with the Password Preset.

Note
Do not use this before swkbdCreate.
Uses the following: swkbdConfigSetType() with SwkbdType_QWERTY, swkbdConfigSetInitialCursorPos() with value 1, swkbdConfigSetPasswordFlag() with value 1, and swkbdConfigSetBlurBackground() with value 1.
Parameters
cSwkbdConfig struct.

◆ swkbdConfigMakePresetUserName()

void swkbdConfigMakePresetUserName ( SwkbdConfig c)

Clears the args in the SwkbdConfig struct and initializes it with the UserName Preset.

Note
Do not use this before swkbdCreate.
Uses the following: swkbdConfigSetType() with SwkbdType_Normal, swkbdConfigSetKeySetDisableBitmask() with SwkbdKeyDisableBitmask_UserName, swkbdConfigSetInitialCursorPos() with value 1, and swkbdConfigSetBlurBackground() with value 1.
Parameters
cSwkbdConfig struct.

◆ swkbdConfigSetBlurBackground()

static void swkbdConfigSetBlurBackground ( SwkbdConfig c,
u8  blurBackground 
)
inlinestatic

Sets SwkbdArgCommon::blurBackground.

Parameters
cSwkbdConfig struct.
blurBackgroundblurBackground

◆ swkbdConfigSetCustomizedDictionaries()

Result swkbdConfigSetCustomizedDictionaries ( SwkbdConfig c,
const SwkbdCustomizedDictionarySet dic 
)

Sets the CustomizedDictionaries.

Note
Only available on [6.0.0+].
Parameters
cSwkbdConfig struct.
dicInput SwkbdCustomizedDictionarySet

◆ swkbdConfigSetDicFlag()

static void swkbdConfigSetDicFlag ( SwkbdConfig c,
u8  flag 
)
inlinestatic

Sets SwkbdArgCommon::dicFlag.

Parameters
cSwkbdConfig struct.
flagFlag

◆ swkbdConfigSetDictionary()

void swkbdConfigSetDictionary ( SwkbdConfig c,
const SwkbdDictWord input,
s32  entries 
)

Sets the user dictionary.

Parameters
cSwkbdConfig struct.
inputInput data.
entriesTotal entries in the buffer.

◆ swkbdConfigSetGuideText()

void swkbdConfigSetGuideText ( SwkbdConfig c,
const char *  str 
)

Sets the Guide text.

The default is "".

Note
The swkbd applet only displays this when the current displayed cursor position is 0.
Parameters
cSwkbdConfig struct.
strUTF-8 input string.

◆ swkbdConfigSetHeaderText()

void swkbdConfigSetHeaderText ( SwkbdConfig c,
const char *  str 
)

Sets the Header text.

The default is "".

Note
See SwkbdArgCommon::stringLenMax.
Parameters
cSwkbdConfig struct.
strUTF-8 input string.

◆ swkbdConfigSetInitialCursorPos()

static void swkbdConfigSetInitialCursorPos ( SwkbdConfig c,
u32  initialCursorPos 
)
inlinestatic

Sets SwkbdArgCommon::initialCursorPos.

Parameters
cSwkbdConfig struct.
initialCursorPosinitialCursorPos

◆ swkbdConfigSetInitialText()

void swkbdConfigSetInitialText ( SwkbdConfig c,
const char *  str 
)

Sets the Initial text.

The default is "".

Parameters
cSwkbdConfig struct.
strUTF-8 input string.

◆ swkbdConfigSetKeySetDisableBitmask()

static void swkbdConfigSetKeySetDisableBitmask ( SwkbdConfig c,
u32  keySetDisableBitmask 
)
inlinestatic

Sets SwkbdArgCommon::keySetDisableBitmask.

Parameters
cSwkbdConfig struct.
keySetDisableBitmaskkeySetDisableBitmask

◆ swkbdConfigSetLeftOptionalSymbolKey()

void swkbdConfigSetLeftOptionalSymbolKey ( SwkbdConfig c,
const char *  str 
)

Sets the LeftOptionalSymbolKey, for SwkbdType_NumPad.

The default is "".

Parameters
cSwkbdConfig struct.
strUTF-8 input string.

◆ swkbdConfigSetOkButtonText()

void swkbdConfigSetOkButtonText ( SwkbdConfig c,
const char *  str 
)

Sets the Ok button text.

The default is "".

Parameters
cSwkbdConfig struct.
strUTF-8 input string.

◆ swkbdConfigSetPasswordFlag()

static void swkbdConfigSetPasswordFlag ( SwkbdConfig c,
u32  flag 
)
inlinestatic

Sets SwkbdArgCommon::passwordFlag.

Parameters
cSwkbdConfig struct.
flagFlag

◆ swkbdConfigSetReturnButtonFlag()

static void swkbdConfigSetReturnButtonFlag ( SwkbdConfig c,
u16  flag 
)
inlinestatic

Sets SwkbdArgCommon::returnButtonFlag.

Parameters
cSwkbdConfig struct.
flagFlag

◆ swkbdConfigSetRightOptionalSymbolKey()

void swkbdConfigSetRightOptionalSymbolKey ( SwkbdConfig c,
const char *  str 
)

Sets the RightOptionalSymbolKey, for SwkbdType_NumPad.

The default is "".

Parameters
cSwkbdConfig struct.
strUTF-8 input string.

◆ swkbdConfigSetStringLenMax()

static void swkbdConfigSetStringLenMax ( SwkbdConfig c,
u32  stringLenMax 
)
inlinestatic

Sets SwkbdArgCommon::stringLenMax.

Parameters
cSwkbdConfig struct.
stringLenMaxstringLenMax

◆ swkbdConfigSetStringLenMin()

static void swkbdConfigSetStringLenMin ( SwkbdConfig c,
u32  stringLenMin 
)
inlinestatic

Sets SwkbdArgCommon::stringLenMin.

Parameters
cSwkbdConfig struct.
stringLenMinstringLenMin

◆ swkbdConfigSetSubText()

void swkbdConfigSetSubText ( SwkbdConfig c,
const char *  str 
)

Sets the Sub text.

The default is "".

Note
See SwkbdArgCommon::stringLenMax.
Parameters
cSwkbdConfig struct.
strUTF-8 input string.

◆ swkbdConfigSetTextCheckCallback()

void swkbdConfigSetTextCheckCallback ( SwkbdConfig c,
SwkbdTextCheckCb  cb 
)

Sets the TextCheck callback.

Parameters
cSwkbdConfig struct.
cbSwkbdTextCheckCb callback.

◆ swkbdConfigSetTextDrawType()

static void swkbdConfigSetTextDrawType ( SwkbdConfig c,
SwkbdTextDrawType  textDrawType 
)
inlinestatic

Sets SwkbdArgCommon::textDrawType.

Parameters
cSwkbdConfig struct.
textDrawTypeSwkbdTextDrawType

◆ swkbdConfigSetTextGrouping()

static void swkbdConfigSetTextGrouping ( SwkbdConfig c,
u32  index,
u32  value 
)
inlinestatic

Sets SwkbdArgV7::textGrouping.

Parameters
indexArray index.
valueValue to write.

◆ swkbdConfigSetTrigger()

static void swkbdConfigSetTrigger ( SwkbdConfig c,
u8  trigger 
)
inlinestatic

Sets SwkbdConfig::trigger, default is 0.

Copied to SwkbdArgVB::trigger with [8.0.0+].

Parameters
triggerTrigger

◆ swkbdConfigSetType()

static void swkbdConfigSetType ( SwkbdConfig c,
SwkbdType  type 
)
inlinestatic

Sets SwkbdArgCommon::SwkbdType.

Parameters
cSwkbdConfig struct.
typeSwkbdType

◆ swkbdConfigSetUnkFlag()

static void swkbdConfigSetUnkFlag ( SwkbdConfig c,
u8  flag 
)
inlinestatic

Sets SwkbdConfig::unkFlag, default is 0.

Copied to SwkbdArgVB::unkFlag with [8.0.0+].

Parameters
flagFlag

◆ swkbdCreate()

Result swkbdCreate ( SwkbdConfig c,
s32  max_dictwords 
)

Creates a SwkbdConfig struct.

Parameters
cSwkbdConfig struct.
max_dictwordsMax SwkbdDictWord entries, 0 for none.

◆ swkbdInlineAppear()

void swkbdInlineAppear ( SwkbdInline s,
const SwkbdAppearArg arg 
)

Appear the kbd and set SwkbdAppearArg.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Wrapper for swkbdInlineAppearEx, with trigger=0.
Parameters
sSwkbdInline object.
argInput SwkbdAppearArg.

◆ swkbdInlineAppearArgSetLeftButtonText()

void swkbdInlineAppearArgSetLeftButtonText ( SwkbdAppearArg arg,
const char *  str 
)

Sets the LeftButtonText, for SwkbdType_NumPad.

The default is "". Equivalent to swkbdConfigSetLeftOptionalSymbolKey.

Parameters
argSwkbdAppearArg, previously initialized by swkbdInlineMakeAppearArg.
strUTF-8 input string.

◆ swkbdInlineAppearArgSetOkButtonText()

void swkbdInlineAppearArgSetOkButtonText ( SwkbdAppearArg arg,
const char *  str 
)

Sets okButtonText for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg.

Parameters
argSwkbdAppearArg
strInput UTF-8 string for the Ok button text, this can be empty/NULL to use the default.

◆ swkbdInlineAppearArgSetRightButtonText()

void swkbdInlineAppearArgSetRightButtonText ( SwkbdAppearArg arg,
const char *  str 
)

Sets the RightButtonText, for SwkbdType_NumPad.

The default is "". Equivalent to swkbdConfigSetRightOptionalSymbolKey.

Parameters
argSwkbdAppearArg, previously initialized by swkbdInlineMakeAppearArg.
strUTF-8 input string.

◆ swkbdInlineAppearArgSetStringLenMax()

static void swkbdInlineAppearArgSetStringLenMax ( SwkbdAppearArg arg,
s32  stringLenMax 
)
inlinestatic

Sets the stringLenMax for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg.

Parameters
argSwkbdAppearArg
stringLenMaxMax string length

◆ swkbdInlineAppearArgSetStringLenMin()

static void swkbdInlineAppearArgSetStringLenMin ( SwkbdAppearArg arg,
s32  stringLenMin 
)
inlinestatic

Sets the stringLenMin for the specified SwkbdAppearArg, which was previously initialized with swkbdInlineMakeAppearArg.

Parameters
argSwkbdAppearArg
stringLenMinMin string length

◆ swkbdInlineAppearEx()

void swkbdInlineAppearEx ( SwkbdInline s,
const SwkbdAppearArg arg,
u8  trigger 
)

Appear the kbd and set SwkbdAppearArg.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
argInput SwkbdAppearArg.
triggerTrigger, default is 0. Requires [6.0.0+], on eariler versions this will always use value 0 internally.

◆ swkbdInlineClose()

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.

Parameters
sSwkbdInline object.

◆ swkbdInlineCreate()

Result swkbdInlineCreate ( SwkbdInline s)

Creates a SwkbdInline object.

Only available on [2.0.0+].

Note
This is essentially an asynchronous version of the regular swkbd.
This calls swkbdInlineSetUtf8Mode internally with flag=true.
Parameters
sSwkbdInline object.

◆ swkbdInlineDisappear()

void swkbdInlineDisappear ( SwkbdInline s)

Disappear the kbd.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.

◆ swkbdInlineGetImage()

Result swkbdInlineGetImage ( SwkbdInline s,
void *  buffer,
u64  size,
bool *  data_available 
)

GetImage.

Note
Only available with SwkbdInlineMode_UserDisplay.
For width/height, see swkbdInlineGetWindowSize.
Parameters
sSwkbdInline object.
[out]bufferOutput RGBA8 image buffer, this must use the alignment from swkbdInlineGetImageMemoryRequirement.
[in]sizeOutput buffer size, this must match the size from swkbdInlineGetImageMemoryRequirement.
[out]data_availableWhether data is available.

◆ swkbdInlineGetImageMemoryRequirement()

Result swkbdInlineGetImageMemoryRequirement ( u64 out_size,
u64 out_alignment 
)

GetImageMemoryRequirement.

Note
Wrapper for viGetIndirectLayerImageRequiredMemoryInfo.
Parameters
[out]out_sizeOutput size.
[out]out_alignmentOutput alignment.

◆ swkbdInlineGetMaxHeight()

s32 swkbdInlineGetMaxHeight ( SwkbdInline s)

Gets the image max height, relative to the bottom of the screen.

Parameters
sSwkbdInline object.

◆ swkbdInlineGetMiniaturizedHeight()

s32 swkbdInlineGetMiniaturizedHeight ( SwkbdInline s)

Gets the MiniaturizedHeight, relative to the bottom of the screen.

Parameters
sSwkbdInline object.

◆ swkbdInlineGetTouchRectangles()

s32 swkbdInlineGetTouchRectangles ( SwkbdInline s,
SwkbdRect keytop,
SwkbdRect footer 
)

GetTouchRectangles.

Returns number of valid Rects: 1 for only keytop, 2 for keytop/footer.

Parameters
sSwkbdInline object.
[out]keytopSwkbdRect for keytop. Optional, can be NULL.
[out]footerSwkbdRect for footer. Optional, can be NULL.

◆ swkbdInlineGetWindowSize()

static void swkbdInlineGetWindowSize ( s32 width,
s32 height 
)
inlinestatic

GetWindowSize.

Parameters
[out]widthOutput width.
[out]heightOutput height.

◆ swkbdInlineIsUsedTouchPointByKeyboard()

bool swkbdInlineIsUsedTouchPointByKeyboard ( SwkbdInline s,
s32  x,
s32  y 
)

Gets whether the input x/y are within the output from swkbdInlineGetTouchRectangles.

Parameters
sSwkbdInline object.
[out]xX
[out]yY

◆ swkbdInlineLaunch()

Result swkbdInlineLaunch ( SwkbdInline s)

Does setup for SwkbdInitializeArg and launches the applet with the SwkbdInline object.

Note
The initArg is cleared, and on [5.0.0+] unk_x5 is set to 1.
Parameters
sSwkbdInline object.

◆ swkbdInlineLaunchForLibraryApplet()

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.

Parameters
sSwkbdInline object.
modeValue for SwkbdInitializeArg::mode.
unk_x5Value for SwkbdInitializeArg::unk_x5.

◆ swkbdInlineMakeAppearArg()

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.

Parameters
argOutput SwkbdAppearArg.
typeSwkbdType type

◆ swkbdInlineSetAlphaEnabledInInputMode()

void swkbdInlineSetAlphaEnabledInInputMode ( SwkbdInline s,
bool  flag 
)

Sets AlphaEnabledInInputMode.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetBackspaceFlag()

void swkbdInlineSetBackspaceFlag ( SwkbdInline s,
bool  flag 
)

Sets whether the backspace button is enabled.

The default is enabled.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Only available on [5.0.0+].
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetChangedStringCallback()

void swkbdInlineSetChangedStringCallback ( SwkbdInline s,
SwkbdChangedStringCb  cb 
)

Sets the ChangedString callback, used by swkbdInlineUpdate.

The default is NULL for none.

Note
This clears the callback set by swkbdInlineSetChangedStringV2Callback.
This should be called after swkbdInlineLaunch / swkbdInlineLaunchForLibraryApplet.
Parameters
sSwkbdInline object.
cbSwkbdChangedStringCb Callback

◆ swkbdInlineSetChangedStringV2Callback()

void swkbdInlineSetChangedStringV2Callback ( SwkbdInline s,
SwkbdChangedStringV2Cb  cb 
)

Sets the ChangedStringV2 callback, used by swkbdInlineUpdate.

The default is NULL for none.

Note
Only available with [8.0.0+].
This must be called after swkbdInlineLaunch / swkbdInlineLaunchForLibraryApplet.
Parameters
sSwkbdInline object.
cbSwkbdChangedStringV2Cb Callback

◆ swkbdInlineSetCursorPos()

void swkbdInlineSetCursorPos ( SwkbdInline s,
s32  pos 
)

Sets the cursor character position in the string.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
posPosition

◆ swkbdInlineSetCustomizedDictionaries()

Result swkbdInlineSetCustomizedDictionaries ( SwkbdInline s,
const SwkbdCustomizedDictionarySet dic 
)

Sets the CustomizedDictionaries.

Note
Not available when SwkbdState is above SwkbdState_Initialized. Can't be used if this or swkbdInlineSetCustomizeDic was already used previously.
The specified buffer in dic must not be used after this, until swkbdInlineClose is used. However, it will also become available once swkbdInlineUpdate handles SwkbdReplyType_UnsetCustomizedDictionaries internally.
Only available on [6.0.0+].
Parameters
sSwkbdInline object.
dicInput SwkbdCustomizedDictionarySet

◆ swkbdInlineSetCustomizeDic()

Result swkbdInlineSetCustomizeDic ( SwkbdInline s,
void *  buffer,
size_t  size,
SwkbdCustomizeDicInfo info 
)

Sets the CustomizeDic.

Note
Not available when SwkbdState is above SwkbdState_Initialized. Can't be used if this or swkbdInlineSetCustomizedDictionaries was already used previously.
The specified buffer must not be used after this, until swkbdInlineClose is used. However, it will also become available once swkbdInlineUpdate handles SwkbdReplyType_UnsetCustomizeDic internally.
Parameters
sSwkbdInline object.
buffer0x1000-byte aligned buffer.
size0x1000-byte aligned buffer size.
infoInput SwkbdCustomizeDicInfo

◆ swkbdInlineSetDecidedCancelCallback()

void swkbdInlineSetDecidedCancelCallback ( SwkbdInline s,
VoidFn  cb 
)

Sets the DecidedCancel callback, used by swkbdInlineUpdate.

The default is NULL for none.

Parameters
sSwkbdInline object.
cbCallback

◆ swkbdInlineSetDecidedEnterCallback()

void swkbdInlineSetDecidedEnterCallback ( SwkbdInline s,
SwkbdDecidedEnterCb  cb 
)

Sets the DecidedEnter callback, used by swkbdInlineUpdate.

The default is NULL for none.

Parameters
sSwkbdInline object.
cbSwkbdDecidedEnterCb Callback

◆ swkbdInlineSetDirectionalButtonAssignFlag()

void swkbdInlineSetDirectionalButtonAssignFlag ( SwkbdInline s,
bool  flag 
)

Sets whether DirectionalButtonAssign is enabled.

The default is disabled.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Only available on [4.0.0+].
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetFinishedInitializeCallback()

void swkbdInlineSetFinishedInitializeCallback ( SwkbdInline s,
VoidFn  cb 
)

Sets the FinishedInitialize callback, used by swkbdInlineUpdate.

The default is NULL for none.

Parameters
sSwkbdInline object.
cbCallback

◆ swkbdInlineSetFooterBgAlpha()

void swkbdInlineSetFooterBgAlpha ( SwkbdInline s,
float  alpha 
)

Sets FooterBgAlpha.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
alphaAlpha, clamped to range 0.0f..1.0f.

◆ swkbdInlineSetFooterScalable()

void swkbdInlineSetFooterScalable ( SwkbdInline s,
bool  flag 
)

Sets FooterScalable.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetHardwareKeyboardFlag()

void swkbdInlineSetHardwareKeyboardFlag ( SwkbdInline s,
bool  flag 
)

Sets whether Hardware-keyboard is enabled.

The default is enabled.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetInputModeFadeType()

void swkbdInlineSetInputModeFadeType ( SwkbdInline s,
u8  type 
)

Sets InputModeFadeType.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
typeType

◆ swkbdInlineSetInputText()

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.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
This will not affect the cursor position, see swkbdInlineSetCursorPos for that.
Parameters
sSwkbdInline object.
strUTF-8 input string.

◆ swkbdInlineSetKeytopAsFloating()

void swkbdInlineSetKeytopAsFloating ( SwkbdInline s,
bool  flag 
)

Sets KeytopAsFloating.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Not available when SwkbdState is above SwkbdState_Initialized.
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetKeytopBgAlpha()

void swkbdInlineSetKeytopBgAlpha ( SwkbdInline s,
float  alpha 
)

Sets KeytopBgAlpha.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
alphaAlpha, clamped to range 0.0f..1.0f.

◆ swkbdInlineSetKeytopScale()

void swkbdInlineSetKeytopScale ( SwkbdInline s,
float  scale 
)

Sets gfx scaling.

Configures KeytopScale* and BalloonScale based on the input value.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
The BalloonScale is not updated when SwkbdState is above SwkbdState_Initialized.
Parameters
sSwkbdInline object.
scaleScale

◆ swkbdInlineSetKeytopTranslate()

void swkbdInlineSetKeytopTranslate ( SwkbdInline s,
float  x,
float  y 
)

Sets gfx translation for the displayed swkbd image position.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
xX
yY

◆ swkbdInlineSetMovedCursorCallback()

void swkbdInlineSetMovedCursorCallback ( SwkbdInline s,
SwkbdMovedCursorCb  cb 
)

Sets the MovedCursor callback, used by swkbdInlineUpdate.

The default is NULL for none.

Note
This clears the callback set by swkbdInlineSetMovedCursorV2Callback.
This should be called after swkbdInlineLaunch / swkbdInlineLaunchForLibraryApplet.
Parameters
sSwkbdInline object.
cbSwkbdMovedCursorCb Callback

◆ swkbdInlineSetMovedCursorV2Callback()

void swkbdInlineSetMovedCursorV2Callback ( SwkbdInline s,
SwkbdMovedCursorV2Cb  cb 
)

Sets the MovedCursorV2 callback, used by swkbdInlineUpdate.

The default is NULL for none.

Note
Only available with [8.0.0+].
This must be called after swkbdInlineLaunch / swkbdInlineLaunchForLibraryApplet.
Parameters
sSwkbdInline object.
cbSwkbdMovedCursorV2Cb Callback

◆ swkbdInlineSetMovedTabCallback()

void swkbdInlineSetMovedTabCallback ( SwkbdInline s,
SwkbdMovedTabCb  cb 
)

Sets the MovedTab callback, used by swkbdInlineUpdate.

The default is NULL for none.

Parameters
sSwkbdInline object.
cbSwkbdMovedTabCb Callback

◆ swkbdInlineSetReleasedUserWordInfoCallback()

void swkbdInlineSetReleasedUserWordInfoCallback ( SwkbdInline s,
VoidFn  cb 
)

Sets the ReleasedUserWordInfo callback, used by swkbdInlineUpdate.

The default is NULL for none.

Parameters
sSwkbdInline object.
cbCallback

◆ swkbdInlineSetSeGroup()

void swkbdInlineSetSeGroup ( SwkbdInline s,
u8  seGroup,
bool  flag 
)

Sets whether the specified SeGroup (sound effect) is enabled.

The default is enabled.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect. If called again with a different seGroup, swkbdInlineUpdate must be called prior to calling this again.
Only available on [5.0.0+].
Parameters
sSwkbdInline object.
seGroupSeGroup
flagFlag

◆ swkbdInlineSetTouchFlag()

void swkbdInlineSetTouchFlag ( SwkbdInline s,
bool  flag 
)

Sets whether touch is enabled.

The default is enabled.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetUserWordInfo()

Result swkbdInlineSetUserWordInfo ( SwkbdInline s,
const SwkbdDictWord input,
s32  entries 
)

Sets the UserWordInfo.

Note
Not available when SwkbdState is above SwkbdState_Initialized. Can't be used if this was already used previously.
The specified buffer must not be used after this, until swkbdInlineClose is used.
swkbdInlineUpdate must be called at some point afterwards.
If input==NULL or total_entries==0, this will just call swkbdInlineUnsetUserWordInfo internally.
Parameters
sSwkbdInline object.
inputInput data.
entriesTotal entries in the buffer.

◆ swkbdInlineSetUtf8Mode()

void swkbdInlineSetUtf8Mode ( SwkbdInline s,
bool  flag 
)

Sets the utf8Mode.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Automatically used internally by swkbdInlineCreate.
Parameters
sSwkbdInline object.
flagFlag

◆ swkbdInlineSetVolume()

void swkbdInlineSetVolume ( SwkbdInline s,
float  volume 
)

Sets the audio volume.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Parameters
sSwkbdInline object.
volumeVolume

◆ swkbdInlineUnsetCustomizedDictionaries()

Result swkbdInlineUnsetCustomizedDictionaries ( SwkbdInline s)

Request UnsetCustomizedDictionaries.

Note
Not available when SwkbdState is above SwkbdState_Initialized.
Only available on [6.0.0+].
Parameters
sSwkbdInline object.

◆ swkbdInlineUnsetCustomizeDic()

void swkbdInlineUnsetCustomizeDic ( SwkbdInline s)

Request UnsetCustomizeDic.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Not available when SwkbdState is above SwkbdState_Initialized.
Parameters
sSwkbdInline object.

◆ swkbdInlineUnsetUserWordInfo()

Result swkbdInlineUnsetUserWordInfo ( SwkbdInline s)

Request UnsetUserWordInfo.

Note
swkbdInlineUpdate must be called at some point afterwards for this to take affect.
Not available when SwkbdState is above SwkbdState_Initialized.
Parameters
sSwkbdInline object.

◆ swkbdInlineUpdate()

Result swkbdInlineUpdate ( SwkbdInline s,
SwkbdState out_state 
)

Handles updating SwkbdInline state, this should be called periodically.

Note
Handles applet exit if needed, and also sends the SwkbdInlineCalcArg to the applet if needed. Hence, this should be called at some point after writing to SwkbdInlineCalcArg.
Handles applet Interactive storage output when needed.
Parameters
sSwkbdInline object.
out_stateOptional output SwkbdState.

◆ swkbdShow()

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.

Note
The string buffer is also used for the buffer passed to the SwkbdTextCheckCb, when it's set. Hence, in that case this buffer should be large enough to handle TextCheck string input/output. The size passed to the callback is the same size passed here, -1.
Parameters
cSwkbdConfig struct.
out_stringUTF-8 Output string buffer.
out_string_sizeUTF-8 Output string buffer size, including NUL-terminator.