diff options
| -rw-r--r-- | src/core/hle/service/am/applets/applet_software_keyboard_types.h | 72 |
1 files changed, 66 insertions, 6 deletions
diff --git a/src/core/hle/service/am/applets/applet_software_keyboard_types.h b/src/core/hle/service/am/applets/applet_software_keyboard_types.h index 21aa8e800..de1ca7aa5 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard_types.h +++ b/src/core/hle/service/am/applets/applet_software_keyboard_types.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include "common/common_funcs.h" | 10 | #include "common/common_funcs.h" |
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "common/swap.h" | 12 | #include "common/swap.h" |
| 13 | #include "common/uuid.h" | ||
| 13 | 14 | ||
| 14 | namespace Service::AM::Applets { | 15 | namespace Service::AM::Applets { |
| 15 | 16 | ||
| @@ -216,7 +217,7 @@ struct SwkbdInitializeArg { | |||
| 216 | }; | 217 | }; |
| 217 | static_assert(sizeof(SwkbdInitializeArg) == 0x8, "SwkbdInitializeArg has incorrect size."); | 218 | static_assert(sizeof(SwkbdInitializeArg) == 0x8, "SwkbdInitializeArg has incorrect size."); |
| 218 | 219 | ||
| 219 | struct SwkbdAppearArg { | 220 | struct SwkbdAppearArgOld { |
| 220 | SwkbdType type{}; | 221 | SwkbdType type{}; |
| 221 | std::array<char16_t, MAX_OK_TEXT_LENGTH + 1> ok_text{}; | 222 | std::array<char16_t, MAX_OK_TEXT_LENGTH + 1> ok_text{}; |
| 222 | char16_t left_optional_symbol_key{}; | 223 | char16_t left_optional_symbol_key{}; |
| @@ -229,19 +230,76 @@ struct SwkbdAppearArg { | |||
| 229 | bool enable_return_button{}; | 230 | bool enable_return_button{}; |
| 230 | INSERT_PADDING_BYTES(3); | 231 | INSERT_PADDING_BYTES(3); |
| 231 | u32 flags{}; | 232 | u32 flags{}; |
| 232 | INSERT_PADDING_WORDS(6); | 233 | bool is_use_save_data{}; |
| 234 | INSERT_PADDING_BYTES(7); | ||
| 235 | Common::UUID user_id{}; | ||
| 233 | }; | 236 | }; |
| 234 | static_assert(sizeof(SwkbdAppearArg) == 0x48, "SwkbdAppearArg has incorrect size."); | 237 | static_assert(sizeof(SwkbdAppearArgOld) == 0x48, "SwkbdAppearArg has incorrect size."); |
| 235 | 238 | ||
| 236 | struct SwkbdCalcArg { | 239 | struct SwkbdAppearArgNew { |
| 240 | SwkbdType type{}; | ||
| 241 | std::array<char16_t, MAX_OK_TEXT_LENGTH + 1> ok_text{}; | ||
| 242 | char16_t left_optional_symbol_key{}; | ||
| 243 | char16_t right_optional_symbol_key{}; | ||
| 244 | bool use_prediction{}; | ||
| 245 | bool disable_cancel_button{}; | ||
| 246 | SwkbdKeyDisableFlags key_disable_flags{}; | ||
| 247 | u32 max_text_length{}; | ||
| 248 | u32 min_text_length{}; | ||
| 249 | bool enable_return_button{}; | ||
| 250 | INSERT_PADDING_BYTES(3); | ||
| 251 | u32 flags{}; | ||
| 252 | bool is_use_save_data{}; | ||
| 253 | INSERT_PADDING_BYTES(7); | ||
| 254 | Common::UUID user_id{}; | ||
| 255 | u64 start_sampling_number{}; | ||
| 256 | INSERT_PADDING_WORDS(8); | ||
| 257 | }; | ||
| 258 | static_assert(sizeof(SwkbdAppearArgNew) == 0x70, "SwkbdAppearArg has incorrect size."); | ||
| 259 | |||
| 260 | struct SwkbdCalcArgCommon { | ||
| 237 | u32 unknown{}; | 261 | u32 unknown{}; |
| 238 | u16 calc_arg_size{}; | 262 | u16 calc_arg_size{}; |
| 239 | INSERT_PADDING_BYTES(2); | 263 | INSERT_PADDING_BYTES(2); |
| 240 | SwkbdCalcArgFlags flags{}; | 264 | SwkbdCalcArgFlags flags{}; |
| 241 | SwkbdInitializeArg initialize_arg{}; | 265 | SwkbdInitializeArg initialize_arg{}; |
| 266 | }; | ||
| 267 | static_assert(sizeof(SwkbdCalcArgCommon) == 0x18, "SwkbdCalcArgCommon has incorrect size."); | ||
| 268 | |||
| 269 | struct SwkbdCalcArgOld { | ||
| 270 | f32 volume{}; | ||
| 271 | s32 cursor_position{}; | ||
| 272 | SwkbdAppearArgOld appear_arg{}; | ||
| 273 | std::array<char16_t, 0x1FA> input_text{}; | ||
| 274 | bool utf8_mode{}; | ||
| 275 | INSERT_PADDING_BYTES(1); | ||
| 276 | bool enable_backspace_button{}; | ||
| 277 | INSERT_PADDING_BYTES(3); | ||
| 278 | bool key_top_as_floating{}; | ||
| 279 | bool footer_scalable{}; | ||
| 280 | bool alpha_enabled_in_input_mode{}; | ||
| 281 | u8 input_mode_fade_type{}; | ||
| 282 | bool disable_touch{}; | ||
| 283 | bool disable_hardware_keyboard{}; | ||
| 284 | INSERT_PADDING_BYTES(8); | ||
| 285 | f32 key_top_scale_x{}; | ||
| 286 | f32 key_top_scale_y{}; | ||
| 287 | f32 key_top_translate_x{}; | ||
| 288 | f32 key_top_translate_y{}; | ||
| 289 | f32 key_top_bg_alpha{}; | ||
| 290 | f32 footer_bg_alpha{}; | ||
| 291 | f32 balloon_scale{}; | ||
| 292 | INSERT_PADDING_WORDS(4); | ||
| 293 | u8 se_group{}; | ||
| 294 | INSERT_PADDING_BYTES(3); | ||
| 295 | }; | ||
| 296 | static_assert(sizeof(SwkbdCalcArgOld) == 0x4A0 - sizeof(SwkbdCalcArgCommon), | ||
| 297 | "SwkbdCalcArgOld has incorrect size."); | ||
| 298 | |||
| 299 | struct SwkbdCalcArgNew { | ||
| 300 | SwkbdAppearArgNew appear_arg{}; | ||
| 242 | f32 volume{}; | 301 | f32 volume{}; |
| 243 | s32 cursor_position{}; | 302 | s32 cursor_position{}; |
| 244 | SwkbdAppearArg appear_arg{}; | ||
| 245 | std::array<char16_t, 0x1FA> input_text{}; | 303 | std::array<char16_t, 0x1FA> input_text{}; |
| 246 | bool utf8_mode{}; | 304 | bool utf8_mode{}; |
| 247 | INSERT_PADDING_BYTES(1); | 305 | INSERT_PADDING_BYTES(1); |
| @@ -264,8 +322,10 @@ struct SwkbdCalcArg { | |||
| 264 | INSERT_PADDING_WORDS(4); | 322 | INSERT_PADDING_WORDS(4); |
| 265 | u8 se_group{}; | 323 | u8 se_group{}; |
| 266 | INSERT_PADDING_BYTES(3); | 324 | INSERT_PADDING_BYTES(3); |
| 325 | INSERT_PADDING_WORDS(8); | ||
| 267 | }; | 326 | }; |
| 268 | static_assert(sizeof(SwkbdCalcArg) == 0x4A0, "SwkbdCalcArg has incorrect size."); | 327 | static_assert(sizeof(SwkbdCalcArgNew) == 0x4E8 - sizeof(SwkbdCalcArgCommon), |
| 328 | "SwkbdCalcArgNew has incorrect size."); | ||
| 269 | 329 | ||
| 270 | struct SwkbdChangedStringArg { | 330 | struct SwkbdChangedStringArg { |
| 271 | u32 text_length{}; | 331 | u32 text_length{}; |