Table of Contents

Interface IDesktopSizeProvider

Namespace
Icy.Rendering.Display
Assembly
IcyUI.dll

Represents a platform-specific way to read the desktop resolution of the monitor a native window is on.

public interface IDesktopSizeProvider
Extension Methods

Remarks

The desktop resolution is the one the user configured, not a mode a fullscreen game switched to temporarily. It is the physical panel a touch screen measures against: engine connectors use it to map touches onto a back buffer that fullscreen presents letterboxed (see PointerSurfaceMapping).

Obtain the implementation for the current platform from GetProvider(). Platforms without one report the size as unknown, and callers keep their unmapped behavior.

Methods

TryGetDesktopSize(in NativeWindowInfo, out Size)

Tries to get the desktop resolution of the monitor window is on.

bool TryGetDesktopSize(in NativeWindowInfo window, out Size size)

Parameters

window NativeWindowInfo

The native window; a Handle of 0 means the primary monitor.

size Size

The desktop resolution in physical pixels, or Empty when unknown.

Returns

bool

true if the size is known; otherwise false. Implementations must not throw.