diff options
| author | 2018-11-17 12:18:03 -0500 | |
|---|---|---|
| committer | 2018-11-18 10:53:47 -0500 | |
| commit | 19b2571aecfff680c7a414c505eafc26264b6f2f (patch) | |
| tree | 1f9725a2acbf98647f981496aaf758de1a5008ca /src/core/frontend/applets | |
| parent | software_keyboard: Push buffer size to offset 0x4 in output data (diff) | |
| download | yuzu-19b2571aecfff680c7a414c505eafc26264b6f2f.tar.gz yuzu-19b2571aecfff680c7a414c505eafc26264b6f2f.tar.xz yuzu-19b2571aecfff680c7a414c505eafc26264b6f2f.zip | |
applet: Add operation completed callback
Diffstat (limited to 'src/core/frontend/applets')
| -rw-r--r-- | src/core/frontend/applets/software_keyboard.cpp | 4 | ||||
| -rw-r--r-- | src/core/frontend/applets/software_keyboard.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/core/frontend/applets/software_keyboard.cpp b/src/core/frontend/applets/software_keyboard.cpp index 4105101b3..856ed33da 100644 --- a/src/core/frontend/applets/software_keyboard.cpp +++ b/src/core/frontend/applets/software_keyboard.cpp | |||
| @@ -18,10 +18,12 @@ void DefaultSoftwareKeyboardApplet::RequestText( | |||
| 18 | out(parameters.initial_text); | 18 | out(parameters.initial_text); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | void DefaultSoftwareKeyboardApplet::SendTextCheckDialog(std::u16string error_message) const { | 21 | void DefaultSoftwareKeyboardApplet::SendTextCheckDialog( |
| 22 | std::u16string error_message, std::function<void()> finished_check) const { | ||
| 22 | LOG_WARNING(Service_AM, | 23 | LOG_WARNING(Service_AM, |
| 23 | "(STUBBED) called - Default fallback software keyboard does not support text " | 24 | "(STUBBED) called - Default fallback software keyboard does not support text " |
| 24 | "check! (error_message={})", | 25 | "check! (error_message={})", |
| 25 | Common::UTF16ToUTF8(error_message)); | 26 | Common::UTF16ToUTF8(error_message)); |
| 27 | finished_check(); | ||
| 26 | } | 28 | } |
| 27 | } // namespace Core::Frontend | 29 | } // namespace Core::Frontend |
diff --git a/src/core/frontend/applets/software_keyboard.h b/src/core/frontend/applets/software_keyboard.h index 5420ea883..f9b202664 100644 --- a/src/core/frontend/applets/software_keyboard.h +++ b/src/core/frontend/applets/software_keyboard.h | |||
| @@ -39,14 +39,16 @@ public: | |||
| 39 | 39 | ||
| 40 | virtual void RequestText(std::function<void(std::optional<std::u16string>)> out, | 40 | virtual void RequestText(std::function<void(std::optional<std::u16string>)> out, |
| 41 | SoftwareKeyboardParameters parameters) const = 0; | 41 | SoftwareKeyboardParameters parameters) const = 0; |
| 42 | virtual void SendTextCheckDialog(std::u16string error_message) const = 0; | 42 | virtual void SendTextCheckDialog(std::u16string error_message, |
| 43 | std::function<void()> finished_check) const = 0; | ||
| 43 | }; | 44 | }; |
| 44 | 45 | ||
| 45 | class DefaultSoftwareKeyboardApplet final : public SoftwareKeyboardApplet { | 46 | class DefaultSoftwareKeyboardApplet final : public SoftwareKeyboardApplet { |
| 46 | public: | 47 | public: |
| 47 | void RequestText(std::function<void(std::optional<std::u16string>)> out, | 48 | void RequestText(std::function<void(std::optional<std::u16string>)> out, |
| 48 | SoftwareKeyboardParameters parameters) const override; | 49 | SoftwareKeyboardParameters parameters) const override; |
| 49 | void SendTextCheckDialog(std::u16string error_message) const override; | 50 | void SendTextCheckDialog(std::u16string error_message, |
| 51 | std::function<void()> finished_check) const override; | ||
| 50 | }; | 52 | }; |
| 51 | 53 | ||
| 52 | } // namespace Core::Frontend | 54 | } // namespace Core::Frontend |