Class AvaloniaWindowsSystem
Represents a window system implementation for Avalonia UI framework integration. Manages surface creation and rendering loop using Avalonia's dispatcher system.
Implements
Inherited Members
Namespace: Evergine.Avalonia
Assembly: Evergine.Avalonia.dll
Syntax
public class AvaloniaWindowsSystem : WindowsSystem, IGetNativePointers
Properties
MainSurface
Gets the main rendering surface for Avalonia integration.
Declaration
public AvaloniaSurface? MainSurface { get; }
Property Value
| Type | Description |
|---|---|
| AvaloniaSurface |
Methods
CreateLoopThread(Action, Action)
Loop thread creation is not needed as Avalonia manages the rendering loop through its dispatcher.
Declaration
protected override void CreateLoopThread(Action onTickCallback, Action onDrawCallback)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | onTickCallback | The tick callback (unused). |
| Action | onDrawCallback | The draw callback (unused). |
Overrides
CreateSurface(object)
Creates a surface using default dimensions. The native window handle is ignored in Avalonia integration.
Declaration
public override Surface CreateSurface(object nativeWindowHandle)
Parameters
| Type | Name | Description |
|---|---|---|
| object | nativeWindowHandle | The native window handle (unused in Avalonia). |
Returns
| Type | Description |
|---|---|
| Surface | The created or existing surface with default dimensions. |
Overrides
CreateSurface(uint, uint)
Creates or retrieves the main surface with the specified dimensions.
Declaration
public override Surface CreateSurface(uint width, uint height)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | width | The width of the surface in pixels. |
| uint | height | The height of the surface in pixels. |
Returns
| Type | Description |
|---|---|
| Surface | The created or existing AvaloniaSurface. |
Overrides
CreateWindow(string, uint, uint, bool)
Window creation is not supported as it is managed by the Avalonia framework.
Declaration
public override Window CreateWindow(string title, uint width, uint height, bool fullscreen = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | The window title. |
| uint | width | The window width. |
| uint | height | The window height. |
| bool | fullscreen | Whether the window should be fullscreen. |
Returns
| Type | Description |
|---|---|
| Window | This method always throws NotSupportedException. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Always thrown as window creation is managed by Avalonia. |