Skip to content

KernelAPI reference

Class DisplayInfo

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

A display (monitor) as the system reports it.

C#
public sealed record DisplayInfo : IEquatable<DisplayInfo>

Inheritance

object ← DisplayInfo

Implements

IEquatable<DisplayInfo>

Constructors

DisplayInfo(int, string, int, int, double, float, bool)

A display (monitor) as the system reports it.

C#
public DisplayInfo(int Index, string Name, int Width, int Height, double RefreshRate, float Scale, bool Primary)

Parameters

Index int

Position in Displays, used by Display and MoveToDisplay.

Name string

The system’s name for it (“LG FHD”); may be empty.

Width int

Width of its current mode in pixels.

Height int

Height of its current mode in pixels.

RefreshRate double

Refresh rate of its current mode in hertz; 0 when unknown.

Scale float

The system’s content scale for it (1.5 for 150%).

Primary bool

Whether it is the system’s primary display.

Properties

Height

Height of its current mode in pixels.

C#
public int Height { get; init; }

Property Value

int

Index

Position in Displays, used by Display and MoveToDisplay.

C#
public int Index { get; init; }

Property Value

int

Name

The system’s name for it (“LG FHD”); may be empty.

C#
public string Name { get; init; }

Property Value

string

Primary

Whether it is the system’s primary display.

C#
public bool Primary { get; init; }

Property Value

bool

RefreshRate

Refresh rate of its current mode in hertz; 0 when unknown.

C#
public double RefreshRate { get; init; }

Property Value

double

Scale

The system’s content scale for it (1.5 for 150%).

C#
public float Scale { get; init; }

Property Value

float

Width

Width of its current mode in pixels.

C#
public int Width { get; init; }

Property Value

int

Methods

<Clone>$()

C#
public DisplayInfo <Clone>$()

Returns

DisplayInfo

Deconstruct(out int, out string, out int, out int, out double, out float, out bool)

C#
public void Deconstruct(out int Index, out string Name, out int Width, out int Height, out double RefreshRate, out float Scale, out bool Primary)

Parameters

Index int

Name string

Width int

Height int

RefreshRate double

Scale float

Primary bool

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(DisplayInfo?)

C#
public bool Equals(DisplayInfo? other)

Parameters

other DisplayInfo?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(DisplayInfo?, DisplayInfo?)

C#
public static bool operator ==(DisplayInfo? left, DisplayInfo? right)

Parameters

left DisplayInfo?

right DisplayInfo?

Returns

bool

operator !=(DisplayInfo?, DisplayInfo?)

C#
public static bool operator !=(DisplayInfo? left, DisplayInfo? right)

Parameters

left DisplayInfo?

right DisplayInfo?

Returns

bool