aboutsummaryrefslogtreecommitdiff
path: root/src/core/frontend/applets/software_keyboard.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-09 20:10:58 -0500
committerZach Hilman <zachhilman@gmail.com>2018-11-18 10:53:47 -0500
commit25b03a89ce081eb442084b59d4baf829625433ea (patch)
tree6c368afbdc6c0376c9e4291a735c9c0c50b0aa91 /src/core/frontend/applets/software_keyboard.cpp
parenta9fbd4ad68a3a402dc1fa01b94c02b4b85f2a078 (diff)
frontend/applets: Add frontend software keyboard provider and default
Default implementation will return "yuzu" for any string. GUI clients (or CLI) can implement the Frontend::SoftwareKeyboardApplet class and register an instance to provide functionality.
Diffstat (limited to 'src/core/frontend/applets/software_keyboard.cpp')
-rw-r--r--src/core/frontend/applets/software_keyboard.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/frontend/applets/software_keyboard.cpp b/src/core/frontend/applets/software_keyboard.cpp
new file mode 100644
index 0000000000..8cb888a629
--- /dev/null
+++ b/src/core/frontend/applets/software_keyboard.cpp
@@ -0,0 +1,17 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "common/logging/backend.h"
+#include "core/frontend/applets/software_keyboard.h"
+
+namespace Frontend {
+bool DefaultSoftwareKeyboardApplet::GetText(Parameters parameters, std::u16string& text) {
+ if (parameters.initial_text.empty())
+ text = Common::UTF8ToUTF16("yuzu");
+ else
+ text = parameters.initial_text;
+
+ return true;
+}
+} // namespace Frontend