summaryrefslogtreecommitdiffstats
path: root/src/core/frontend/applets
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-01-30 20:38:00 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-04-15 07:53:16 +0200
commit0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649 (patch)
tree64577d64b355f354ab35e058b077f17be358f303 /src/core/frontend/applets
parentMerge pull request #6199 from lioncash/log-ns (diff)
downloadyuzu-0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649.tar
yuzu-0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649.tar.gz
yuzu-0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649.tar.bz2
yuzu-0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649.tar.lz
yuzu-0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649.tar.xz
yuzu-0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649.tar.zst
yuzu-0f40c8c6340aa858cd2e2ffe2e6c54885e0a3649.zip
Diffstat (limited to 'src/core/frontend/applets')
-rw-r--r--src/core/frontend/applets/software_keyboard.cpp20
-rw-r--r--src/core/frontend/applets/software_keyboard.h34
2 files changed, 1 insertions, 53 deletions
diff --git a/src/core/frontend/applets/software_keyboard.cpp b/src/core/frontend/applets/software_keyboard.cpp
index 856ed33da..73e7a89b9 100644
--- a/src/core/frontend/applets/software_keyboard.cpp
+++ b/src/core/frontend/applets/software_keyboard.cpp
@@ -2,28 +2,10 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include "common/logging/backend.h"
-#include "common/string_util.h"
#include "core/frontend/applets/software_keyboard.h"
namespace Core::Frontend {
-SoftwareKeyboardApplet::~SoftwareKeyboardApplet() = default;
-
-void DefaultSoftwareKeyboardApplet::RequestText(
- std::function<void(std::optional<std::u16string>)> out,
- SoftwareKeyboardParameters parameters) const {
- if (parameters.initial_text.empty())
- out(u"yuzu");
- out(parameters.initial_text);
-}
+SoftwareKeyboardApplet::~SoftwareKeyboardApplet() = default;
-void DefaultSoftwareKeyboardApplet::SendTextCheckDialog(
- std::u16string error_message, std::function<void()> finished_check) const {
- LOG_WARNING(Service_AM,
- "(STUBBED) called - Default fallback software keyboard does not support text "
- "check! (error_message={})",
- Common::UTF16ToUTF8(error_message));
- finished_check();
-}
} // namespace Core::Frontend
diff --git a/src/core/frontend/applets/software_keyboard.h b/src/core/frontend/applets/software_keyboard.h
index f9b202664..54528837e 100644
--- a/src/core/frontend/applets/software_keyboard.h
+++ b/src/core/frontend/applets/software_keyboard.h
@@ -4,51 +4,17 @@
#pragma once
-#include <functional>
-#include <optional>
-#include <string>
-#include "common/bit_field.h"
#include "common/common_types.h"
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:
virtual ~SoftwareKeyboardApplet();
-
- virtual void RequestText(std::function<void(std::optional<std::u16string>)> out,
- SoftwareKeyboardParameters parameters) const = 0;
- virtual void SendTextCheckDialog(std::u16string error_message,
- std::function<void()> finished_check) const = 0;
};
class DefaultSoftwareKeyboardApplet final : public SoftwareKeyboardApplet {
public:
- void RequestText(std::function<void(std::optional<std::u16string>)> out,
- SoftwareKeyboardParameters parameters) const override;
- void SendTextCheckDialog(std::u16string error_message,
- std::function<void()> finished_check) const override;
};
} // namespace Core::Frontend