diff options
author | Lioncash <mathew1800@gmail.com> | 2022-12-06 00:37:30 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2022-12-06 01:06:01 +0100 |
commit | 9bbb77637e6d54318a9cbaba00188d40a473472e (patch) | |
tree | bf099b5e20ac509987593369c7497b4f99efbccc /src/core/frontend | |
parent | Merge pull request #6833 from abouvier/unbundle (diff) | |
download | yuzu-9bbb77637e6d54318a9cbaba00188d40a473472e.tar yuzu-9bbb77637e6d54318a9cbaba00188d40a473472e.tar.gz yuzu-9bbb77637e6d54318a9cbaba00188d40a473472e.tar.bz2 yuzu-9bbb77637e6d54318a9cbaba00188d40a473472e.tar.lz yuzu-9bbb77637e6d54318a9cbaba00188d40a473472e.tar.xz yuzu-9bbb77637e6d54318a9cbaba00188d40a473472e.tar.zst yuzu-9bbb77637e6d54318a9cbaba00188d40a473472e.zip |
Diffstat (limited to 'src/core/frontend')
-rw-r--r-- | src/core/frontend/applets/software_keyboard.cpp | 5 | ||||
-rw-r--r-- | src/core/frontend/applets/software_keyboard.h | 32 |
2 files changed, 16 insertions, 21 deletions
diff --git a/src/core/frontend/applets/software_keyboard.cpp b/src/core/frontend/applets/software_keyboard.cpp index 020c7fa5e..a3720f4d7 100644 --- a/src/core/frontend/applets/software_keyboard.cpp +++ b/src/core/frontend/applets/software_keyboard.cpp @@ -15,10 +15,7 @@ DefaultSoftwareKeyboardApplet::~DefaultSoftwareKeyboardApplet() = default; void DefaultSoftwareKeyboardApplet::InitializeKeyboard( bool is_inline, KeyboardInitializeParameters initialize_parameters, - std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)> - submit_normal_callback_, - std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)> - submit_inline_callback_) { + SubmitNormalCallback submit_normal_callback_, SubmitInlineCallback submit_inline_callback_) { if (is_inline) { LOG_WARNING( Service_AM, diff --git a/src/core/frontend/applets/software_keyboard.h b/src/core/frontend/applets/software_keyboard.h index 094d1e713..8aef103d3 100644 --- a/src/core/frontend/applets/software_keyboard.h +++ b/src/core/frontend/applets/software_keyboard.h @@ -54,14 +54,17 @@ struct InlineTextParameters { class SoftwareKeyboardApplet { public: + using SubmitInlineCallback = + std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>; + using SubmitNormalCallback = + std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>; + virtual ~SoftwareKeyboardApplet(); - virtual void InitializeKeyboard( - bool is_inline, KeyboardInitializeParameters initialize_parameters, - std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)> - submit_normal_callback_, - std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)> - submit_inline_callback_) = 0; + virtual void InitializeKeyboard(bool is_inline, + KeyboardInitializeParameters initialize_parameters, + SubmitNormalCallback submit_normal_callback_, + SubmitInlineCallback submit_inline_callback_) = 0; virtual void ShowNormalKeyboard() const = 0; @@ -81,12 +84,9 @@ class DefaultSoftwareKeyboardApplet final : public SoftwareKeyboardApplet { public: ~DefaultSoftwareKeyboardApplet() override; - void InitializeKeyboard( - bool is_inline, KeyboardInitializeParameters initialize_parameters, - std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)> - submit_normal_callback_, - std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)> - submit_inline_callback_) override; + void InitializeKeyboard(bool is_inline, KeyboardInitializeParameters initialize_parameters, + SubmitNormalCallback submit_normal_callback_, + SubmitInlineCallback submit_inline_callback_) override; void ShowNormalKeyboard() const override; @@ -105,12 +105,10 @@ private: void SubmitNormalText(std::u16string text) const; void SubmitInlineText(std::u16string_view text) const; - KeyboardInitializeParameters parameters; + KeyboardInitializeParameters parameters{}; - mutable std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)> - submit_normal_callback; - mutable std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)> - submit_inline_callback; + mutable SubmitNormalCallback submit_normal_callback; + mutable SubmitInlineCallback submit_inline_callback; }; } // namespace Core::Frontend |