# Xui.Core.Middleware

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

## Types

- [`interface IWindow`](#api-07e3556c5e8c353a)
- [`class WindowCompositionExtensions`](#api-181cd6e314188298)

<a id="api-07e3556c5e8c353a"></a>

## `interface IWindow`

Represents a middleware-level window that bridges both the abstract UI model and the platform-specific window implementation.

This interface unifies [`Xui.Core.Abstract.IWindow`](../xui-core-abstract/index.md#api-d6645d5140bbbbed) and [`Xui.Core.Actual.IWindow`](../xui-core-actual/index.md#api-f32685022d3435b2), enabling a single component to mediate input, rendering, and lifecycle events between the platform and the UI framework. It is commonly used in emulators, testing layers, or composition hosts that need to intercept and control both sides of the window stack.

```csharp
public interface IWindow : Actual.IWindow, Abstract.IWindow
{
}
```


<a id="api-181cd6e314188298"></a>

## `class WindowCompositionExtensions`

Provides traversal helpers for the abstract side of a composed window chain.

```csharp
public static class WindowCompositionExtensions
{
    public static Abstract.IWindow.IDesktopStyle? GetDesktopStyle(this Abstract.IWindow window);
    public static Abstract.IMacOSWindowStyle? GetMacOSWindowStyle(this Abstract.IWindow window);
}
```

<a id="api-ffe2a0907aae97ef"></a>

### [`IDesktopStyle? WindowCompositionExtensions.GetDesktopStyle(IWindow window)`](#api-ffe2a0907aae97ef)


```csharp
public static Abstract.IWindow.IDesktopStyle? GetDesktopStyle(this Abstract.IWindow window);
```

Returns the first desktop style found from a native window&#39;s paired abstract side towards the application window. Middleware can override the application style by implementing [`Xui.Core.Abstract.IWindow.IDesktopStyle`](../xui-core-abstract/index.md#api-bf7359e519a7582b) itself.

<a id="api-6132aecc2d8c84f2"></a>

### [`IMacOSWindowStyle? WindowCompositionExtensions.GetMacOSWindowStyle(IWindow window)`](#api-6132aecc2d8c84f2)


```csharp
public static Abstract.IMacOSWindowStyle? GetMacOSWindowStyle(this Abstract.IWindow window);
```

Returns the first macOS window style found from a native window&#39;s paired abstract side towards the application window. Middleware can override the application style by implementing [`Xui.Core.Abstract.IMacOSWindowStyle`](../xui-core-abstract/index.md#api-ee3c65ac7d25f8de) itself.

