@@ -111,22 +111,22 @@ struct KeyboardConfig {
111111 char headerText[0x82 ];
112112 char subText[0x102 ];
113113 char guideText[0x202 ];
114- int textMaxLength;
115- int textMinLength;
114+ s32 textMaxLength;
115+ s32 textMinLength;
116116 PasswordMode passwordMode;
117117 InputFormMode inputFormMode;
118118 bool isUseNewLine;
119119 bool isUseUtf8;
120120 bool isUseBlurBackground;
121- int initialStringOffset;
122- int initialStringLength;
123- int userDictionaryOffset;
124- int userDictionaryNum;
121+ s32 initialStringOffset;
122+ s32 initialStringLength;
123+ s32 userDictionaryOffset;
124+ s32 userDictionaryNum;
125125 bool isUseTextCheck;
126126 void * textCheckCallback;
127127
128128#if NN_SDK_VER >= NN_MAKE_VER(3, 0, 0)
129- int separateTextPos[0x8 ];
129+ s32 separateTextPos[0x8 ];
130130#endif
131131
132132#if NN_SDK_VER >= NN_MAKE_VER(6, 0, 0)
@@ -137,7 +137,7 @@ struct KeyboardConfig {
137137#if NN_SDK_VER >= NN_MAKE_VER(8, 0, 0)
138138 u8 _3c1;
139139 u8 filler[0xd ];
140- u8 trigger;
140+ Trigger trigger;
141141#endif
142142};
143143
@@ -153,11 +153,11 @@ struct ShowKeyboardArg {
153153
154154class String {
155155public:
156- String (int size) {
156+ String (s32 size) {
157157 bufsize = size;
158158 strBuf = nullptr ;
159159 }
160- String (int size, char * buf) {
160+ String (s32 size, char * buf) {
161161 bufsize = size;
162162 strBuf = buf;
163163 }
@@ -170,38 +170,38 @@ class String {
170170
171171private:
172172 char * strBuf;
173- int bufsize;
173+ s32 bufsize;
174174};
175175
176176struct UserWord ; // TODO contents missing
177177struct KbdConfig ; // TODO contents missing
178178
179179struct CustomizedDictionarySet {
180180 void * buffer; // 0x1000-byte aligned buffer.
181- int bufferSize; // 0x1000-byte aligned buffer size.
181+ s32 bufferSize; // 0x1000-byte aligned buffer size.
182182 u64 entries[0x18 ];
183183 u16 totalEntries;
184184};
185185
186- typedef TextCheckResult (*TextCheckCb)(void *, ulong*, String*);
186+ #if NN_SDK_VER >= NN_MAKE_VER(8, 0, 0)
187+ using TextCheckCb = TextCheckResult (*)(void *, u32 *, String*);
188+ #else
189+ using TextCheckCb = TextCheckResult (*)(void *, u64 *, String*);
190+ #endif
187191
188- int ConvertUtf8ToUtf16 (void *, int , const char *, int );
189- int ConvertUtf8ToUtf16 (void *, int , const char *);
190- int GetLengthOfConvertedStringUtf8ToUtf16 (const char *);
192+ s32 ConvertUtf8ToUtf16 (void *, s32 , const char *, s32 );
193+ s32 ConvertUtf8ToUtf16 (void *, s32 , const char *);
194+ s32 GetLengthOfConvertedStringUtf8ToUtf16 (const char *);
191195void MakePresetDefault (KeyboardConfig*);
192196void MakePresetPassword (KeyboardConfig*);
193197void MakePresetUsername (KeyboardConfig*);
194198void MakePresetDownloadCode (KeyboardConfig*);
195199Result GetInteractiveOutStorageCallback (nn::applet::LibraryAppletHandle, String*,
196200 const ShowKeyboardArg&);
197- ulong GetRequiredTextCheckWorkBufferSize ();
201+ size_t GetRequiredTextCheckWorkBufferSize ();
198202void ReadCloseResultAndString (nn::applet::LibraryAppletHandle, CloseResult*, String*);
199- void CopyInitialStringInfo (ShowKeyboardArg*, int );
200- void CopyUserDictionaryInfo (ShowKeyboardArg*, int );
201-
202- #if NN_SDK_VER >= NN_MAKE_VER(3, 0, 0)
203- ulong GetRequiredWorkBufferSize (int );
204- #endif
203+ void CopyInitialStringInfo (ShowKeyboardArg*, s32);
204+ void CopyUserDictionaryInfo (ShowKeyboardArg*, s32);
205205
206206#if NN_SDK_VER >= NN_MAKE_VER(6, 0, 0)
207207void keyboardConfig2kbdConfig (const KeyboardConfig&, KbdConfig*);
@@ -216,20 +216,13 @@ Result ShowKeyboard(String*, const ShowKeyboardArg&, Trigger);
216216void InitializeKeyboardConfig (KeyboardConfig*);
217217void MakePreset (KeyboardConfig*, Preset);
218218
219- ulong GetRequiredWorkBufferSize (bool );
220-
221- #if NN_SDK_VER >= NN_MAKE_VER(1, 0, 0) && NN_SDK_VER < NN_MAKE_VER(2, 0, 0)
222- ulong GetRequiredWorkBufferSize (int );
223- #endif
224-
225- #if NN_SDK_VER >= NN_MAKE_VER(3, 0, 0)
226- ulong GetRequiredWorkBufferSize ();
227- #endif
219+ size_t GetRequiredWorkBufferSize (bool );
228220
229- #if NN_SDK_VER < NN_MAKE_VER(2 , 0, 0)
230- ulong GetRequiredStringBufferSize ( );
221+ #if NN_SDK_VER >= NN_MAKE_VER(1 , 0, 0)
222+ size_t GetRequiredWorkBufferSize (s32 );
231223#endif
232224
225+ size_t GetRequiredStringBufferSize ();
233226void SetOkText (KeyboardConfig*, const char16_t *);
234227void SetOkTextUtf8 (KeyboardConfig*, const char *);
235228void SetLeftOptionalSymbolKey (KeyboardConfig*, char16_t );
@@ -244,7 +237,7 @@ void SetGuideText(KeyboardConfig*, const char16_t*);
244237void SetGuideTextUtf8 (KeyboardConfig*, const char *);
245238void SetInitialText (ShowKeyboardArg*, const char16_t *);
246239void SetInitialTextUtf8 (ShowKeyboardArg*, const char *);
247- void SetUserWordList (ShowKeyboardArg*, const UserWord*, int );
240+ void SetUserWordList (ShowKeyboardArg*, const UserWord*, s32 );
248241
249242#if NN_SDK_VER >= NN_MAKE_VER(6, 0, 0)
250243void SetCustomizedDictionaries (ShowKeyboardArg*, const CustomizedDictionarySet&);
@@ -253,7 +246,7 @@ void SetCustomizedDictionaries(ShowKeyboardArg*, const CustomizedDictionarySet&)
253246void SetTextCheckCallback (ShowKeyboardArg*, TextCheckCb);
254247
255248#if NN_SDK_VER < NN_MAKE_VER(4, 0, 0)
256- nn::applet::ExitReason GetExitReason ();
249+ nn::applet::ExitReason getExitReason ();
257250#endif
258251
259252extern nn::applet::ExitReason g_ExitReason;
0 commit comments