// Generated API outline. Implementation bodies omitted. #nullable enable using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using System.Threading; using System; using nfloat = System.Runtime.InteropServices.NFloat; using static Xui.Core.Math2D.Constants; namespace Xui.Core.Abstract { using Xui.Core.Actual; using Xui.Core.Debug; /// /// Represents an abstract base class for Xui applications. /// This class is paired at runtime with a platform-specific counterpart, /// which delegates to actual system APIs on macOS, Windows, Android, etc. /// /// Users should subclass , override the method, /// and call to launch the application. /// public abstract class Application : IServiceProvider { /// The service provider for this application. public IServiceProvider Context { get; } /// Gets the service object of the specified type. /// An object that specifies the type of service object to get. /// A service object of type . /// /// -or- /// /// if there is no service object of type . public virtual object? GetService(Type serviceType); /// The platform runtime used by this application. public IRuntime Runtime { get; } /// A list of disposables that are disposed when the application exits. public List DisposeQueue { get; } /// /// Initializes a new instance of the class. /// public Application(IServiceProvider context); /// /// Starts the main application loop by delegating to the platform-specific run loop. /// This method may block until the application exits, /// or may return immediately if the platform bootstraps a runtime loop before instantiating the app delegate. /// /// The application’s exit code. public virtual int Run(); /// /// Requests graceful shutdown of the application's run loop. /// On platforms without a blocking run loop (iOS, Browser) this is a no-op. /// public virtual void Quit(); /// /// Called by the runtime after initialization. /// Override this method to set up application state and display the initial UI. /// public abstract void Start(); /// /// Raised when the application exits on platforms with a definite exit point. /// See for the same constraint on when this fires. /// public event Action? Exit; /// /// Called by run loops that have a definite exit point (e.g. Win32, macOS) just before /// their returns. Not called on platforms whose run loop never /// exits (iOS, Browser canvas), so do not rely on this for cleanup that must always run. /// public virtual void OnExit(); } } namespace Xui.Core.Abstract { /// /// Mutable clock implementation used for deterministic scenarios such as tests. /// public sealed class FixedClock : IClock { /// /// Initializes a new fixed clock with an initial time value. /// /// The initial local time. public FixedClock(DateTime now); /// /// Gets the current fixed local time. /// public DateTime Now { get; } /// /// Sets the current fixed time. /// /// The new local time. public void Set(DateTime now); /// /// Advances the current fixed time by a delta. /// /// The time delta to add. public void Advance(TimeSpan delta); } /// /// Provides access to the current clock time. /// public interface IClock { /// /// Gets the current local time. /// DateTime Now { get; } } /// /// Describes the macOS-specific chrome treatment for a desktop window. /// Implementing this interface is safe on every target; non-macOS runtimes /// ignore it. /// public interface IMacOSWindowStyle { /// /// Controls whether AppKit displays the native window title. /// public MacOSWindowTitle Title { get; } /// /// Selects the native title and toolbar height. /// public MacOSWindowTitleHeight TitleHeight { get; } /// /// Selects the window background treatment. /// public MacOSWindowBackground Background { get; } } /// /// Provides random value generation. /// public interface IRandom { /// /// Returns a random integer within the specified range. /// /// Inclusive lower bound of the random number. /// Exclusive upper bound of the random number. /// A random integer in the specified range. int Next(int minValue, int maxValue); /// /// Returns a random floating-point number in the range [0.0, 1.0). /// /// A random floating-point number. double NextDouble(); } /// /// Defines the abstract interface for a platform window in Xui. /// This surface hosts rendering, input handling, and layout updates. /// /// /// Implementations of this interface bridge platform-specific Actual windowing /// with the framework’s abstract layer. It is used both for physical windows (e.g. desktop apps) /// and virtual windows (e.g. emulator windows). /// public partial interface IWindow { /// /// Provides optional desktop-specific window styling hints for platforms /// that support multiple top-level windows (e.g., Windows, macOS, Linux). /// /// /// On mobile platforms, applications typically run in a single full-screen window, /// and this interface has no effect. On desktop, implementing this interface allows /// apps to influence window chrome, border visibility, and initial sizing. /// public partial interface IDesktopStyle { /// /// Controls the window backdrop and chrome style. /// /// /// /// Windows: Default creates a standard WS_TILEDWINDOW. /// Chromeless uses WS_POPUP with no system chrome. /// Mica and Acrylic use DWM system backdrop APIs (Windows 11+) /// with system caption buttons but no icon or title text. /// /// /// macOS: Chromeless maps to FullSizeContentView | Borderless /// with a transparent title bar and empty toolbar (traffic-light buttons remain, no chrome visible). /// Acrylic uses NSVisualEffectView with the same transparent-titlebar + empty-toolbar treatment. /// Mica falls back to this Acrylic treatment because macOS has no native Mica material. /// /// public enum WindowBackdrop { /// /// Standard opaque window with full system chrome (title bar, icon, buttons). /// Default = 0, /// /// No system chrome. The entire surface is client area and the app draws everything. /// Chromeless = 1, /// /// Translucent blurred backdrop using the Windows 11 Mica material. System caption /// buttons are kept, but icon and title text are removed. On macOS this falls back to /// the same visual-effect treatment as , because macOS has no /// native Mica material. /// Mica = 2, /// /// Blur-behind backdrop. On Windows 11 uses the Acrylic DWM material (more translucent /// than Mica). On macOS uses NSVisualEffectView with a transparent title bar and /// empty toolbar so traffic-light buttons are visible without any other chrome. /// Acrylic = 3, } } } /// /// Defines the abstract interface for a platform window in Xui. /// This surface hosts rendering, input handling, and layout updates. /// /// /// Implementations of this interface bridge platform-specific Actual windowing /// with the framework’s abstract layer. It is used both for physical windows (e.g. desktop apps) /// and virtual windows (e.g. emulator windows). /// public partial interface IWindow { /// /// Provides optional desktop-specific window styling hints for platforms /// that support multiple top-level windows (e.g., Windows, macOS, Linux). /// /// /// On mobile platforms, applications typically run in a single full-screen window, /// and this interface has no effect. On desktop, implementing this interface allows /// apps to influence window chrome, border visibility, and initial sizing. /// public partial interface IDesktopStyle { /// Controls how much of the window area is available for application drawing. public enum WindowClientArea { /// System-managed non-client area (title bar + borders behave normally). Default, /// /// Extend the client area into the title bar region (app draws background/title area). /// Extended, } } } /// /// The native macOS window background treatment. /// public enum MacOSWindowBackground { /// The standard opaque AppKit window background. Default, /// The standard Acrylic background material. Acrylic, /// /// The dynamic macOS glass material. On macOS releases that do not provide /// it, this falls back to the Acrylic background material. /// Glass, /// /// A transparent borderless window background. The native title is hidden /// when this background is selected. /// Transparent, /// /// A transparent, application-drawn window surface intended for custom tools /// and widgets. The application provides its own drag and resize hit testing. /// Borderless, } /// /// The visibility of the native macOS window title. /// public enum MacOSWindowTitle { /// The native title is visible. Visible, /// The native title is hidden. Hidden, } /// /// The native macOS title and toolbar height. /// public enum MacOSWindowTitleHeight { /// The standard AppKit title-bar height. Default, /// The compact unified toolbar height. Medium, /// The unified toolbar height. Large, } /// /// Random implementation that uses a fixed seed for deterministic output. /// public sealed class SeededRandom : IRandom { /// /// Initializes a new seeded random instance. /// /// The deterministic seed value. public SeededRandom(int seed); /// /// Returns a random integer within the specified range. /// /// Inclusive lower bound of the random number. /// Exclusive upper bound of the random number. /// A random integer in the specified range. public int Next(int minValue, int maxValue); /// /// Returns a random floating-point number in the range [0.0, 1.0). /// /// A random floating-point number. public double NextDouble(); } /// /// Default clock implementation backed by . /// public sealed class SystemClock : IClock { /// /// Gets the shared default system clock instance. /// public static SystemClock Default { get; } /// /// Gets the current local time. /// public DateTime Now { get; } } /// /// Default random implementation backed by . /// public sealed class SystemRandom : IRandom { /// /// Gets the shared default system random instance. /// public static SystemRandom Default { get; } /// /// Returns a random integer within the specified range. /// /// Inclusive lower bound of the random number. /// Exclusive upper bound of the random number. /// A random integer in the specified range. public int Next(int minValue, int maxValue); /// /// Returns a random floating-point number in the range [0.0, 1.0). /// /// A random floating-point number. public double NextDouble(); } } namespace Xui.Core.Abstract { using Xui.Core.Actual; /// /// Internal integration point for .NET's MetadataUpdateHandler, enabling partial support /// for Hot Reload during development. This is not a stable API and should not be used /// by application developers. /// /// /// This type is invoked automatically by the runtime when types are updated via /// Edit and Continue or Hot Reload. However, Hot Reload support in Xui is limited, /// and application developers should rely on full rebuilds for consistent behavior. /// /// The current implementation simply invalidates open windows and clears transient caches, /// without attempting to rehydrate or diff application state. /// public static class HotReload { /// /// Raised on the UI thread when a hot reload occurs. /// Windows subscribe to this event to invalidate themselves. /// public static event Action? OnReload; /// /// Called by the runtime to clear any cached data after a hot reload. /// Not intended for use by application developers. /// /// The list of updated types, if available. public static void ClearCache(Type[]? updatedTypes); /// /// Posts a request to the main UI dispatcher to refresh application state. /// /// The list of updated types, if available. public static void UpdateApplication(Type[]? updatedTypes); /// /// Performs a synchronous application update on the main thread. /// Invokes the event so subscribers (windows) can invalidate. /// /// The list of updated types, if available. public static void MainThreadUpdateApplication(Type[]? updatedTypes); } } namespace Xui.Core.Abstract { using Xui.Core.Abstract.Events; using Xui.Core.Math2D; /// /// Defines the contract for UI content that participates in layout, rendering, and input dispatch. /// public partial interface IContent { /// Requests a visual redraw of this content. void Invalidate(); /// Invoked when a mouse button is pressed within this content's area. void OnMouseDown(ref MouseDownEventRef e); /// Invoked when the mouse pointer moves within this content's area. void OnMouseMove(ref MouseMoveEventRef e); /// Invoked when a mouse button is released. void OnMouseUp(ref MouseUpEventRef e); /// Invoked when the scroll wheel is used over this content. void OnScrollWheel(ref ScrollWheelEventRef e); /// Invoked when a platform magnification gesture occurs over this content. void OnZoom(ref ZoomEventRef e); /// Invoked when a touch event occurs. void OnTouch(ref TouchEventRef e); /// Invoked on each animation frame tick. void OnAnimationFrame(ref FrameEventRef e); /// Performs layout and renders this content into . void Update(ref RenderEventRef @event); /// Invoked when a keyboard key is pressed. void OnKeyDown(ref KeyEventRef e); /// Invoked when a character is typed. void OnChar(ref KeyEventRef e); } /// /// Defines the abstract interface for a platform window in Xui. /// This surface hosts rendering, input handling, and layout updates. /// /// /// Implementations of this interface bridge platform-specific Actual windowing /// with the framework’s abstract layer. It is used both for physical windows (e.g. desktop apps) /// and virtual windows (e.g. emulator windows). /// public partial interface IWindow { /// /// Represents a handler for software keyboard input. /// /// /// This interface allows focused views to receive input from the system's software keyboard, /// typically used on mobile platforms and the emulator. It handles character insertion /// and backward deletion commands. /// /// This is not meant to expose full IME or keyboard layout logic—just basic input dispatch. /// public interface ISoftKeyboard { /// Whether the focused text client contains text. bool HasText { get; } /// Whether the focused text client requires password entry. bool IsSecureTextEntry { get; } /// /// Requests insertion of one or more characters into the current input context. /// /// The input event containing the text to insert. public void InsertText(ref InsertTextEventRef eventRef); /// /// Requests deletion of content preceding the caret or selection. /// /// The input event representing a backspace action. public void DeleteBackwards(ref DeleteBackwardsEventRef eventRef); } } } namespace Xui.Core.Abstract { using Xui.Core.Math2D; /// /// Defines the abstract interface for a platform window in Xui. /// This surface hosts rendering, input handling, and layout updates. /// /// /// Implementations of this interface bridge platform-specific Actual windowing /// with the framework’s abstract layer. It is used both for physical windows (e.g. desktop apps) /// and virtual windows (e.g. emulator windows). /// public partial interface IWindow { /// /// Provides optional desktop-specific window styling hints for platforms /// that support multiple top-level windows (e.g., Windows, macOS, Linux). /// /// /// On mobile platforms, applications typically run in a single full-screen window, /// and this interface has no effect. On desktop, implementing this interface allows /// apps to influence window chrome, border visibility, and initial sizing. /// public partial interface IDesktopStyle { /// /// Cross-platform window stacking level (Z-order abstraction). /// /// /// /// macOS: Maps to NSWindow.Level values such as .normal, .floating, /// .statusBar, and .modalPanel. /// /// /// Windows: Maps primarily to Win32 Z-order using HWND_TOPMOST / /// HWND_NOTOPMOST. Higher levels may be approximated, as Windows exposes fewer /// public layering tiers than macOS. /// /// public enum DesktopWindowLevel : int { /// /// Standard application window. /// /// /// macOS: NSWindow.Level.normal.
/// Windows: normal (non-topmost) window. ///
Normal = 0, /// /// Floating utility window above normal windows. /// /// /// macOS: NSWindow.Level.floating.
/// Windows: implemented via HWND_TOPMOST. ///
Floating = 100, /// /// High-floating level for small status or utility UI. /// /// /// macOS: NSWindow.Level.statusBar.
/// Windows: approximated as topmost, often with utility window styles. ///
StatusBar = 200, /// /// Modal dialog level that blocks interaction with other app windows. /// /// /// macOS: NSWindow.Level.modalPanel or sheets.
/// Windows: enforced via window ownership and modality, not a unique Z-order tier. ///
Modal = 300, } } } /// /// Defines the abstract interface for a platform window in Xui. /// This surface hosts rendering, input handling, and layout updates. /// /// /// Implementations of this interface bridge platform-specific Actual windowing /// with the framework’s abstract layer. It is used both for physical windows (e.g. desktop apps) /// and virtual windows (e.g. emulator windows). /// public partial interface IWindow { /// /// Provides optional desktop-specific window styling hints for platforms /// that support multiple top-level windows (e.g., Windows, macOS, Linux). /// /// /// On mobile platforms, applications typically run in a single full-screen window, /// and this interface has no effect. On desktop, implementing this interface allows /// apps to influence window chrome, border visibility, and initial sizing. /// public partial interface IDesktopStyle { /// /// Controls the window backdrop and chrome style. /// public WindowBackdrop Backdrop { get; } /// /// Optional startup size hint for the window. /// If null, the platform will decide the initial size. /// public Size? StartupSize { get; } /// /// Controls the window stacking level (Z-order) relative to other windows. /// public DesktopWindowLevel Level { get; } /// /// Enables AppKit zoom when Xui receives a double-click in a region that /// reports as Title. Use this /// for extended client areas, where the native title bar is not handling /// the double-click itself. This setting applies only on macOS. /// public bool MacOSDoubleTapSoftwareMaximize { get; } /// /// Controls whether the client area includes the title bar region. /// /// /// Default: System-managed non-client area (title bar + borders behave normally).
Extended: Extends the client area into the title bar region so the app can draw its own /// title bar content/background while still allowing native window behaviors via hit testing.

