Skip to content

KernelAPI reference

Interface IDisplayControl

Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time

What a platform can change about its window and presentation while the game runs (Screen uses it). A capability (TryGetCapability``1): platforms without a window (headless) or whose host owns these choices (browsers, phones) do not offer it, or report that a change did not apply.

C#
public interface IDisplayControl

Properties

CurrentDisplay

Index in Displays of the display the window is on; -1 when unknown.

C#
int CurrentDisplay { get; }

Property Value

int

Displays

The displays the system reports, in its order.

C#
IReadOnlyList<DisplayInfo> Displays { get; }

Property Value

IReadOnlyList<DisplayInfo>

VSync

Whether frames wait for the display’s refresh.

C#
bool VSync { get; }

Property Value

bool

WindowMode

The window’s current mode.

C#
WindowMode WindowMode { get; }

Property Value

WindowMode

Methods

MoveToDisplay(int)

Moves the window (and full screen) to display index; returns whether it applied.

C#
bool MoveToDisplay(int index)

Parameters

index int

Returns

bool

SetVSync(bool)

Turns VSync on or off; returns whether VSync now equals on.

C#
bool SetVSync(bool on)

Parameters

on bool

Returns

bool

SetWindowMode(WindowMode)

Changes the window’s mode; returns whether it applied.

C#
bool SetWindowMode(WindowMode mode)

Parameters

mode WindowMode

Returns

bool