public sealed class RunicHostedWindowRequest A window a guest application asks its host to open (window-open).
Remarks
Experimental; see docs/experimental.md.
Properties
CanEmbed
public bool CanEmbed { get; } Whether the window can show in a region of one of the host's pages (RunicHostedWindowDecision.Embed): the guest implements region/1. A guest of an older release cannot be embedded; the policy opens its window or refuses it.
CanEmbedComponent
public bool CanEmbedComponent { get; } Whether the window can show as a component in one of the host's pages (RunicHostedWindowDecision.EmbedComponent): the guest implements region-component/1 and its application allowed component embedding for this host (RunicGuestOptions.AllowComponentEmbedding).
CanOpenWindow
public bool CanOpenWindow { get; } Whether the window can open as a window of its own (RunicHostedWindowDecision.Allow): false in a browser host, an application that runs serve-only (RunicDesktopHostOptions.ServeOnly) and shows its pages in the user's browser. There only RunicHostedWindowDecision.Embed and RunicHostedWindowDecision.EmbedComponent show the window, and any other decision that allows it fails the guest's open with hosted-window-refused.
CanOverrideAppearance
public bool CanOverrideAppearance { get; } Whether a region window of this guest can take an appearance override (RunicHostedRegionOptions.Appearance, RunicHostedRegion.SetAppearanceAsync): the guest implements region-appearance/1. A guest of an older release still shows in a region, with the desktop's appearance.
GuardsClose
public bool GuardsClose { get; } Whether the guest decides about the window's close, so that a user's close asks it first.
IsModal
public bool IsModal { get; } Whether the new window is modal to RunicHostedWindowRequest.Owner.
Locale
public string? Locale { get; init; } The guest Window's locale, a BCP 47 tag, or null when the guest named none. The host gives the window the locale's direction (DesktopWindowOptions.LayoutDirection in RunicHostedWindowRequest.WindowOptions) unless its own window options fix one.
Owner
public RunicHostedWindow? Owner { get; } The open window of the same guest that owns the new one, or null.
Permissions
public DesktopPermissionGrant Permissions { get; } The permissions the guest's page asks for. RunicHostedWindowRequest.WindowOptions grants only those that the host grants its own windows (RunicDesktopHost.WindowOptions): a host that grants nothing grants the guest nothing, and the page cannot pass a prompt the host's own pages would see. A policy grants more explicitly, with RunicHostedWindowDecision.Allow(request.WindowOptions with { AllowedPermissions = request.Permissions }).
Title
public string? Title { get; } The title the window shows until its page sets one, or null.
Type
public string Type { get; } The guest's Window type, such as MyApp.DocumentWindow`1[Report], or an empty string. Informational.
WindowId
public string WindowId { get; } The guest's id for the window, unique for the guest.
WindowOptions
public DesktopWindowOptions WindowOptions { get; } The options the host opens the window with unless the policy decides others: RunicDesktopHost.WindowOptions with the guest's size, minimum size, owner and modality, and the guest's permissions that the host grants its own windows (RunicHostedWindowRequest.Permissions).
Remarks
Whatever the policy returns, the host opens the window embedded, without a browser fallback, routes its close through the guest (DesktopWindowOptions.ConfirmCloseAsync) and loads the page with the session's own data store.