|
ReXGlue SDK
|
#include <exception>#include <filesystem>#include <memory>#include <span>#include <string>#include <string_view>#include <utility>#include <vector>#include <rex/cli.h>#include <rex/platform.h>#include <rex/platform/process.h>#include <rex/app_info.h>#include <rex/module.h>#include <rex/result.h>#include <rex/setting.h>#include <rex/settings_registry.h>#include <rex/types.h>Go to the source code of this file.
Classes | |
| class | rex::app::App |
Namespaces | |
| namespace | rex |
| namespace | rex::gpu |
| namespace | rex::apu |
Macros | |
| #define | REX_CONSOLE_APP(AppClass) |
| #define | REX_CONSOLE_APP_MAIN(AppClass, Function) |
Enumerations | |
| enum class | rex::app::AppPhase : u8 { kStart , kProviders , kRunning , kTitleLaunch , kTitleRunning , kTitleStop , kShutdown } |
Functions | |
| REX_APP_API void | rex::app::RequestShutdown (i32 exit_code) |
| REX_APP_API void | rex::app::RequestRestart (std::vector< std::string > args={}) |
| REX_APP_API bool | rex::app::IsShutdownRequested () |
| #define REX_CONSOLE_APP | ( | AppClass | ) |
Defines the entry point for a console app. An exception that escapes is printed to stderr and the exit code is 1.
| AppClass | A class deriving from rex::app::App with a default constructor. |
| #define REX_CONSOLE_APP_MAIN | ( | AppClass, | |
| Function ) |
Defines the entry point for a console app that calls its own steps.
| AppClass | A class deriving from rex::app::App with a default constructor. |
| Function | A function taking AppClass& and const rex::CLIArgList&, returning int. |
|
strong |
Phase of the app lifecycle. kTitleLaunch, kTitleRunning and kTitleStop exist only in a TitleApp.
| Enumerator | |
|---|---|
| kStart | Init. Logging, settings and paths come up and the layers apply. |
| kProviders | Modules load and connect and drivers initialize. |
| kRunning | Window, input, audio, UI and overlays work, with no title. |
| kTitleLaunch | rex::kernel::TitleRuntime loads and launches and drivers attach. |
| kTitleStop | rex::kernel::TitleRuntime stops, drivers detach, then kRunning again. |
| kShutdown | Drivers shut down, modules unload in reverse and logging goes last. |
| REX_APP_API bool rex::app::IsShutdownRequested | ( | ) |
Reports whether shutdown of the running app has been requested.
| REX_APP_API void rex::app::RequestRestart | ( | std::vector< std::string > | args = {} | ) |
Requests shutdown of the running app and a new process of it once Shutdown completes. Any thread.
| args | Arguments for the new process. Empty reuses the current arguments. |
| REX_APP_API void rex::app::RequestShutdown | ( | i32 | exit_code | ) |
Requests shutdown of the running app. Any thread. Later requests do not change the exit code.
| exit_code | The exit code Shutdown returns. |