Interface IRuntime
Provides a platform-specific implementation of the Xui runtime, responsible for creating and connecting abstract application components to their actual counterparts.
This interface acts as a bridge between the platform-independent core and the underlying OS-specific APIs (e.g., Win32, Cocoa, UIKit), enabling rendering, windowing, and event dispatch.
public interface IRuntime
Properties
DrawingContext
Gets the global drawing context for the current platform. This typically wraps a native graphics context such as Direct2D (Windows) or CGContext (macOS), and serves as the entry point for rendering operations.
IContext DrawingContext { get; }
Property Value
MainDispatcher
Gets the main thread dispatcher for scheduling UI work. Used to marshal execution onto the main thread for layout, input, and rendering.
IDispatcher MainDispatcher { get; }
Property Value
Methods
CreateRunloop(Application)
Creates a platform-specific run loop associated with the given abstract application. The returned run loop is responsible for managing the application's execution lifecycle.
IRunLoop CreateRunloop(Application applicationAbstract)
Parameters
applicationAbstract
ApplicationThe abstract application instance defined by user code.
Returns
- IRunLoop
A platform-specific run loop instance.
CreateWindow(IWindow)
Creates a platform-specific window that is bound to the given abstract window definition.
IWindow CreateWindow(IWindow windowAbstract)
Parameters
windowAbstract
IWindowThe abstract window definition provided by user code.
Returns
- IWindow
A concrete window implementation for the current platform.