summaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-10-02 01:06:48 -0700
committerGitHub <noreply@github.com>2021-10-02 01:06:48 -0700
commitae3e51c795ea72dd1eaea64d44b94afab7d74007 (patch)
tree89860f4f5df991336bab7332a77e76bb58e1047f /src/core/core.h
parent3a33519598063175fb7c16c67e32784ed97d5017 (diff)
parent2f5808b7ffd168e1ab3ac7e453f8936098350e58 (diff)
Merge pull request #7093 from Morph1984/exit
core: Properly shutdown and exit the running application when ISelfController::Exit is called
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/core.h b/src/core/core.h
index 715ab88e7..a796472b2 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -387,6 +387,18 @@ public:
*/
void ExecuteProgram(std::size_t program_index);
+ /// Type used for the frontend to designate a callback for System to exit the application.
+ using ExitCallback = std::function<void()>;
+
+ /**
+ * Registers a callback from the frontend for System to exit the application.
+ * @param callback Callback from the frontend to exit the application.
+ */
+ void RegisterExitCallback(ExitCallback&& callback);
+
+ /// Instructs the frontend to exit the application.
+ void Exit();
+
/// Applies any changes to settings to this core instance.
void ApplySettings();