Xui.Runtime.Test.Actual

Assembly: Xui.Runtime.Test · C# declarations · Assembly overview

Types

class TestDeviceInfo

A deterministic desktop identity, independent of the test host OS.

public sealed class TestDeviceInfo : IDeviceInfo
{
    public event Action? Changed { add; remove; }

    public DevicePlatform Platform { get; init; }
    public DeviceFormFactor FormFactor { get; }
    public PointerModel PointerModel { get; }
    public nfloat AccessibilityFontScale { get; }
    public bool PrefersReducedMotion { get; }
    public bool PrefersHighContrast { get; }
    public ColorScheme ColorScheme { get; }
}

NFloat TestDeviceInfo.AccessibilityFontScale

public nfloat AccessibilityFontScale { get; }

Accessibility font scale multiplier (1.0 = default).

event Action? TestDeviceInfo.Changed

public event Action? Changed { add; remove; }

Raised on the UI thread when a device or system preference exposed by this service changes.

ColorScheme TestDeviceInfo.ColorScheme

public ColorScheme ColorScheme { get; }

Light or dark appearance preference.

DeviceFormFactor TestDeviceInfo.FormFactor

public DeviceFormFactor FormFactor { get; }

Gets the form factor of the current device.

DevicePlatform TestDeviceInfo.Platform

public DevicePlatform Platform { get; init; }

Gets the operating system the app is running on.

PointerModel TestDeviceInfo.PointerModel

public PointerModel PointerModel { get; }

Gets the primary pointing device available to the user.

bool TestDeviceInfo.PrefersHighContrast

public bool PrefersHighContrast { get; }

True if the user has requested high-contrast mode.

bool TestDeviceInfo.PrefersReducedMotion

public bool PrefersReducedMotion { get; }

True if the user has requested reduced motion.

class TestPlatform

public class TestPlatform : IRuntime, IDispatcher
{
    public IDispatcher MainDispatcher { get; }

    public IRunLoop CreateRunloop(Xui.Core.Abstract.Application applicationAbstract);
    public IWindow CreateWindow(Xui.Core.Abstract.IWindow windowAbstract, IServiceProvider applicationServices);
    public void Post(Action callback);
}

IRunLoop TestPlatform.CreateRunloop(Application applicationAbstract)

public IRunLoop CreateRunloop(Xui.Core.Abstract.Application applicationAbstract);

IWindow TestPlatform.CreateWindow(IWindow windowAbstract, IServiceProvider applicationServices)

public IWindow CreateWindow(Xui.Core.Abstract.IWindow windowAbstract, IServiceProvider applicationServices);

IDispatcher TestPlatform.MainDispatcher

public IDispatcher MainDispatcher { get; }

void TestPlatform.Post(Action callback)

public void Post(Action callback);

class TestRunLoop

public class TestRunLoop : IRunLoop
{
    public TestRunLoop(TestPlatform platform, Xui.Core.Abstract.Application application);
    public int Run();
    public void Quit();
}

TestRunLoop.TestRunLoop(TestPlatform platform, Application application)

public TestRunLoop(TestPlatform platform, Xui.Core.Abstract.Application application);

void TestRunLoop.Quit()

public void Quit();

int TestRunLoop.Run()

public int Run();

class TestWindow

public class TestWindow : Xui.Core.Actual.IWindow
{
    public Xui.Core.Abstract.IWindow Abstract { get; }

    public TestWindow(TestPlatform platform, Xui.Core.Abstract.IWindow abstractWindow, IServiceProvider nextServiceProvider);
    public string Title { get; set; }
    public bool RequireKeyboard { get; set; }
    public ITextMeasureContext? TextMeasureContext { get; set; }
    public IServiceProvider NextServiceProvider { get; }

    public void Show();
    public void Invalidate();
    public object? GetService(Type serviceType);
}

TestWindow.TestWindow(TestPlatform platform, IWindow abstractWindow, IServiceProvider nextServiceProvider)

public TestWindow(TestPlatform platform, Xui.Core.Abstract.IWindow abstractWindow, IServiceProvider nextServiceProvider);

IWindow TestWindow.Abstract

public Xui.Core.Abstract.IWindow Abstract { get; }

object? TestWindow.GetService(Type serviceType)

public object? GetService(Type serviceType);

void TestWindow.Invalidate()

public void Invalidate();

IServiceProvider TestWindow.NextServiceProvider

public IServiceProvider NextServiceProvider { get; }

bool TestWindow.RequireKeyboard

public bool RequireKeyboard { get; set; }

void TestWindow.Show()

public void Show();

ITextMeasureContext? TestWindow.TextMeasureContext

public ITextMeasureContext? TextMeasureContext { get; set; }

string TestWindow.Title

public string Title { get; set; }