---
title: "oneplatform"
url: https://recursiveai.org/oneplatform/
description: "Windows, input, IME, clipboard, DPI, displays, gamepads and the desktop shell for .NET on Windows, macOS, Linux (Wayland and X11), Android, iOS and the browser, with a headless backend for tests. MIT or Apache-2.0. 1.0.0."
---

# oneplatform

Windows, input, IME, clipboard, DPI, displays, gamepads and the desktop shell for .NET applications on Windows, macOS, Linux (Wayland and X11), Android, iOS and the browser.

**Open source**, MIT or Apache-2.0, made by Recursive AI. Version 1.0.0 is on NuGet, for .NET 10. It depends only on the .NET base class library, and is NativeAOT- and trim-compatible.

```sh
dotnet add package RecursiveAI.OnePlatform --version 1.0.0
```

- [Getting started](https://recursiveai.org/oneplatform/docs/getting-started/)
- [Docs](https://recursiveai.org/oneplatform/docs/)
- [GitHub](https://github.com/recursive-ai-oss/oneplatform-csharp)
- [NuGet](https://www.nuget.org/packages/RecursiveAI.OnePlatform)

## A quick look

A test with no display: the headless backend’s windows are in-memory objects, and the injector sends them the input a user would.

Getting started also opens a real window, and has both programs in full with their output.

[Getting started](https://recursiveai.org/oneplatform/docs/getting-started/)

*Program.cs · OnePlatform 1.0.0 · .NET 10*

```
using OnePlatform;
 
using var app = PlatformApp.Create(
    new PlatformOptions { Backend = PlatformBackendKind.Headless });
var window = app.CreateWindow(new WindowOptions { Width = 640, Height = 480 });
 
app.Injector.Text(window.Id, "héllo");
app.Injector.KeyPress(window.Id, Key.Enter);
app.Injector.CloseRequest(window.Id);
 
app.PumpEvents();
while (app.TryGetEvent(out var e))
    Console.WriteLine(e.Kind switch
    {
        PlatformEventKind.TextInput => $"typed {e.Text}",
        PlatformEventKind.KeyDown => $"key {e.Key}",
        _ => e.Kind.ToString(),
    });
```

*Output · Linux, headless backend*

```
typed héllo
key Enter
KeyUp
WindowCloseRequested
```

### One app object

One `PlatformApp` per process owns the windows, the event queue and the input state. Each operating system’s own API is used directly: Win32, the Objective-C runtime for Cocoa and UIKit, Xlib and the Wayland client protocol on Linux, the NDK on Android, and a small script in the browser.

### Desktop windows

Decorated, movable and resizable by default, and can be dialogs, always-on-top overlays or popups.

### Desktop services

A D-Bus client and the Linux portals, the Windows and macOS equivalents (tray icon, notifications, file dialogs, global hotkeys, menu bar, screenshots, single-instance hand-over), and a window accessibility provider that is bridged to UI Automation on Windows and NSAccessibility on macOS.

### Tests without a display

A headless backend and `InputInjector` drive an app with no display, so tests can click, type and resize without a window.

### Controllers and input

Game controllers, haptics, input actions with rebinding, and text clipboard access are included.

## Platforms

|  | Windows | macOS | Linux | Android, iOS | Browser |
|---|---|---|---|---|---|
| Windows | Win32: ordinary windows, dialogs, overlays, popups, size limits, fullscreen | Cocoa: ordinary windows, dialogs, overlays, popups, size limits, fullscreen | Wayland (`xdg-decoration`, `wlr-layer-shell`, `xdg_popup`) and X11 (EWMH) | one window per activity or scene | one canvas |
| Input | keyboard, mouse, touch, gamepads (XInput) | keyboard, mouse, trackpad, gamepads | keyboard, mouse, touch, gamepads (evdev) | touch, keyboard, gamepads | keyboard, mouse, touch, Gamepad API |
| IME | `WM_IME_*` | `NSTextInputClient` | `text-input-v3` on Wayland; composed keys on X11 | system soft keyboard | page text input |
| Clipboard (UTF-8 text) | yes | yes | yes (X11 primary selection too) | yes | yes |
| DPI and displays | per-monitor v2 | backing scale | `wp_fractional_scale`, `wp_viewporter`, X11 scale | system scale | `devicePixelRatio` |
| Shell services | `WindowsDesktop`: tray icon, notifications, file dialogs, global hotkeys, menu bar, screenshots; `LocalSingleInstance` | `MacDesktop`: menu bar, status item, file panels, notifications, hotkeys; `LocalSingleInstance` | portals and notification, tray and single-instance services over D-Bus | none | none |
| D-Bus and portals | n/a | n/a | `DBusConnection`, `FileChooserPortal`, `ScreenshotPortal`, `GlobalShortcutsSession`, `NotificationService`, `TrayIcon`, `SingleInstance` | n/a | n/a |
| Accessibility | UI Automation provider | NSAccessibility provider | provider model only | provider model only | provider model only |
| Injection and capture | `InputInjector`; window and region capture | `InputInjector` | `InputInjector`; screenshot portal | `InputInjector` | `InputInjector` |

“Provider model only” means `Window.Accessibility` keeps the provider and nothing reads it on that system (`WindowAccessibility.IsSupported` is false). The headless backend works everywhere and has no operating-system window.

## Go further

- [Getting started](https://recursiveai.org/oneplatform/docs/getting-started/)
- [Desktop windows](https://recursiveai.org/oneplatform/docs/desktop-windows/)
- [Linux desktop services](https://recursiveai.org/oneplatform/docs/linux-shell/)
- [Windows desktop services](https://recursiveai.org/oneplatform/docs/windows-shell/)
- [macOS desktop services](https://recursiveai.org/oneplatform/docs/macos-shell/)
- [Accessibility](https://recursiveai.org/oneplatform/docs/accessibility/)
- [Browser pages](https://recursiveai.org/oneplatform/docs/browser/)
- [Changelog](https://recursiveai.org/oneplatform/docs/changelog/)
- [GitHub](https://github.com/recursive-ai-oss/oneplatform-csharp)
