Vixen
02b45cc4
csharp
public sealed class HeadlessDisplays

No displays, which is a legal answer and not an error.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Every method returns nothing rather than throwing, so the caller's "no display" branch is the branch that runs — and a subsystem that only has a "there is a display" branch fails here, at a desk, instead of on a server at three in the morning.

Fields and properties (2)

  • public IReadOnlyList<DisplayInfo> Displays

    Every display, in the platform's order. Empty when there are none.

  • public DisplayInfo? Primary

    The display the OS considers primary, or when there are none.

Methods (2)

  • public bool TryGetForWindow(IWindow window, out DisplayInfo? display)

    Finds the display a window is mostly on.

  • public bool TryGetForPoint(Int2 point, out DisplayInfo? display)

    Finds the display containing a point in desktop coordinates.

Used by (1)

  • HeadlessPlatformVixen.Platform.Headless