9 #include "../services/applet.h"
54 SwkbdRequestCommand_Finalize = 0x4,
55 SwkbdRequestCommand_SetUserWordInfo = 0x6,
56 SwkbdRequestCommand_SetCustomizeDic = 0x7,
57 SwkbdRequestCommand_Calc = 0xA,
58 SwkbdRequestCommand_SetCustomizedDictionaries = 0xB,
59 SwkbdRequestCommand_UnsetCustomizedDictionaries = 0xC,
60 SwkbdRequestCommand_SetChangedStringV2Flag = 0xD,
61 SwkbdRequestCommand_SetMovedCursorV2Flag = 0xE,
66 SwkbdReplyType_FinishedInitialize = 0x0,
67 SwkbdReplyType_ChangedString = 0x2,
68 SwkbdReplyType_MovedCursor = 0x3,
69 SwkbdReplyType_MovedTab = 0x4,
70 SwkbdReplyType_DecidedEnter = 0x5,
71 SwkbdReplyType_DecidedCancel = 0x6,
72 SwkbdReplyType_ChangedStringUtf8 = 0x7,
73 SwkbdReplyType_MovedCursorUtf8 = 0x8,
74 SwkbdReplyType_DecidedEnterUtf8 = 0x9,
75 SwkbdReplyType_UnsetCustomizeDic = 0xA,
76 SwkbdReplyType_ReleasedUserWordInfo = 0xB,
77 SwkbdReplyType_UnsetCustomizedDictionaries = 0xC,
78 SwkbdReplyType_ChangedStringV2 = 0xD,
79 SwkbdReplyType_MovedCursorV2 = 0xE,
80 SwkbdReplyType_ChangedStringUtf8V2 = 0xF,
81 SwkbdReplyType_MovedCursorUtf8V2 = 0x10,
91 SwkbdState_Unknown5 = 0x5,
92 SwkbdState_Unknown6 = 0x6,
124 u16 okButtonText[18/2];
131 u16 headerText[130/2];
133 u16 guideText[514/2];
142 u32 initialStringOffset;
143 u32 initialStringSize;
318 bool directionalButtonAssignFlag;
321 bool dicCustomInitialized;
322 bool customizedDictionariesInitialized;
325 bool wordInfoInitialized;
328 u8* interactive_tmpbuf;
329 size_t interactive_tmpbuf_size;
330 char* interactive_strbuf;
331 size_t interactive_strbuf_size;
333 VoidFn finishedInitializeCb;
341 VoidFn releasedUserWordInfoCb;
470 c->arg.arg.arg.
type = type;
577 c->trigger = trigger;
LibraryApplet state.
Definition: applet.h:241
applet IStorage
Definition: applet.h:235
u8 returnButtonFlag
Controls whether the Return button is enabled, for newlines input. 0 = disabled, non-zero = enabled.
Definition: swkbd.h:215
u8 unk_x29
[10.0.0+] When value 1-2, swkbdInlineAppear / swkbdInlineAppearEx will set keytopAsFloating=0 and foo...
Definition: swkbd.h:216
s32 stringLenMin
When non-negative and non-zero, specifies the min string length. When the input is too short,...
Definition: swkbd.h:214
SwkbdType type
See SwkbdType.
Definition: swkbd.h:206
u8 dicFlag
Enables dictionary usage when non-zero (including the system dictionary).
Definition: swkbd.h:210
u32 keySetDisableBitmask
See SwkbdKeyDisableBitmask_*.
Definition: swkbd.h:212
s32 stringLenMax
When non-negative and non-zero, specifies the max string length. When the input is too long,...
Definition: swkbd.h:213
u32 flags
Bitmask 0x4: unknown.
Definition: swkbd.h:219
Base swkbd arg struct.
Definition: swkbd.h:122
u16 returnButtonFlag
Controls whether the Return button is enabled, for newlines input. 0 = disabled, non-zero = enabled.
Definition: swkbd.h:139
u32 passwordFlag
Use password: 0 = disable, 1 = enable.
Definition: swkbd.h:137
u32 keySetDisableBitmask
See SwkbdKeyDisableBitmask_*.
Definition: swkbd.h:129
SwkbdType type
See SwkbdType.
Definition: swkbd.h:123
u32 stringLenMin
When non-zero, specifies the min string length. When the input is too short, swkbd will display an ic...
Definition: swkbd.h:136
u8 dicFlag
Enables dictionary usage when non-zero (including the system dictionary).
Definition: swkbd.h:127
u32 initialCursorPos
Initial cursor position in the string: 0 = start, 1 = end.
Definition: swkbd.h:130
u8 blurBackground
When enabled with value 1, the background is blurred.
Definition: swkbd.h:140
u32 stringLenMax
When non-zero, specifies the max string length. When the input is too long, swkbd will stop accepting...
Definition: swkbd.h:135
SwkbdTextDrawType textDrawType
See SwkbdTextDrawType.
Definition: swkbd.h:138
SwkbdTextCheckCb textCheckCb
This really doesn't belong in a struct sent to another process, but official sw does this.
Definition: swkbd.h:152
Arg struct for version 0x30007+.
Definition: swkbd.h:156
u32 textGrouping[8]
When set and enabled via SwkbdTextDrawType, controls displayed text grouping (inserts spaces,...
Definition: swkbd.h:158
Arg struct for version 0x6000B+.
Definition: swkbd.h:162
u8 total_entries
This is SwkbdCustomizedDictionarySet::total_entries.
Definition: swkbd.h:167
u8 trigger
[8.0.0+]
Definition: swkbd.h:170
u8 unkFlag
[8.0.0+]
Definition: swkbd.h:168
Struct data for SwkbdInline Interactive reply storage ChangedString*, at the end following the string...
Definition: swkbd.h:265
s32 dicStartCursorPos
Starting cursorPos for the current dictionary word in the current text string. -1 for none.
Definition: swkbd.h:267
s32 cursorPos
Cursor position.
Definition: swkbd.h:269
s32 dicEndCursorPos
Ending cursorPos for the current dictionary word in the current text string. -1 for none.
Definition: swkbd.h:268
u32 stringLen
String length in characters, without NUL-terminator.
Definition: swkbd.h:266
Input data for SwkbdInline request SetCustomizeDic.
Definition: swkbd.h:110
void * buffer
0x1000-byte aligned buffer.
Definition: swkbd.h:115
u32 buffer_size
0x1000-byte aligned buffer size.
Definition: swkbd.h:116
Struct data for SwkbdInline Interactive reply storage DecidedEnter*, at the end following the string.
Definition: swkbd.h:285
u32 stringLen
String length in characters, without NUL-terminator.
Definition: swkbd.h:286
User dictionary word.
Definition: swkbd.h:105
InitializeArg for SwkbdInline.
Definition: swkbd.h:198
u8 mode
See SwkbdInlineMode. (u8 bool)
Definition: swkbd.h:200
u8 unk_x5
Only set on [5.0.0+].
Definition: swkbd.h:201
u8 footerScalable
Flags bitmask 0x100.
Definition: swkbd.h:240
u8 trigger
[6.0.0+] Trigger
Definition: swkbd.h:260
float keytopScaleY
Flags bitmask 0x200.
Definition: swkbd.h:250
u8 alphaEnabledInInputMode
Flags bitmask 0x100.
Definition: swkbd.h:241
float keytopScaleX
Flags bitmask 0x200.
Definition: swkbd.h:249
u16 size
Size of this struct.
Definition: swkbd.h:226
float keytopTranslateX
Flags bitmask 0x200.
Definition: swkbd.h:251
u8 seGroup
Flags bitmask: enable=0x2000, disable=0x4000. Only available with [5.0.0+].
Definition: swkbd.h:258
float balloonScale
Flags bitmask 0x200.
Definition: swkbd.h:255
u8 triggerFlag
[6.0.0+] Enables using the trigger field when set.
Definition: swkbd.h:259
u8 utf8Mode
Flags bitmask 0x20.
Definition: swkbd.h:235
u8 enableBackspace
Flags bitmask 0x8000. Only available with [5.0.0+].
Definition: swkbd.h:237
SwkbdInitializeArg initArg
Flags bitmask 0x1.
Definition: swkbd.h:230
float footerBgAlpha
Flags bitmask 0x100.
Definition: swkbd.h:254
u8 inputModeFadeType
Flags bitmask 0x100.
Definition: swkbd.h:242
float keytopBgAlpha
Flags bitmask 0x100.
Definition: swkbd.h:253
u8 disableHardwareKeyboard
Flags bitmask 0x800.
Definition: swkbd.h:244
float keytopTranslateY
Flags bitmask 0x200.
Definition: swkbd.h:252
u8 disableTouch
Flags bitmask 0x200.
Definition: swkbd.h:243
u8 keytopAsFloating
Flags bitmask 0x200.
Definition: swkbd.h:239
float volume
Flags bitmask 0x2.
Definition: swkbd.h:231
s32 cursorPos
Flags bitmask 0x10.
Definition: swkbd.h:232
InlineKeyboard.
Definition: swkbd.h:314
Struct data for SwkbdInline Interactive reply storage MovedCursor*, at the end following the string.
Definition: swkbd.h:273
u32 stringLen
String length in characters, without NUL-terminator.
Definition: swkbd.h:274
s32 cursorPos
Cursor position.
Definition: swkbd.h:275
Struct data for SwkbdInline Interactive reply storage MovedTab*, at the end following the string.
Definition: swkbd.h:279
Rect.
Definition: swkbd.h:190
s16 y
Y.
Definition: swkbd.h:192
s16 x
X.
Definition: swkbd.h:191
s16 width
Width.
Definition: swkbd.h:193
s16 height
Height.
Definition: swkbd.h:194
@ SwkbdKeyDisableBitmask_Percent
Disable ''.
Definition: swkbd.h:37
@ SwkbdKeyDisableBitmask_Space
Disable space-bar.
Definition: swkbd.h:35
@ SwkbdKeyDisableBitmask_Numbers
Disable numbers.
Definition: swkbd.h:40
@ SwkbdKeyDisableBitmask_At
Disable '@'.
Definition: swkbd.h:36
@ SwkbdKeyDisableBitmask_DownloadCode
Used for swkbdConfigMakePresetDownloadCode.
Definition: swkbd.h:41
@ SwkbdKeyDisableBitmask_UserName
Used for swkbdConfigMakePresetUserName. Disables '@', '', and '\'.
Definition: swkbd.h:42
@ SwkbdKeyDisableBitmask_ForwardSlash
Disable '/'.
Definition: swkbd.h:38
@ SwkbdKeyDisableBitmask_Backslash
Disable '\'.
Definition: swkbd.h:39
void swkbdInlineSetBackspaceFlag(SwkbdInline *s, bool flag)
Sets whether the backspace button is enabled.
void swkbdConfigMakePresetDefault(SwkbdConfig *c)
Clears the args in the SwkbdConfig struct and initializes it with the Default Preset.
void swkbdInlineAppearEx(SwkbdInline *s, const SwkbdAppearArg *arg, u8 trigger)
Appear the kbd and set SwkbdAppearArg.
void(* SwkbdChangedStringCb)(const char *str, SwkbdChangedStringArg *arg)
This callback is used by swkbdInlineUpdate when handling ChangedString* replies (text changed by the ...
Definition: swkbd.h:291
void swkbdConfigSetTextCheckCallback(SwkbdConfig *c, SwkbdTextCheckCb cb)
Sets the TextCheck callback.
void swkbdConfigSetRightOptionalSymbolKey(SwkbdConfig *c, const char *str)
Sets the RightOptionalSymbolKey, for SwkbdType_NumPad.
void swkbdInlineSetVolume(SwkbdInline *s, float volume)
Sets the audio volume.
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.
Result swkbdCreate(SwkbdConfig *c, s32 max_dictwords)
Creates a SwkbdConfig struct.
void swkbdInlineSetHardwareKeyboardFlag(SwkbdInline *s, bool flag)
Sets whether Hardware-keyboard is enabled.
Result swkbdConfigSetCustomizedDictionaries(SwkbdConfig *c, const SwkbdCustomizedDictionarySet *dic)
Sets the CustomizedDictionaries.
void swkbdInlineSetChangedStringV2Callback(SwkbdInline *s, SwkbdChangedStringV2Cb cb)
Sets the ChangedStringV2 callback, used by swkbdInlineUpdate.
static void swkbdConfigSetTextGrouping(SwkbdConfig *c, u32 index, u32 value)
Sets SwkbdArgV7::textGrouping.
Definition: swkbd.h:559
void swkbdInlineSetCursorPos(SwkbdInline *s, s32 pos)
Sets the cursor character position in the string.
static void swkbdConfigSetType(SwkbdConfig *c, SwkbdType type)
Sets SwkbdArgCommon::SwkbdType.
Definition: swkbd.h:469
static void swkbdConfigSetReturnButtonFlag(SwkbdConfig *c, u16 flag)
Sets SwkbdArgCommon::returnButtonFlag.
Definition: swkbd.h:541
void swkbdInlineSetKeytopScale(SwkbdInline *s, float scale)
Sets gfx scaling.
void swkbdInlineDisappear(SwkbdInline *s)
Disappear the kbd.
void swkbdInlineSetMovedCursorV2Callback(SwkbdInline *s, SwkbdMovedCursorV2Cb cb)
Sets the MovedCursorV2 callback, used by swkbdInlineUpdate.
static void swkbdConfigSetTrigger(SwkbdConfig *c, u8 trigger)
Sets SwkbdConfig::trigger, default is 0.
Definition: swkbd.h:576
SwkbdTextDrawType
Value for SwkbdArgCommon::textDrawType. Only applies when stringLenMax is 1..32, otherwise swkbd will...
Definition: swkbd.h:46
@ SwkbdTextDrawType_Line
The text will be displayed on a line. Also enables displaying the Header and Sub text.
Definition: swkbd.h:47
@ SwkbdTextDrawType_DownloadCode
Used by swkbdConfigMakePresetDownloadCode on [5.0.0+]. Enables using SwkbdArgV7 unk_x3e0.
Definition: swkbd.h:49
@ SwkbdTextDrawType_Box
The text will be displayed in a box.
Definition: swkbd.h:48
void swkbdInlineSetReleasedUserWordInfoCallback(SwkbdInline *s, VoidFn cb)
Sets the ReleasedUserWordInfo callback, used by swkbdInlineUpdate.
Result swkbdShow(SwkbdConfig *c, char *out_string, size_t out_string_size)
Launch swkbd with the specified config.
void swkbdInlineMakeAppearArg(SwkbdAppearArg *arg, SwkbdType type)
Creates a SwkbdAppearArg which can then be passed to swkbdInlineAppear.
void swkbdInlineSetFooterScalable(SwkbdInline *s, bool flag)
Sets FooterScalable.
void(* SwkbdMovedCursorCb)(const char *str, SwkbdMovedCursorArg *arg)
This callback is used by swkbdInlineUpdate when handling MovedCursor* replies.
Definition: swkbd.h:299
static void swkbdConfigSetBlurBackground(SwkbdConfig *c, u8 blurBackground)
Sets SwkbdArgCommon::blurBackground.
Definition: swkbd.h:550
void swkbdConfigMakePresetPassword(SwkbdConfig *c)
Clears the args in the SwkbdConfig struct and initializes it with the Password Preset.
void swkbdInlineSetMovedCursorCallback(SwkbdInline *s, SwkbdMovedCursorCb cb)
Sets the MovedCursor callback, used by swkbdInlineUpdate.
static void swkbdInlineAppearArgSetStringLenMin(SwkbdAppearArg *arg, s32 stringLenMin)
Sets the stringLenMin for the specified SwkbdAppearArg, which was previously initialized with swkbdIn...
Definition: swkbd.h:822
Result swkbdInlineSetCustomizeDic(SwkbdInline *s, void *buffer, size_t size, SwkbdCustomizeDicInfo *info)
Sets the CustomizeDic.
void swkbdInlineAppearArgSetLeftButtonText(SwkbdAppearArg *arg, const char *str)
Sets the LeftButtonText, for SwkbdType_NumPad.
Result swkbdInlineSetCustomizedDictionaries(SwkbdInline *s, const SwkbdCustomizedDictionarySet *dic)
Sets the CustomizedDictionaries.
Result swkbdInlineUnsetUserWordInfo(SwkbdInline *s)
Request UnsetUserWordInfo.
void swkbdInlineSetTouchFlag(SwkbdInline *s, bool flag)
Sets whether touch is enabled.
void swkbdInlineUnsetCustomizeDic(SwkbdInline *s)
Request UnsetCustomizeDic.
void swkbdInlineSetInputModeFadeType(SwkbdInline *s, u8 type)
Sets InputModeFadeType.
void(* SwkbdMovedCursorV2Cb)(const char *str, SwkbdMovedCursorArg *arg, bool flag)
This callback is used by swkbdInlineUpdate when handling MovedCursor*V2 replies.
Definition: swkbd.h:303
Result swkbdInlineGetImageMemoryRequirement(u64 *out_size, u64 *out_alignment)
GetImageMemoryRequirement.
static void swkbdConfigSetTextDrawType(SwkbdConfig *c, SwkbdTextDrawType textDrawType)
Sets SwkbdArgCommon::textDrawType.
Definition: swkbd.h:532
s32 swkbdInlineGetMaxHeight(SwkbdInline *s)
Gets the image max height, relative to the bottom of the screen.
static void swkbdConfigSetPasswordFlag(SwkbdConfig *c, u32 flag)
Sets SwkbdArgCommon::passwordFlag.
Definition: swkbd.h:523
void swkbdConfigMakePresetUserName(SwkbdConfig *c)
Clears the args in the SwkbdConfig struct and initializes it with the UserName Preset.
SwkbdState
SwkbdInline State.
Definition: swkbd.h:85
@ SwkbdState_Disappearing
The user pressed the ok or cancel button, causing the applet to disappear.
Definition: swkbd.h:90
@ SwkbdState_Appearing
Applet is appearing.
Definition: swkbd.h:88
@ SwkbdState_Initialized
Applet is initialized but hidden.
Definition: swkbd.h:87
@ SwkbdState_Shown
Applet is fully shown and ready to accept text input.
Definition: swkbd.h:89
@ SwkbdState_Inactive
Default state from swkbdInlineCreate, before a state is set by swkbdInlineUpdate when a reply is rece...
Definition: swkbd.h:86
void swkbdConfigSetSubText(SwkbdConfig *c, const char *str)
Sets the Sub text.
void swkbdConfigSetGuideText(SwkbdConfig *c, const char *str)
Sets the Guide text.
Result swkbdInlineGetImage(SwkbdInline *s, void *buffer, u64 size, bool *data_available)
GetImage.
Result swkbdInlineSetUserWordInfo(SwkbdInline *s, const SwkbdDictWord *input, s32 entries)
Sets the UserWordInfo.
void swkbdInlineSetMovedTabCallback(SwkbdInline *s, SwkbdMovedTabCb cb)
Sets the MovedTab callback, used by swkbdInlineUpdate.
s32 swkbdInlineGetTouchRectangles(SwkbdInline *s, SwkbdRect *keytop, SwkbdRect *footer)
GetTouchRectangles.
void swkbdConfigMakePresetDownloadCode(SwkbdConfig *c)
Clears the args in the SwkbdConfig struct and initializes it with the DownloadCode Preset.
void swkbdInlineAppearArgSetRightButtonText(SwkbdAppearArg *arg, const char *str)
Sets the RightButtonText, for SwkbdType_NumPad.
static void swkbdConfigSetInitialCursorPos(SwkbdConfig *c, u32 initialCursorPos)
Sets SwkbdArgCommon::initialCursorPos.
Definition: swkbd.h:496
s32 swkbdInlineGetMiniaturizedHeight(SwkbdInline *s)
Gets the MiniaturizedHeight, relative to the bottom of the screen.
void(* SwkbdMovedTabCb)(const char *str, SwkbdMovedTabArg *arg)
This callback is used by swkbdInlineUpdate when handling MovedTab* replies.
Definition: swkbd.h:307
SwkbdInlineMode
Value for SwkbdInitializeArg mode. Controls the LibAppletMode when launching the applet.
Definition: swkbd.h:96
@ SwkbdInlineMode_AppletDisplay
LibAppletMode_Background. The applet will handle displaying gfx on the screen.
Definition: swkbd.h:98
@ SwkbdInlineMode_UserDisplay
LibAppletMode_BackgroundIndirect. This is the default. The user-process must handle displaying the sw...
Definition: swkbd.h:97
Result swkbdInlineUnsetCustomizedDictionaries(SwkbdInline *s)
Request UnsetCustomizedDictionaries.
SwkbdReplyType
SwkbdInline Interactive output storage reply ID.
Definition: swkbd.h:65
void swkbdInlineSetDecidedCancelCallback(SwkbdInline *s, VoidFn cb)
Sets the DecidedCancel callback, used by swkbdInlineUpdate.
bool swkbdInlineIsUsedTouchPointByKeyboard(SwkbdInline *s, s32 x, s32 y)
Gets whether the input x/y are within the output from swkbdInlineGetTouchRectangles.
void swkbdInlineSetInputText(SwkbdInline *s, const char *str)
Sets the current input text string.
void swkbdInlineSetDecidedEnterCallback(SwkbdInline *s, SwkbdDecidedEnterCb cb)
Sets the DecidedEnter callback, used by swkbdInlineUpdate.
void swkbdInlineSetChangedStringCallback(SwkbdInline *s, SwkbdChangedStringCb cb)
Sets the ChangedString callback, used by swkbdInlineUpdate.
void swkbdConfigSetHeaderText(SwkbdConfig *c, const char *str)
Sets the Header text.
void swkbdInlineAppearArgSetOkButtonText(SwkbdAppearArg *arg, const char *str)
Sets okButtonText for the specified SwkbdAppearArg, which was previously initialized with swkbdInline...
static void swkbdConfigSetKeySetDisableBitmask(SwkbdConfig *c, u32 keySetDisableBitmask)
Sets SwkbdArgCommon::keySetDisableBitmask.
Definition: swkbd.h:487
void swkbdConfigSetLeftOptionalSymbolKey(SwkbdConfig *c, const char *str)
Sets the LeftOptionalSymbolKey, for SwkbdType_NumPad.
void swkbdClose(SwkbdConfig *c)
Closes a SwkbdConfig struct.
void swkbdInlineSetFooterBgAlpha(SwkbdInline *s, float alpha)
Sets FooterBgAlpha.
void swkbdInlineSetUtf8Mode(SwkbdInline *s, bool flag)
Sets the utf8Mode.
void swkbdInlineSetFinishedInitializeCallback(SwkbdInline *s, VoidFn cb)
Sets the FinishedInitialize callback, used by swkbdInlineUpdate.
static void swkbdInlineGetWindowSize(s32 *width, s32 *height)
GetWindowSize.
Definition: swkbd.h:623
Result swkbdInlineUpdate(SwkbdInline *s, SwkbdState *out_state)
Handles updating SwkbdInline state, this should be called periodically.
SwkbdRequestCommand
SwkbdInline Interactive input storage request ID.
Definition: swkbd.h:53
static void swkbdConfigSetStringLenMin(SwkbdConfig *c, u32 stringLenMin)
Sets SwkbdArgCommon::stringLenMin.
Definition: swkbd.h:514
void(* SwkbdChangedStringV2Cb)(const char *str, SwkbdChangedStringArg *arg, bool flag)
This callback is used by swkbdInlineUpdate when handling ChangedString*V2 replies (text changed by th...
Definition: swkbd.h:295
void swkbdInlineSetKeytopAsFloating(SwkbdInline *s, bool flag)
Sets KeytopAsFloating.
void swkbdInlineSetSeGroup(SwkbdInline *s, u8 seGroup, bool flag)
Sets whether the specified SeGroup (sound effect) is enabled.
static void swkbdConfigSetStringLenMax(SwkbdConfig *c, u32 stringLenMax)
Sets SwkbdArgCommon::stringLenMax.
Definition: swkbd.h:505
void swkbdInlineSetKeytopTranslate(SwkbdInline *s, float x, float y)
Sets gfx translation for the displayed swkbd image position.
void swkbdInlineSetDirectionalButtonAssignFlag(SwkbdInline *s, bool flag)
Sets whether DirectionalButtonAssign is enabled.
void swkbdConfigSetOkButtonText(SwkbdConfig *c, const char *str)
Sets the Ok button text.
void swkbdInlineAppear(SwkbdInline *s, const SwkbdAppearArg *arg)
Appear the kbd and set SwkbdAppearArg.
SwkbdType
Type of keyboard.
Definition: swkbd.h:20
@ SwkbdType_Unknown9
Unknown.
Definition: swkbd.h:30
@ SwkbdType_QWERTY
QWERTY (and variants) keyboard only.
Definition: swkbd.h:23
@ SwkbdType_Normal
Normal keyboard.
Definition: swkbd.h:21
@ SwkbdType_All
All language keyboards.
Definition: swkbd.h:29
@ SwkbdType_ZhHans
Chinese Simplified keyboard only.
Definition: swkbd.h:26
@ SwkbdType_ZhHant
Chinese Traditional keyboard only.
Definition: swkbd.h:27
@ SwkbdType_NumPad
Number pad. The buttons at the bottom left/right are only available when they're set by swkbdConfigSe...
Definition: swkbd.h:22
@ SwkbdType_Korean
Korean keyboard only.
Definition: swkbd.h:28
@ SwkbdType_Unknown3
The same as SwkbdType_Normal keyboard.
Definition: swkbd.h:24
@ SwkbdType_Latin
All Latin like languages keyboard only (without CJK keyboard).
Definition: swkbd.h:25
void swkbdInlineSetAlphaEnabledInInputMode(SwkbdInline *s, bool flag)
Sets AlphaEnabledInInputMode.
void(* SwkbdDecidedEnterCb)(const char *str, SwkbdDecidedEnterArg *arg)
This callback is used by swkbdInlineUpdate when handling DecidedEnter* replies (when the final text w...
Definition: swkbd.h:311
Result swkbdInlineClose(SwkbdInline *s)
Closes a SwkbdInline object.
static void swkbdInlineAppearArgSetStringLenMax(SwkbdAppearArg *arg, s32 stringLenMax)
Sets the stringLenMax for the specified SwkbdAppearArg, which was previously initialized with swkbdIn...
Definition: swkbd.h:813
SwkbdTextCheckResult(* SwkbdTextCheckCb)(char *tmp_string, size_t tmp_string_size)
TextCheck callback set by swkbdConfigSetTextCheckCallback, for validating the input string when the s...
Definition: swkbd.h:102
static void swkbdConfigSetUnkFlag(SwkbdConfig *c, u8 flag)
Sets SwkbdConfig::unkFlag, default is 0.
Definition: swkbd.h:568
void swkbdConfigSetInitialText(SwkbdConfig *c, const char *str)
Sets the Initial text.
Result swkbdInlineCreate(SwkbdInline *s)
Creates a SwkbdInline object.
SwkbdTextCheckResult
Output result returned by SwkbdTextCheckCb.
Definition: swkbd.h:12
@ SwkbdTextCheckResult_Bad
Failure, invalid string. Error message is displayed in a message-box, pressing OK will return to swkb...
Definition: swkbd.h:14
@ SwkbdTextCheckResult_Silent
Failure, invalid string. With value 3 and above, swkbd will silently not accept the string,...
Definition: swkbd.h:16
@ SwkbdTextCheckResult_OK
Success, valid string.
Definition: swkbd.h:13
@ SwkbdTextCheckResult_Prompt
Failure, invalid string. Error message is displayed in a message-box, pressing Cancel will return to ...
Definition: swkbd.h:15
Result swkbdInlineLaunch(SwkbdInline *s)
Does setup for SwkbdInitializeArg and launches the applet with the SwkbdInline object.
void swkbdConfigSetDictionary(SwkbdConfig *c, const SwkbdDictWord *input, s32 entries)
Sets the user dictionary.
void swkbdInlineSetKeytopBgAlpha(SwkbdInline *s, float alpha)
Sets KeytopBgAlpha.
static void swkbdConfigSetDicFlag(SwkbdConfig *c, u8 flag)
Sets SwkbdArgCommon::dicFlag.
Definition: swkbd.h:478
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:54
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
void(* VoidFn)(void)
Function without arguments nor return value.
Definition: types.h:46
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
int16_t s16
16-bit signed integer.
Definition: types.h:26
#define NX_PACKED
Packs a struct so that it won't include padding bytes.
Definition: types.h:63
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
u32 Result
Function error code result type.
Definition: types.h:44
#define NX_CONSTEXPR
Flags a function as constexpr in C++14 and above; or as (always) inline otherwise.
Definition: types.h:92
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21