Skip to content

PlatformAPI reference

Interface ISurface

Namespace: MicroEngine.Platform
Assembly: MicroEngine.Platform.dll
Guide: The platform host

A surface a host produces and a graphics device presents to: a window, a browser canvas, a phone’s screen. This is the graphics contract’s surface (version 1); only backends read NativeWindow.

C#
public interface ISurface

Properties

IsMinimized

True while the surface has nothing to present to (minimised, zero size).

C#
bool IsMinimized { get; }

Property Value

bool

NativeWindow

Opaque native window (an SDL_Window* for SDL hosts, raylib’s window handle for raylib); 0 when there is none (headless). Only backends read it.

C#
nint NativeWindow { get; }

Property Value

nint

PixelDensity

Pixels per logical unit.

C#
float PixelDensity { get; }

Property Value

float

PixelSize

Drawable size in pixels.

C#
(int Width, int Height) PixelSize { get; }

Property Value

(int Width, int Height)

Lost

Raised when a mobile surface is destroyed.

C#
event Action? Lost

Event Type

Action?

Resized

Raised when PixelSize changes, during the host’s event pump.

C#
event Action? Resized

Event Type

Action?