IDesktopWindowHostFactory interface

Namespace Runic.Desktop · Runic.Desktop 0.7.0-preview.5

public interface IDesktopWindowHostFactory

Creates platform-native embedded WebView presentations.

Properties

Capabilities

DesktopWindowCapabilities Capabilities { get; }

Gets the operations advertised by this provider before opening.

IsSupported

bool IsSupported { get; }

Gets whether the required platform runtime is available.

Methods

Create

IDesktopWindowHost Create()

Creates a new, initially closed host.

GetAvailabilityDiagnostics

IReadOnlyList<DesktopDiagnostic> GetAvailabilityDiagnostics()

Reports each missing prerequisite while IDesktopWindowHostFactory.IsSupported is false.

Remarks

DesktopHost.GetAvailability and DesktopHost.Validate list these instead of a generic custom-window-host-unavailable diagnostic, so users see every missing native library or service at once. Keep the check cheap: do not load native libraries. The default reports none.

ValidateOptions

IReadOnlyList<DesktopDiagnostic> ValidateOptions(DesktopWindowHostOptions options)

Reports the requested window options this provider cannot apply, without creating a window.

Remarks

DesktopHost.GetPresentationPreflight and DesktopHost.Validate call this before a window opens. Return one diagnostic per option, with DesktopDiagnostic.Option naming the DesktopWindowOptions property: DesktopDiagnosticSeverity.Error when IDesktopWindowHost.OpenAsync rejects the option, or DesktopDiagnosticSeverity.Warning when the window ignores it. Keep the check cheap: do not load native libraries. The default reports none.