// 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.DI { /// Whether the current effective appearance is light or dark. public enum ColorScheme { /// Light appearance — dark text on light backgrounds. Light, /// Dark appearance — light text on dark backgrounds. Dark, } /// The physical form factor of the device. public enum DeviceFormFactor { /// Desktop or laptop computer. Desktop, /// Handheld phone. Mobile, /// Tablet device. Tablet, } /// The operating system platform. public enum DevicePlatform { /// Microsoft Windows. Windows, /// Apple macOS. MacOS, /// Web browser (WASM). Browser, /// Apple iOS. iOS, /// Google Android. Android, } /// /// Provides information about the current device, platform, and user preferences. /// Resolved via this.GetService<IDeviceInfo>() from any . /// The emulator replaces this with a mock to simulate phone or tablet form factors. /// public interface IDeviceInfo { /// Raised on the UI thread when a device or system preference exposed by this service changes. event Action? Changed; /// Gets the operating system the app is running on. DevicePlatform Platform { get; } /// Gets the form factor of the current device. DeviceFormFactor FormFactor { get; } /// Gets the primary pointing device available to the user. PointerModel PointerModel { get; } /// Accessibility font scale multiplier (1.0 = default). nfloat AccessibilityFontScale { get; } /// True if the user has requested reduced motion. bool PrefersReducedMotion { get; } /// True if the user has requested high-contrast mode. bool PrefersHighContrast { get; } /// Light or dark appearance preference. ColorScheme ColorScheme { get; } } /// The primary pointing device available to the user. public enum PointerModel { /// Finger on a touch screen. Touch, /// Stylus or pen. Stylus, /// Mouse or trackpad. Mouse, /// D-pad or game controller. Controller, /// Eye-tracking or gaze-based input. Eye, } /// /// Generic convenience wrappers over , /// mirroring the shape of Microsoft.Extensions.DependencyInjection without /// pulling in that package. /// public static class ServiceProviderExtensions { /// /// Returns the service of type , or null /// if no such service is registered. /// public static T? GetService(this IServiceProvider provider); /// /// Returns the service of type . /// Throws if the service is not found. /// public static T GetRequiredService(this IServiceProvider provider); } }