From ae53b84efd5523e2aba3255f9f713d4a1df563b3 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 9 Nov 2018 20:10:58 -0500 Subject: 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. --- src/core/frontend/applets/software_keyboard.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/core/frontend/applets/software_keyboard.cpp (limited to 'src/core/frontend/applets/software_keyboard.cpp') diff --git a/src/core/frontend/applets/software_keyboard.cpp b/src/core/frontend/applets/software_keyboard.cpp new file mode 100644 index 000000000..8cb888a62 --- /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 -- cgit v1.2.3