-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
High level architecture overview
Checkout this blog post for up to date details: https://avaloniaui.net/Blog/avalonia-platform-support-why-it-s-simple
Outdated:
The idea is to split portable (core) and platform-specific (subsystem) code into separate assemblies/packages.
Also see a bit outdated documentation here
We have subsystems for:
The approach for scanning assemblies, threading, etc is a bit different for .NETFX/Mono, .NET Core and Xamarin platforms
Rendering subsystem should provide an implementation of IDrawingContextImpl and means to obtain one for a surface. Surface might be a Win32 window handle (needed for Direct2D), GDK drawable or a framebuffer abstraction that provides a region of unmanaged memory for rendering. It's planned to add opengl-context based surface to be consumed by Skia backend.
While providing various services for handing the event loop, loading cursors and icons, the main task of windowing subsystems is to provide the means to get something on screen. For that we have a concept of TopLevels - controls, that are intended to be a widget hierarchy root that's displayed on screen.
-
TopLevel
class represents a square region of the screen that has some size and can accept user input and provides surfaces to be consumed by rendering subsystem. -
WindowBase
is a desktop-like window that can also be moved and resized on demand. -
Window
is a desktop window with title, decorations and buttons -
EmbeddableRoot
is intended to be embedded in other UI toolkits, so it also support some focus management