Table of Contents

Class EmulatorPlatform

Namespace
Xui.Middleware.Emulator.Actual
Assembly
Xui.Middleware.Emulator.dll

A runtime middleware layer that intercepts platform calls to inject emulator behavior.

This class wraps a base platform implementation (e.g., Windows or macOS) and adapts it to simulate a mobile device environment for desktop testing.

public class EmulatorPlatform : IRuntime
Inheritance
EmulatorPlatform
Implements
Inherited Members

Constructors

EmulatorPlatform(IRuntime)

Initializes a new EmulatorPlatform that wraps the specified base platform runtime.

public EmulatorPlatform(IRuntime basePlatform)

Parameters

basePlatform IRuntime

The platform-specific runtime to wrap (e.g., Windows, macOS).

Properties

DrawingContext

Gets the drawing context from the base platform.

public IContext DrawingContext { get; }

Property Value

IContext

MainDispatcher

Gets the main thread dispatcher from the base platform.

public IDispatcher MainDispatcher { get; }

Property Value

IDispatcher

Methods

CreateRunloop(Application)

Forwards run loop creation directly to the base platform.

public IRunLoop CreateRunloop(Application applicationAbstract)

Parameters

applicationAbstract Application

The abstract application instance.

Returns

IRunLoop

The native run loop for the base platform.

CreateWindow(IWindow)

Intercepts window creation to insert a simulated mobile emulator window between the abstract and platform layers. The created window wraps the base platform window with an EmulatorWindow, allowing for input redirection, visual chrome, and runtime controls (e.g., orientation switching).

public IWindow CreateWindow(IWindow windowAbstract)

Parameters

windowAbstract IWindow

The abstract window defined by the application.

Returns

IWindow

An actual window with emulator middleware applied.