OwnerPolicy enum

Namespace Runic.Platform in Runic.Platform 0.23.0

public enum OwnerPolicy

Ownership requirements for native dialogs and message boxes.

Remarks

A dialog owned by its window is modal to it, stays above it and closes with it. A presentation without a native owner, such as an installed browser after an embedded-window fallback, can still show an unowned dialog on the user's desktop with OwnerPolicy.PreferOwner. Its capabilities tell the two apart: platform.dialogs.owned is available while dialogs are owned, and platform.dialogs.unowned while OwnerPolicy.PreferOwner shows unowned ones (PlatformCapabilityIds.DialogsOwned, PlatformCapabilityIds.DialogsUnowned).

This set is open: a minor release may add policies.

Values

RequireOwner

RequireOwner = 0

Require the verified owner of this presentation: without one, the dialog reports PlatformUnavailableReason.OwnerUnavailable.

PreferOwner

PreferOwner = 1

Use the verified owner of this presentation; a presentation that has no native owner shows an unowned dialog instead, where its host can.

Remarks

An owned presentation whose window is closing still reports PlatformUnavailableReason.OwnerClosed, and a host without unowned dialogs, such as CS-WebUI or a Window served to a browser, reports PlatformUnavailableReason.OwnerUnavailable as with OwnerPolicy.RequireOwner. An unowned dialog is not modal to any window: the page stays usable while it is shown, so disable what must wait for it.