oneplatformDocs
oneplatform docs
Getting started, desktop windows, the desktop services on Linux, macOS and Windows, accessibility, browser pages and the event loop. These docs are for OnePlatform 1.0.0, read at the v1.0.0 tag (37f5a73).
Start
Getting startedOpen a window and run its event loop, then drive a window with no display at all, the way a test does. This guide was run on the 1.0.0 package from NuGet, on Linux: the window on X11 (a private Xvfb display), the test on the headless backend.OverviewWindows, input, IME, clipboard, DPI, displays, gamepads and the desktop shell for .NET on Windows, macOS, Linux, Android, iOS and the browser, and the support table for each system.
Desktop
Desktop windowsHow windows behave as desktop-app windows on Linux, and on macOS where the section says so.Linux desktop servicesOnePlatform.DBus is a D-Bus client written from the D-Bus specification using only the .NET base library. OnePlatform.Shell builds the desktop services apps need on top of it. Everything is typed code: no reflection, no runtime code generation, trimmable and NativeAOT-clean.macOS desktop servicesOnePlatform.Shell.MacDesktop gives an app the parts of a Mac desktop that are not windows: the menu bar, a status item, file panels, notifications and global hotkeys. It is written against Apple's documented AppKit, UserNotifications and Carbon APIs, reached through the…Windows desktop servicesWhat the Win32 backend does as a desktop-app backend, and what it leaves to the app.
More
AccessibilityA window can give assistive technologies (screen readers, switch control, voice control) a tree of accessible nodes and report changes to it. The API is the same on every platform and knows nothing of any UI engine: the app describes nodes, the platform bridge turns them into…Browser pagesThe browser backend (PlatformBackendKind.Browser, chosen automatically on browser-wasm) draws into one canvas and reads input from the page. Its half in JavaScript is oneplatform.js.Waking the event loopPlatformApp.PumpEvents(timeout) blocks until the system has an event or the timeout passes. Work that arrives on another thread (a request from a control listener, a D-Bus callback, a timer, a task continuation) calls PlatformApp.Wake() to end that wait at once, so the loop…