DesktopCloseReason enum

Namespace Runic.Desktop in Runic.Desktop 0.23.0

public enum DesktopCloseReason

Why a window's close drain (DesktopWindowOptions.CloseDrainAsync) runs.

Remarks

This set is open: a minor release may add values, so handle an unknown one as DesktopCloseReason.User.

Values

User

User = 0

The user closed the window: its close button, Alt+F4, Command and W, the window menu or the window manager.

Request

Request = 1

The application asked with DesktopWindow.RequestCloseAsync.

Quit

Quit = 2

A quit (DesktopHostOptions.ConfirmQuitAsync, such as Command and Q) asked the window's close guard.

Shutdown

Shutdown = 3

The host shuts down: Ctrl+C, SIGTERM, SIGHUP, a closed Windows console, or a quit once every guard agreed. The drain ends at DesktopHostOptions.ShutdownDrainTimeout at the latest.