summaryrefslogtreecommitdiffstats
path: root/src/core/frontend/applets/software_keyboard.h
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-11 22:39:25 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-18 16:53:47 +0100
commite696ed1f4d20f28f8b26c637498962938df7d96f (patch)
tree79222d795725ba7b19f0aa9326041e236f9a22d8 /src/core/frontend/applets/software_keyboard.h
parentqt/main: Register Qt Software Keyboard frontend with AM (diff)
downloadyuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.gz
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.bz2
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.lz
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.xz
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.tar.zst
yuzu-e696ed1f4d20f28f8b26c637498962938df7d96f.zip
Diffstat (limited to 'src/core/frontend/applets/software_keyboard.h')
-rw-r--r--src/core/frontend/applets/software_keyboard.h54
1 files changed, 28 insertions, 26 deletions
diff --git a/src/core/frontend/applets/software_keyboard.h b/src/core/frontend/applets/software_keyboard.h
index d368385d2..2ea9db889 100644
--- a/src/core/frontend/applets/software_keyboard.h
+++ b/src/core/frontend/applets/software_keyboard.h
@@ -8,37 +8,39 @@
#include "common/bit_field.h"
#include "common/common_types.h"
-namespace Frontend {
+namespace Core::Frontend {
+struct SoftwareKeyboardParameters {
+ std::u16string submit_text;
+ std::u16string header_text;
+ std::u16string sub_text;
+ std::u16string guide_text;
+ std::u16string initial_text;
+ std::size_t max_length;
+ bool password;
+ bool cursor_at_beginning;
+
+ union {
+ u8 value;
+
+ BitField<1, 1, u8> disable_space;
+ BitField<2, 1, u8> disable_address;
+ BitField<3, 1, u8> disable_percent;
+ BitField<4, 1, u8> disable_slash;
+ BitField<6, 1, u8> disable_number;
+ BitField<7, 1, u8> disable_download_code;
+ };
+};
+
class SoftwareKeyboardApplet {
public:
- struct Parameters {
- std::u16string submit_text;
- std::u16string header_text;
- std::u16string sub_text;
- std::u16string guide_text;
- std::u16string initial_text;
- std::size_t max_length;
- bool password;
- bool cursor_at_beginning;
-
- union {
- u8 value;
-
- BitField<1, 1, u8> disable_space;
- BitField<2, 1, u8> disable_address;
- BitField<3, 1, u8> disable_percent;
- BitField<4, 1, u8> disable_slash;
- BitField<6, 1, u8> disable_number;
- BitField<7, 1, u8> disable_download_code;
- };
- };
+ virtual ~SoftwareKeyboardApplet();
- virtual bool GetText(Parameters parameters, std::u16string& text) = 0;
- virtual ~SoftwareKeyboardApplet() = default;
+ virtual bool GetText(SoftwareKeyboardParameters parameters, std::u16string& text) const = 0;
};
class DefaultSoftwareKeyboardApplet final : public SoftwareKeyboardApplet {
- bool GetText(Parameters parameters, std::u16string& text) override;
+public:
+ bool GetText(SoftwareKeyboardParameters parameters, std::u16string& text) const override;
};
-} // namespace Frontend
+} // namespace Core::Frontend