Search Results for

    Show / Hide Table of Contents

    Class AvaloniaWindowsSystem

    Represents a window system implementation for Avalonia UI framework integration. Manages surface creation and rendering loop using Avalonia's dispatcher system.

    Inheritance
    object
    WindowsSystem
    AvaloniaWindowsSystem
    Implements
    IGetNativePointers
    Inherited Members
    WindowsSystem.AvailablePointerKeys
    WindowsSystem.Run(Action, Action)
    WindowsSystem.Dispose()
    WindowsSystem.Destroy()
    WindowsSystem.GetNativePointer(string, out nint)
    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
    WindowsSystem.CreateLoopThread(Action, Action)

    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
    WindowsSystem.CreateSurface(object)

    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
    WindowsSystem.CreateSurface(uint, uint)

    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
    WindowsSystem.CreateWindow(string, uint, uint, bool)
    Exceptions
    Type Condition
    NotSupportedException

    Always thrown as window creation is managed by Avalonia.

    Implements

    IGetNativePointers

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX