public static class PlatformInputTurns what a window reports into what a document understands.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The assembly this was always going to live in. Vixen.Ui is a Core/ assembly and Vixen.Platform is not, so the framework cannot depend on the thing that produces these events — the layering doc 00 makes non-negotiable, and the reason a UI framework stays usable with no backend at all. Samples/02-HelloUi and Vixen.Editor.App each carried a copy of this file and each copy said the same thing: that a Vixen.Platform.Ui is where it goes once there is a second consumer.
The key conversion is a cast, by construction. Vixen.Platform.Key and Vixen.Input.InputKey are both the USB HID usage table and InputKeyMatchesPlatformKeyTests asserts it member by member — so there is no translation table here and there must never be one, because a table is a thing that can drift.
⚠ Every pointer event names the surface it happened in. A document can be shown in several windows, and two windows do not share a coordinate space: an event delivered to the wrong one lands at the right numbers in the wrong place, which looks like a hit-test bug and is a routing one. The window id an event carries is what decides, and TryResolve is what turns it into a surface.
Fields and properties (1)
public const float WheelLineHeightHow far one notch of the wheel scrolls, in device-independent pixels.
Methods (6)
public static void ApplyColorScheme(UiDocument document, SystemColorScheme scheme)Tells every one of a document's surfaces what the system's appearance is now.
public static void Repalette(UiDocument document)Refills the document's system colours from the appearance and the contrast setting.
public static void ApplyAccent(UiDocument document, SystemAccent accent)Puts the operating system's accent colour into the document's palette.
public static void ApplyAccessibility(UiDocument document, SystemAccessibility accessibility)Tells every one of a document's surfaces which accessibility settings are on.
public static bool Dispatch(UiDocument document, in PlatformEvent platformEvent)Sends one platform event to a document's primary surface.
public static bool Dispatch(UiDocument document, UiSurface surface, in PlatformEvent platformEvent, float wheelLineHeight = 48)Sends one platform event to the surface the window it names is showing.
Used by (11)
- AccessibilityWiringTestsVixen.Platform.Ui.Tests
- DropRoutingTestsVixen.Platform.Ui.Tests
- SystemPaletteWiringTestsVixen.Platform.Ui.Tests
- TextCompositionRoutingTestsVixen.Platform.Ui.Tests
- TextScaleWiringTestsVixen.Platform.Ui.Tests
- TextWindowRoutingTestsVixen.Platform.Ui.Tests
- TouchRoutingTestsVixen.Platform.Ui.Tests
- UiApplicationVixen.Ui.Desktop
- WheelRoutingTestsVixen.Platform.Ui.Tests
- WindowFocusRoutingTestsVixen.Platform.Ui.Tests
- EditorHostVixen.Editor.Host