From 5b95de0c9cbe5185283e36426035798e05555c21 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 9 Nov 2018 20:09:37 -0500 Subject: am/applets: Add Applet superclass to describe a generic applet Adds an Initialize and Execute methods which are used by the ILibraryAppletAccessor to start and control the applet. --- src/core/hle/service/am/applets/applets.h | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/core/hle/service/am/applets/applets.h (limited to 'src/core/hle/service/am/applets/applets.h') diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h new file mode 100644 index 000000000..1f91392b4 --- /dev/null +++ b/src/core/hle/service/am/applets/applets.h @@ -0,0 +1,46 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include +#include "common/swap.h" + +namespace Frontend { +class SoftwareKeyboardApplet; +} + +namespace Service::AM { + +class IStorage; + +namespace Applets { + +class Applet { +public: + virtual void Initialize(std::vector> storage); + + virtual IStorage Execute() = 0; + +protected: + struct CommonArguments { + u32_le arguments_version; + u32_le size; + u32_le library_version; + u32_le theme_color; + u8 play_startup_sound; + u64_le system_tick; + }; + static_assert(sizeof(CommonArguments) == 0x20, "CommonArguments has incorrect size."); + + std::vector> storage_stack; + bool initialized = false; +}; + +void RegisterSoftwareKeyboard(std::shared_ptr applet); +std::shared_ptr GetSoftwareKeyboard(); + +} // namespace Applets +} // namespace Service::AM -- cgit v1.2.3