RunicHostedLimits record

Namespace Runic.Application.Views.Desktop in Runic.Application.Views.Desktop 0.23.0

public sealed record RunicHostedLimits : IEquatable<RunicHostedLimits>

Inherits or implements IEquatable.

The limits of a guest's menu, dialog, presentation and window service requests (the Runic host protocol, runic-host/1), which keep a guest from flooding the host's user interface (IRunicHostedWindowPolicy.Limits).

Remarks

Experimental; see docs/experimental.md.

Constructors

RunicHostedLimits

public RunicHostedLimits()

No documentation.

Properties

AnnouncementBurst

public int AnnouncementBurst { get; init; }

The burst of RunicHostedLimits.AnnouncementsPerSecond; 5 by default.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

AnnouncementsPerSecond

public int AnnouncementsPerSecond { get; init; }

How many announcements (announce) the guest may send the user's screen reader per second across its windows, after a burst of RunicHostedLimits.AnnouncementBurst; 2 by default, so a guest cannot talk over the user's screen reader. An announcement over the rate fails as busy.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

Default

public static RunicHostedLimits Default { get; }

The protocol's default limits.

DialogsPerTenSeconds

public int DialogsPerTenSeconds { get; init; }

How many dialogs (file dialogs and message boxes) the guest may show per ten seconds, across its windows, after a burst of as many; 10 by default, so one a second after the burst. It keeps a guest that shows a dialog and cancels it again and again from bringing dialogs to the front faster than that. A dialog over the rate fails as busy.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

GuestMenuRequestsPerSecond

public int GuestMenuRequestsPerSecond { get; init; }

How many menu requests the guest may make per second across all its windows, after a burst of as many; 80 by default. It bounds a guest that opens many windows, each within RunicHostedLimits.MenuRequestsPerSecond, and with it the native menu bar rebuilds of its windows, each of which follows a request the host accepted. A request over the rate is turned away as one over RunicHostedLimits.MenuRequestsPerSecond is.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

LaunchesPerTenSeconds

public int LaunchesPerTenSeconds { get; init; }

How many files and links the guest may open (launch) per ten seconds across its windows, after a burst of as many; 5 by default, so a guest cannot open browser tabs or applications one after another. A request over the rate fails as busy.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

MaximumDialogs

public int MaximumDialogs { get; init; }

How many dialogs (file dialogs and message boxes) the guest may show at once, across its windows; 1 by default. A window shows one dialog at a time in any case. A dialog over the limit fails as busy.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

public int MenuRequestsPerSecond { get; init; }

How many menu requests (set-menu-bar, update-menu-items, show-context-menu) one window may make per second, after a burst of as many; 20 by default. A request over the rate is turned away, which Runic's guest answers by sending its latest menus again a little later.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

PresentBurst

public int PresentBurst { get; init; }

The burst of RunicHostedLimits.PresentsPerSecond; 3 by default.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

PresentsPerSecond

public int PresentsPerSecond { get; init; }

How many requests that can activate a window (present, minimize, set-visible, set-full-screen and toggle-maximized) the guest may make per second across its windows, after a burst of RunicHostedLimits.PresentBurst; 2 by default. It keeps a guest from taking the focus again and again. A request over the rate fails as busy.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.

ServiceRequestsPerSecond

public int ServiceRequestsPerSecond { get; init; }

How many clipboard and monitor requests (clipboard-read, clipboard-write, monitors) the guest may make per second across its windows, after a burst of as many; 20 by default. A request over the rate fails as busy.

Exceptions

ArgumentOutOfRangeException

The value is less than 1.