Event loop and application lifetime.
This class initializes a GUI event loop, and provides APIs to manage application's lifetime. Depending on the runtime you use, Yue may or may not provide this API.
If you are using Yue in an environment that does not have its own event
loop, you should create
Lifetime at any time before entering event loop.
nu::State state; nu::Lifetime lifetime; lifetime.Run();
Enter event loop.
Quit event loop.
void PostTask(const std::function<void()>& task)
task to event loop.
void PostDelayedTask(int ms, const std::function<void()>& task);
task to event loop and execute it after
intms - The number of milliseconds to wait
Emitted when received