Vixen
02b45cc4
csharp
public sealed class DesktopDisplays

The displays, as SDL sees them.

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

Remarks

Re-read on every access rather than cached, because a display list goes stale for reasons nobody controls — a dock, a lid, a resolution change — and a cache would need invalidating on an event that some platforms do not send. Enumerating three displays costs a few microseconds and nothing does it per frame.

Fields and properties (2)

  • public IReadOnlyList<DisplayInfo> Displays

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

  • public DisplayInfo? Primary

    Display 0, which is the one SDL orders first and the OS calls primary.

Methods (3)

  • public DesktopDisplays(Sdl sdl)

    The displays, as SDL sees them.

  • 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)

  • DesktopPlatformVixen.Platform.Desktop