LavaUI docs

enum PointerState

Swift

enum PointerState

Last known window-space pointer position, updated on every .mouseMove.

Exists because .scroll events carry no position of their own (a wheel notch has no coordinates) — a handler that wants to know where the wheel happened, to zoom a chart around the cursor rather than its center, has nowhere else to ask. One frame stale at worst, same as any event-driven position cache.

Sources/LavaUI/Focus.swift:167

Properties

nonisolated(unsafe) static var onLeave: (@Sendable () -> Void)?

Called when the pointer leaves this window entirely.

A window hears about the pointer only while it is inside, so "it has gone" is information no amount of watching positions can produce. A dock that reveals itself on approach hides again from here; hover clearing is handled without it.

Sources/LavaUI/Focus.swift:179

static var window: (x: Float, y: Float) { get }

Not documented.

Sources/LavaUI/Focus.swift:171

Methods

static func set(x: Float, y: Float)

Not documented.

Sources/LavaUI/Focus.swift:170