|
@@ -13,8 +13,7 @@ namespace Applets {
|
|
|
|
|
|
|
|
class Applet {
|
|
class Applet {
|
|
|
public:
|
|
public:
|
|
|
- virtual ~Applet() {}
|
|
|
|
|
- Applet(Service::APT::AppletId id) : id(id) {}
|
|
|
|
|
|
|
+ virtual ~Applet() = default;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Creates an instance of the Applet subclass identified by the parameter.
|
|
* Creates an instance of the Applet subclass identified by the parameter.
|
|
@@ -48,7 +47,7 @@ public:
|
|
|
/**
|
|
/**
|
|
|
* Whether the applet is currently executing instead of the host application or not.
|
|
* Whether the applet is currently executing instead of the host application or not.
|
|
|
*/
|
|
*/
|
|
|
- virtual bool IsRunning() const = 0;
|
|
|
|
|
|
|
+ bool IsRunning() const;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Handles an update tick for the Applet, lets it update the screen, send commands, etc.
|
|
* Handles an update tick for the Applet, lets it update the screen, send commands, etc.
|
|
@@ -56,6 +55,8 @@ public:
|
|
|
virtual void Update() = 0;
|
|
virtual void Update() = 0;
|
|
|
|
|
|
|
|
protected:
|
|
protected:
|
|
|
|
|
+ explicit Applet(Service::APT::AppletId id) : id(id) {}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Handles the Applet start event, triggered from the application.
|
|
* Handles the Applet start event, triggered from the application.
|
|
|
* @param parameter Parameter data to handle.
|
|
* @param parameter Parameter data to handle.
|
|
@@ -65,6 +66,9 @@ protected:
|
|
|
|
|
|
|
|
Service::APT::AppletId id; ///< Id of this Applet
|
|
Service::APT::AppletId id; ///< Id of this Applet
|
|
|
std::shared_ptr<std::vector<u8>> heap_memory; ///< Heap memory for this Applet
|
|
std::shared_ptr<std::vector<u8>> heap_memory; ///< Heap memory for this Applet
|
|
|
|
|
+
|
|
|
|
|
+ /// Whether this applet is currently running instead of the host application or not.
|
|
|
|
|
+ bool is_running = false;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/// Returns whether a library applet is currently running
|
|
/// Returns whether a library applet is currently running
|