Windows: Uses DwmExtendFrameIntoClientArea (and relies on WM_NCHITTEST returning /// HTCAPTION for draggable regions). This is the recommended way to hide title text/icon reliably, /// especially with Mica/Acrylic backdrops.
macOS: Uses full-size content view / transparent title bar with title visibility hidden. ///
public WindowClientArea ClientArea { get; } } } } namespace Xui.Core.Abstract { using Xui.Core.Abstract.Events; using Xui.Core.Canvas; using Xui.Core.Math2D; /// /// Defines the abstract interface for a platform window in Xui. /// This surface hosts rendering, input handling, and layout updates. /// /// /// Implementations of this interface bridge platform-specific Actual windowing /// with the framework’s abstract layer. It is used both for physical windows (e.g. desktop apps) /// and virtual windows (e.g. emulator windows). /// public partial interface IWindow { /// /// Gets the actual window immediately downstream of this abstract window. /// Together with , this forms the /// bidirectional composed-window chain. /// Actual.IWindow? Actual { get; } /// /// Gets or sets the total visible area of the window, including content that may /// be obscured by hardware cutouts, rounded corners, or system UI overlays. /// /// /// Used by the layout system to determine the full available size. /// public Rect DisplayArea { get; set; } /// /// Gets or sets the "safe" area of the window, excluding obstructions like notches /// or status bars. Important UI elements should be placed within this area. /// /// /// Especially relevant on mobile devices and in emulator scenarios. /// public Rect SafeArea { get; set; } /// /// Gets or sets the corner radius of the physical screen, in logical pixels. /// Used to offset UI elements (such as scrollbar indicators) away from rounded screen edges. /// Zero on desktop platforms where the window has sharp corners. /// public nfloat ScreenCornerRadius { get; set; } /// /// Invoked when the window is closed and cleanup should occur. /// void Closed(); /// /// Invoked before the window closes. Returning false can cancel the closure. /// /// /// true if the window may close; otherwise, false. bool Closing(); /// /// Invoked once per frame to propagate animation timing information. /// /// Timing details for the current animation frame. void OnAnimationFrame(ref FrameEventRef animationFrame); /// /// Invoked when the mouse is moved within the window. /// /// The mouse movement event data. void OnMouseMove(ref MouseMoveEventRef evRef); /// /// Invoked when a mouse button is pressed within the window. /// /// The mouse down event data. void OnMouseDown(ref MouseDownEventRef evRef); /// /// Invoked when a mouse button is released within the window. /// /// The mouse up event data. void OnMouseUp(ref MouseUpEventRef evRef); /// /// Invoked when the scroll wheel is used within the window. /// /// The scroll wheel event data. void OnScrollWheel(ref ScrollWheelEventRef evRef); /// Invoked when a platform magnification gesture occurs within the window. void OnZoom(ref ZoomEventRef evRef); /// /// Invoked when touch input occurs within the window. /// /// The touch event data. void OnTouch(ref TouchEventRef touchEventRef); /// /// Invoked during the render phase of the UI lifecycle. /// Responsible for triggering layout and visual updates. /// /// The render event data, including target rect and frame info. void Render(ref RenderEventRef render); /// /// Invoked when the system requests a hit test for window interaction. /// Allows the app to indicate whether a region is draggable, resizable, etc. /// /// The hit test event containing pointer position and window bounds. void WindowHitTest(ref WindowHitTestEventRef evRef); /// /// Invoked when a key is pressed. /// /// The keyboard event data. void OnKeyDown(ref KeyEventRef e); /// /// Invoked when a character is input (after keyboard translation). /// /// The keyboard event data with the translated character. void OnChar(ref KeyEventRef e); } } namespace Xui.Core.Abstract { using Xui.Core.Abstract.Events; using Xui.Core.Actual; using Xui.Core.Canvas; using Xui.Core.DI; using Xui.Core.Debug; using Xui.Core.Math2D; using Xui.Core.UI; /// /// Represents an abstract cross-platform application window in Xui. /// Handles input, rendering, layout, and software keyboard integration. /// /// /// This class connects the abstract UI framework with the underlying platform window, /// acting as a root container for layout and visual composition. Subclasses may override /// specific input or rendering behaviors as needed. /// public class Window : Abstract.IWindow, Abstract.IWindow.ISoftKeyboard, IServiceProvider, IDisposable { /// The service provider for this window. public IServiceProvider Context { get; } /// Gets the service object of the specified type. /// An object that specifies the type of service object to get. /// A service object of type . /// /// -or- /// /// if there is no service object of type . /// /// Resolves platform and middleware services through the actual-window chain, then /// falls back to this window's DI scope. The chain is strictly forward: actual /// windows must never consult their abstract event receiver for services. /// /// /// belongs to this window's root rather than a middleware host window. /// public virtual object? GetService(Type serviceType); /// A list of disposables disposed when the window closes. public List DisposeQueue { get; } /// /// When true (the default), closing the window calls . /// Set to false for windows that survive being closed and reopened. /// public bool DestroyOnClose { get; set; } /// The platform runtime used by this window. public IRuntime Runtime { get; } /// /// Gets the underlying platform-specific window instance. /// public Actual.IWindow Actual { get; } /// /// Gets or sets the total visible area of the window, including content that may /// be obscured by hardware cutouts, rounded corners, or system UI overlays. /// /// /// Used by the layout system to determine the full available size. /// public virtual Rect DisplayArea { get; set; } /// /// Gets or sets the "safe" area of the window, excluding obstructions like notches /// or status bars. Important UI elements should be placed within this area. /// /// /// Especially relevant on mobile devices and in emulator scenarios. /// public virtual Rect SafeArea { get; set; } /// /// Gets or sets the corner radius of the physical screen, in logical pixels. /// Used to offset UI elements (such as scrollbar indicators) away from rounded screen edges. /// Zero on desktop platforms where the window has sharp corners. /// public virtual nfloat ScreenCornerRadius { get; set; } /// /// Gets the text measure context for this window, used for hit-testing text /// positions during pointer events. Null on platforms that do not provide one. /// public virtual ITextMeasureContext? TextMeasureContext { get; } /// The root view that hosts the window's content hierarchy. public RootView RootView { get; } /// /// Stable name used to identify this window's render surface in instrumentation. /// public string InstrumentationName { get; } /// The instrumentation sink created for this window's render surface, if enabled. public IRenderSurfaceInstrumentsSink? RenderSurfaceInstruments { get; } /// Sets the root content view of this window. public View Content { init; } /// /// Initializes a new instance of the class. /// This creates the backing platform window. /// /// /// An optional scoped for this window. /// If it implements , it will be disposed when the window closes. /// public Window(IServiceProvider context); /// /// Gets or sets the window title (where supported by the platform). /// public string Title { get; set; } /// /// Requests that the soft keyboard be shown or hidden (on supported platforms). /// public bool RequireKeyboard { get; set; } /// /// Makes the window visible and adds it to the list of open windows. /// public void Show(); /// /// Invoked during the render phase of the UI lifecycle. /// Responsible for triggering layout and visual updates. /// /// The render event data, including target rect and frame info. public virtual void Render(ref RenderEventRef renderEventRef); /// /// Invoked when the system requests a hit test for window interaction. /// Allows the app to indicate whether a region is draggable, resizable, etc. /// /// The hit test event containing pointer position and window bounds. public virtual void WindowHitTest(ref WindowHitTestEventRef evRef); /// /// Invoked before the window closes. Returning false can cancel the closure. /// /// /// true if the window may close; otherwise, false. public virtual bool Closing(); /// /// Invoked when the window is closed and cleanup should occur. /// public virtual void Closed(); /// /// Releases all managed resources owned by this window. /// If the platform window is still open, it is closed first. /// Items in are disposed in order. /// public void Dispose(); /// /// true when called from ; false from a finalizer. /// protected virtual void Dispose(bool disposing); /// /// Creates the platform-specific window for this abstract window. /// /// The platform implementation of . protected virtual Actual.IWindow CreateActualWindow(); /// /// Requests a visual invalidation/redraw of this window. /// public virtual void Invalidate(); /// /// Invoked when a mouse button is pressed within the window. /// /// The mouse down event data. public virtual void OnMouseDown(ref MouseDownEventRef e); /// /// Invoked when the mouse is moved within the window. /// /// The mouse movement event data. public virtual void OnMouseMove(ref MouseMoveEventRef e); /// /// Invoked when a mouse button is released within the window. /// /// The mouse up event data. public virtual void OnMouseUp(ref MouseUpEventRef e); /// /// Invoked when the scroll wheel is used within the window. /// /// The scroll wheel event data. public virtual void OnScrollWheel(ref ScrollWheelEventRef e); /// Routes a platform magnification gesture through the view tree. public virtual void OnZoom(ref ZoomEventRef e); /// /// Invoked when touch input occurs within the window. /// /// The touch event data. public virtual void OnTouch(ref TouchEventRef e); /// /// Invoked when a key is pressed. /// /// The keyboard event data. public virtual void OnKeyDown(ref KeyEventRef e); /// /// Invoked when a character is input (after keyboard translation). /// /// The keyboard event data with the translated character. public virtual void OnChar(ref KeyEventRef e); /// /// Invoked once per frame to propagate animation timing information. /// /// Timing details for the current animation frame. public virtual void OnAnimationFrame(ref FrameEventRef e); /// Whether the focused text client contains text. public virtual bool HasText { get; } /// Whether the focused text client requires password entry. public virtual bool IsSecureTextEntry { get; } /// /// Requests insertion of one or more characters into the current input context. /// /// The input event containing the text to insert. public virtual void InsertText(ref InsertTextEventRef eventRef); /// /// Requests deletion of content preceding the caret or selection. /// /// The input event representing a backspace action. public virtual void DeleteBackwards(ref DeleteBackwardsEventRef eventRef); } }