# Xui.Runtime.Test.Actual

Assembly: **Xui.Runtime.Test** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`class TestDeviceInfo`](#api-9bb5697e89ed47af)
- [`class TestPlatform`](#api-7703c58dcec1b923)
- [`class TestRunLoop`](#api-66be32780ad1ba06)
- [`class TestWindow`](#api-0176247b9860033c)

<a id="api-9bb5697e89ed47af"></a>

## `class TestDeviceInfo`

A deterministic desktop identity, independent of the test host OS.

```csharp
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; }
}
```

<a id="api-5cb86961f97e753d"></a>

### [`NFloat TestDeviceInfo.AccessibilityFontScale`](#api-5cb86961f97e753d)


```csharp
public nfloat AccessibilityFontScale { get; }
```

Accessibility font scale multiplier (1.0 = default).

<a id="api-afc14f6d6ff1ce92"></a>

### [`event Action? TestDeviceInfo.Changed`](#api-afc14f6d6ff1ce92)


```csharp
public event Action? Changed { add; remove; }
```

Raised on the UI thread when a device or system preference exposed by this service changes.

<a id="api-377fe9ada75e0523"></a>

### [`ColorScheme TestDeviceInfo.ColorScheme`](#api-377fe9ada75e0523)


```csharp
public ColorScheme ColorScheme { get; }
```

Light or dark appearance preference.

<a id="api-845a30e191fdcab3"></a>

### [`DeviceFormFactor TestDeviceInfo.FormFactor`](#api-845a30e191fdcab3)


```csharp
public DeviceFormFactor FormFactor { get; }
```

Gets the form factor of the current device.

<a id="api-548b484cab9de8e5"></a>

### [`DevicePlatform TestDeviceInfo.Platform`](#api-548b484cab9de8e5)


```csharp
public DevicePlatform Platform { get; init; }
```

Gets the operating system the app is running on.

<a id="api-29546fc108d79ee9"></a>

### [`PointerModel TestDeviceInfo.PointerModel`](#api-29546fc108d79ee9)


```csharp
public PointerModel PointerModel { get; }
```

Gets the primary pointing device available to the user.

<a id="api-e02183cae3f70c1a"></a>

### [`bool TestDeviceInfo.PrefersHighContrast`](#api-e02183cae3f70c1a)


```csharp
public bool PrefersHighContrast { get; }
```

True if the user has requested high-contrast mode.

<a id="api-62cb26386c682ab1"></a>

### [`bool TestDeviceInfo.PrefersReducedMotion`](#api-62cb26386c682ab1)


```csharp
public bool PrefersReducedMotion { get; }
```

True if the user has requested reduced motion.


<a id="api-7703c58dcec1b923"></a>

## `class TestPlatform`



```csharp
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);
}
```

<a id="api-b0a66fb7b2318255"></a>

### [`IRunLoop TestPlatform.CreateRunloop(Application applicationAbstract)`](#api-b0a66fb7b2318255)


```csharp
public IRunLoop CreateRunloop(Xui.Core.Abstract.Application applicationAbstract);
```



<a id="api-07c909fa43cbf320"></a>

### [`IWindow TestPlatform.CreateWindow(IWindow windowAbstract, IServiceProvider applicationServices)`](#api-07c909fa43cbf320)


```csharp
public IWindow CreateWindow(Xui.Core.Abstract.IWindow windowAbstract, IServiceProvider applicationServices);
```



<a id="api-61c7626174174060"></a>

### [`IDispatcher TestPlatform.MainDispatcher`](#api-61c7626174174060)


```csharp
public IDispatcher MainDispatcher { get; }
```



<a id="api-e3d8674fda038b3d"></a>

### [`void TestPlatform.Post(Action callback)`](#api-e3d8674fda038b3d)


```csharp
public void Post(Action callback);
```




<a id="api-66be32780ad1ba06"></a>

## `class TestRunLoop`



```csharp
public class TestRunLoop : IRunLoop
{
    public TestRunLoop(TestPlatform platform, Xui.Core.Abstract.Application application);
    public int Run();
    public void Quit();
}
```

<a id="api-758d590eacafca3d"></a>

### [`TestRunLoop.TestRunLoop(TestPlatform platform, Application application)`](#api-758d590eacafca3d)


```csharp
public TestRunLoop(TestPlatform platform, Xui.Core.Abstract.Application application);
```



<a id="api-9ef533fc3f508043"></a>

### [`void TestRunLoop.Quit()`](#api-9ef533fc3f508043)


```csharp
public void Quit();
```



<a id="api-81cc67a2a9482a60"></a>

### [`int TestRunLoop.Run()`](#api-81cc67a2a9482a60)


```csharp
public int Run();
```




<a id="api-0176247b9860033c"></a>

## `class TestWindow`



```csharp
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);
}
```

<a id="api-0865b17556667e82"></a>

### [`TestWindow.TestWindow(TestPlatform platform, IWindow abstractWindow, IServiceProvider nextServiceProvider)`](#api-0865b17556667e82)


```csharp
public TestWindow(TestPlatform platform, Xui.Core.Abstract.IWindow abstractWindow, IServiceProvider nextServiceProvider);
```



<a id="api-360560e6bd7db7bc"></a>

### [`IWindow TestWindow.Abstract`](#api-360560e6bd7db7bc)


```csharp
public Xui.Core.Abstract.IWindow Abstract { get; }
```



<a id="api-2c8a4d4f52b58c5a"></a>

### [`object? TestWindow.GetService(Type serviceType)`](#api-2c8a4d4f52b58c5a)


```csharp
public object? GetService(Type serviceType);
```



<a id="api-ab20e33e71b184bd"></a>

### [`void TestWindow.Invalidate()`](#api-ab20e33e71b184bd)


```csharp
public void Invalidate();
```



<a id="api-0e21417612f7be37"></a>

### [`IServiceProvider TestWindow.NextServiceProvider`](#api-0e21417612f7be37)


```csharp
public IServiceProvider NextServiceProvider { get; }
```



<a id="api-345abf4fa356bf5d"></a>

### [`bool TestWindow.RequireKeyboard`](#api-345abf4fa356bf5d)


```csharp
public bool RequireKeyboard { get; set; }
```



<a id="api-d140943dfdde29c3"></a>

### [`void TestWindow.Show()`](#api-d140943dfdde29c3)


```csharp
public void Show();
```



<a id="api-d98f0114e999cb5b"></a>

### [`ITextMeasureContext? TestWindow.TextMeasureContext`](#api-d98f0114e999cb5b)


```csharp
public ITextMeasureContext? TextMeasureContext { get; set; }
```



<a id="api-0fabee78aeef0d9a"></a>

### [`string TestWindow.Title`](#api-0fabee78aeef0d9a)


```csharp
public string Title { get; set; }
```



