Lifetime
Application lifetime.
Header | #include "nativeui/lifetime.h" |
Namespace | namespace nu |
Type | class |
This class does system GUI toolkit intializations, and provides APIs around native GUI toolkit's application lifetime APIs. You should not use this API when integrating Yue into existing GUI apps.
When using this class, you must create Lifetime
before creating State
.
Events
macOS
void on_ready()Emitted when received applicationDidFinishLaunching
notification.
Preventable
No.macOS
void on_activate()Emitted when received applicationShouldHandleReopen
notification and
there is no visible windows. This usually happens when the app is
activated by Finder, or user clicks on the dock icon.
Preventable
No.Delegates
macOS
Lifetime::Reply open_files(std::vector<base::FilePath> files)Called when received message to open files.
This delegate method is usually called when the app is used to open files with double clicking, or when files are dropped onto the app's dock icon.
Parameters
std::vector<base::FilePath>
files
Return
Lifetime::Reply