diff options
Diffstat (limited to 'src/core/hle/applets/swkbd.h')
| -rw-r--r-- | src/core/hle/applets/swkbd.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/core/hle/applets/swkbd.h b/src/core/hle/applets/swkbd.h new file mode 100644 index 000000000..d7199690c --- /dev/null +++ b/src/core/hle/applets/swkbd.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "common/common_types.h" | ||
| 8 | #include "core/hle/applets/applet.h" | ||
| 9 | #include "core/hle/kernel/kernel.h" | ||
| 10 | #include "core/hle/kernel/shared_memory.h" | ||
| 11 | #include "core/hle/service/apt/apt.h" | ||
| 12 | |||
| 13 | namespace HLE { | ||
| 14 | namespace Applets { | ||
| 15 | |||
| 16 | struct SoftwareKeyboardConfig { | ||
| 17 | INSERT_PADDING_WORDS(0x8); | ||
| 18 | |||
| 19 | u16 max_text_length; ///< Maximum length of the input text | ||
| 20 | |||
| 21 | INSERT_PADDING_BYTES(0x6E); | ||
| 22 | |||
| 23 | char16_t display_text[65]; ///< Text to display when asking the user for input | ||
| 24 | |||
| 25 | INSERT_PADDING_BYTES(0xE); | ||
| 26 | |||
| 27 | u32 default_text_offset; ///< Offset of the default text in the output SharedMemory | ||
| 28 | |||
| 29 | INSERT_PADDING_WORDS(0x3); | ||
| 30 | |||
| 31 | u32 shared_memory_size; ///< Size of the SharedMemory | ||
| 32 | |||
| 33 | INSERT_PADDING_WORDS(0x1); | ||
| 34 | |||
| 35 | u32 return_code; ///< Return code of the SoftwareKeyboard, usually 2, other values are unknown | ||
| 36 | |||
| 37 | INSERT_PADDING_WORDS(0x2); | ||
| 38 | |||
| 39 | u32 text_offset; ///< Offset in the SharedMemory where the output text starts | ||
| 40 | u16 text_length; ///< Length in characters of the output text | ||
| 41 | |||
| 42 | INSERT_PADDING_BYTES(0x2B6); | ||
| 43 | }; | ||
| 44 | |||
| 45 | static_assert(sizeof(SoftwareKeyboardConfig) == 0x400, "Software Keyboard Config size is wrong"); | ||
| 46 | |||
| 47 | class SoftwareKeyboard : public Applet { | ||
| 48 | public: | ||
| 49 | SoftwareKeyboard(Service::APT::AppletId id); | ||
| 50 | ~SoftwareKeyboard() {} | ||
| 51 | |||
| 52 | ResultCode ReceiveParameter(Service::APT::MessageParameter const& parameter) override; | ||
| 53 | ResultCode Start(Service::APT::AppletStartupParameter const& parameter) override; | ||
| 54 | |||
| 55 | /// TODO(Subv): Find out what this is actually used for. | ||
| 56 | // It is believed that the application stores the current screen image here. | ||
| 57 | Kernel::SharedPtr<Kernel::SharedMemory> framebuffer_memory; | ||
| 58 | |||
| 59 | /// SharedMemory where the output text will be stored | ||
| 60 | Kernel::SharedPtr<Kernel::SharedMemory> text_memory; | ||
| 61 | |||
| 62 | /// Configuration of this instance of the SoftwareKeyboard, as received from the application | ||
| 63 | SoftwareKeyboardConfig config; | ||
| 64 | }; | ||
| 65 | |||
| 66 | } | ||
| 67 | } // namespace | ||