LavaUI docs

class LavaWindow

Swift

final class LavaWindow

One window's worth of the frame loop: its layout tree, its draw arena, its slice of framework state, and the input → invalidate → body → layout → emit → present pipeline that connects them.

This is the half of LavaApp.run that was per window all along and only looked global because there was one of them. What stays in LavaApp is the part that genuinely belongs to the process: the GLFW wait, the agent server, MainQueue, FrameTasks, and deciding when the app is over.

Every public entry point runs its body with scope current, which is what lets a widget keep calling ViewInvalidation.markNeedsRedraw() or FocusManager.focus(…) with no window in scope and still land in the right one. See WindowScope.

Sources/LavaUI/LavaWindow.swift:16

Properties

let host: LayoutHost

Not documented.

Sources/LavaUI/LavaWindow.swift:22

let id: WindowID

Not documented.

Sources/LavaUI/LavaWindow.swift:17

var onClose: (() -> Void)?

Run after the window has been removed from the app's list. Lets the opener drop whatever it was keeping alive for this window.

Sources/LavaUI/LavaWindow.swift:45

let scope: WindowScope

Framework state that used to be process-global.

Sources/LavaUI/LavaWindow.swift:20