|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
Read-only process snapshots, independent of a current Scene or Application. More...
Classes | |
| class | Arguments |
| Immutable owning argument snapshot, including argv[0]; copies share immutable storage. More... | |
| class | Environment |
| Immutable owning environment snapshot; missing and empty values remain distinct. Windows names compare without case using Unicode ordinal rules; names/values are UTF-8. POSIX names and values preserve native bytes, including non-UTF-8 values, and compare exactly. No accessor mutates or refreshes the process environment. More... | |
Enumerations | |
| enum class | ProcessContextError { UNINITIALIZED , INVALID_ARGUMENT , ALREADY_INITIALIZED , NO_MEMORY , CAPTURE_FAILED } |
| Process capture failures are separate from widget and parser failures. More... | |
Functions | |
| std::expected< void, ProcessContextError > | initialize (int argc, const char *const *argv) |
| Capture argv and the environment once, before any concurrent foreign environment mutation. Repeating identical argv is safe and does not refresh the environment; contradictory argv is rejected. The internal mutex synchronizes Portals initialization only, never foreign setenv/putenv/Win32 calls. Call before creating threads that can mutate the environment. Native capture uses Win32 Unicode on Windows. | |
| std::expected< void, ProcessContextError > | initialize (int argc, const char *const *argv, const Environment &environment) |
| Initialize using an explicit immutable environment, without reading the live environment. | |
| std::expected< Arguments, ProcessContextError > | args () |
| std::expected< Environment, ProcessContextError > | environment () |
| std::expected< Environment, ProcessContextError > | env () |
Read-only process snapshots, independent of a current Scene or Application.
|
strong |
Process capture failures are separate from widget and parser failures.
| std::expected< Arguments, ProcessContextError > portals::ui::app::args | ( | ) |
|
inline |
| std::expected< Environment, ProcessContextError > portals::ui::app::environment | ( | ) |
| std::expected< void, ProcessContextError > portals::ui::app::initialize | ( | int | argc, |
| const char *const * | argv ) |
Capture argv and the environment once, before any concurrent foreign environment mutation. Repeating identical argv is safe and does not refresh the environment; contradictory argv is rejected. The internal mutex synchronizes Portals initialization only, never foreign setenv/putenv/Win32 calls. Call before creating threads that can mutate the environment. Native capture uses Win32 Unicode on Windows.
| argc | Nonnegative argument count, including the program name when present. |
| argv | Borrowed array of argc non-null strings, copied before publication; nullptr is allowed for zero. |
| std::expected< void, ProcessContextError > portals::ui::app::initialize | ( | int | argc, |
| const char *const * | argv, | ||
| const Environment & | environment ) |
Initialize using an explicit immutable environment, without reading the live environment.
| argc | Nonnegative count of arguments, including the program name when present. |
| argv | Argument array copied at initialization, using the same contract as the native overload. |
| environment | Immutable synthetic snapshot, retained by ownership. Contradictory reinitialization is rejected. |