input.mouse · function ·
TakeRelativeMouseDelta
TakeRelativeX performs the single packed atomic exchange and latches Y; TakeRelativeY completes that same snapshot. Keeping the pair behind this record-returning API prevents X/Y from crossing a message-pump boundary.
Read mouse position, buttons, and relative input for native interactions.
external TakeRelativeMouseDelta() returns mouseDeltaStatus: source-declared
Use TakeRelativeMouseDelta
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using input.mouse
// Read mouse position, buttons, and relative input for native interactions.
mouseDelta result = TakeRelativeMouseDelta()
Console.Log("Inspect result in your debugger")
project.mech
manifestVersion = "2"
package = "api.example.input_mouse__takerelativemousedelta"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "input.mouse"
version = "0.1.0"
path = "../../../yeho/packages/input/mouse"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/input/mouse/mouse.yh:100