LavaUI
2489 declarations · 2272 documented
LavaUI
-
AgentHoststructCallbacks the host app provides so the server stays UI-framework-agnostic.
-
AgentIdentifiedViewstructAttaches a stable agent id to the content's root layout box.
-
AgentServerclassA local automation server: newline-delimited JSON over TCP on 127.0.0.1.
-
AlignmentstructA point in a box: one horizontal choice and one vertical one.
-
AmbientLight3DstructLight that reaches every face equally, whatever way it points.
-
Angle3DstructAn angle, stored in radians.
-
AnimatableprotocolA value that can be interpolated between two endpoints.
-
AnimatedstructA property that moves toward a target over time.
-
AnimationCurveenumHow an animation's progress maps onto time.
-
AnimationDriverenumSteps every node with animation in flight, once per frame.
-
AnyViewstructA view whose type is decided at run time.
-
AnyViewNodeprotocolA node in the retained tree: what a view mounts into and is reconciled against.
-
AppSettingsenumCross-platform, file-backed key/value settings for LavaUI apps.
-
ArenaFrameSinkclassPublishes frames into a
DrawArenafor a renderer in another process. -
BackdropBridgeenumCompositor frost behind a popup. LavaUI cannot see the desktop, so a client fills this in; a windowed app leaves it nil and
.backdropBlursamples this window's own framebuffer instead. -
BindablestructProjects bindings out of a reference-type model:
$model.property. -
BindingstructA two-way reference to a value owned somewhere else.
-
BodyRecomputableprotocolA retained node that can re-evaluate its own
bodyin place, using whateverviewvalue it already holds — no new value from a parent is needed, because nothing about that value changed; only some@State/@Observableproperty it reads did, and that storage is a reference type living outside the struct, so it is already current.CompositeNodeis the only conformer; the protocol exists soViewInvalidationcan hold a dirty node without depending on its generic view type. -
BookshelfLayout3DstructTwo stacks of books around a face-on cover: neighbours stand on the shelf at a steep yaw so a sliver of their front is still readable, and the focused item turns to face the camera.
-
BorderStylestructA stroke on a view's own edge, lying inside its layout rect.
-
Box3DstructA box. With a
Material3D, the front face (+z) shows its picture and the other faces its edge colour; without one, every face iscolor. -
BoxRegistrationViewstructAttaches something to the content's root layout box — the shape
.onDropand.onFileDragshare, factored out once there were more of them. -
ButtonstructA clickable control whose hover and press feedback is owned by the renderer.
-
ButtonStylestructColours and metrics for a
Button. -
Camera3DstructA perspective camera: where it is, what it looks at, and how wide it sees.
-
CameraControls3DstructHow a
Scene3D's camera follows the pointer: drag to orbit, Shift-drag to pan, wheel to zoom. -
CanvasstructCustom-drawn control: Yoga sizes the box; the app emits draw commands.
-
CanvasFramestructAbsolute layout box handed to a custom paint callback (window pixels).
-
CanvasGesturestruct -
CanvasGesturePhaseenumA phase in a
Canvaspointer gesture — a press, its drag, and its release. -
CaretAffinityenumWhich side of a wrap boundary a caret belongs to.
-
CaretBlinkenumCaret blink, expressed as a phase rather than a timer.
-
CatalogLayout3DstructA reusable album/poster shelf that adds depth and fans neighboring items around a focused cover while keeping the unfocused catalog in one row.
-
CatalogPose3DstructA position in a 3D catalog layout, as
CatalogLayout3DandBookshelfLayout3Dcompute it. -
Chevronstruct"‹" and "›" drawn rather than typed. A font's are a third of the line's height and sit on the baseline rather than in the middle of the row, which is too small to aim at and never quite centred in a button. This is
DisclosureChevron's stroke, turned whichever way is asked. -
ClickCounterenumMulti-click detection. Kept here rather than in the field so any control can share one notion of what counts as a double click.
-
ClipboardBridgeenumIndirection so
LavaUIviews can reach the clipboard without every view carrying anEditorreference. The app installs this once at startup. -
CodeStylestructStyle palette for
EditorView. Rules carry style indices; this maps them to colours, so a theme change restyles code without touching any rule. -
ColorstructsRGB colour with alpha. Components are what a colour picker shows —
Color(r: 0.5, g: 0, b: 0)is#800000, and that is what reaches the screen. Nothing between here and the attachment applies a transfer function: the whole 2D pipeline works on these encoded values. Seedocs/colour-and-blending.md. -
ColorPickerstructSaturation–value square, hue strip, hex, and an optional alpha slider.
-
ComboBoxstructA closed field showing the current choice, and a dropdown of the rest.
-
ComboBoxItemstructOne row of a
ComboBox. -
ComposedOverlayViewstructA base view with content drawn over it, taking no layout space.
-
ContentScalestructDiscrete UI text scale — bitmap fonts re-raster at fixed pixel sizes so Yoga measure and FreeType glyphs stay pixel-aligned (no GPU scale of atlas coverage).
-
ContentScaleShortcutsenumDefault chord: Ctrl+Shift +
=/-/0(and numpad). -
CursorBridgeenumWhere the pointer image is actually set.
-
CursorShapeenumThe pointer image over a view.
-
DecorationUnderlineenumUnderline drawn beneath a decorated range.
wavyis built from short zigzag segments — there is no dedicated curve primitive, and a handful ofline()calls per decorated span is cheap enough not to need one. -
DiagnosticSeverityenumHow urgently an
EditorDecorationshould read — supplies a default color and gutter glyph so a caller can skip both and just say what kind of thing this is. -
DiagramHoststructAn empty box filled with the theme's
canvascolour, for a region the app draws into by other means. -
DimensionenumMaps onto Yoga's width/height states (not a single
-1sentinel). -
DirectionalLight3DstructLight arriving from one direction, like the sun: faces turned toward it are brighter.
-
DisclosureChevronstructA font-independent disclosure chevron, pointing right when collapsed and down when expanded.
-
DisplayScaleenumThe output scale a window is drawn at: framebuffer pixels per layout pixel.
-
DividerstructA hairline rule separating content.
-
DividerAxisenumWhich way a
Dividerruns. -
DividerStylestructColour and metrics for a
Divider. -
DragBridgeenumHow a view starts an OS drag.
-
DragChipImagestructA drag chip: views laid out and emitted into a draw list of their own.
-
DragGesturePhaseenumWhere an
.onDragGestureis in its lifetime. -
DragGestureValuestructOne step of an
.onDragGesture, delivered to its handler. -
DrawKindenumWhat one draw command draws. Mirrors
canvas::DrawCommandKindindraw_command.hpp, which documents how each kind uses the command's fields. -
DrawListclassReused arena: draw commands plus the shaped glyphs they reference. Shaping itself is cached per line on
UIFont, so re-emission is cheap. -
DrawStatestructView-local state whose changes only require re-emitting pixels.
-
DropBridgeenumWhere the paths for a
.fileDropcome from. -
DropRouterenumRoutes an OS drag-and-drop to whichever node it landed on. The node under the drop point is resolved the same way hover is (
hitTestHover); unlike hover, this is a one-shot lookup at the moment the drop event arrives, not a continuously tracked position. -
DropTargetViewstructRegisters
performas the drop handler for the content's root layout box. -
EdgestructWhich sides of a box a layout inset applies to.
-
EdgeInsetsstructPer-edge inset around a view's content.
-
EditorclassThe engine: windows, renderer, fonts, images, clipboard and the D-Bus hosts a desktop panel needs.
-
EditorControllerclassCommands for a mounted
EditorView: reveal a line or range, read and restore its position, replace search matches. -
EditorDecorationstructA diagnostic attached to a range of
EditorView's bound text. -
EditorPositionstructWhere an editor was left: what it was scrolled to, and what was selected.
-
EditorProbeenumWhere an editor's time goes on a large buffer, opt-in via
LAVA_EDITOR_PROBE=1. -
EditorViewstructA code editor: line-number gutter, current-line highlight, rule-based syntax colouring, and find-match highlighting.
-
EitherViewstructif/else— fragment (no flex wrapper). Identity is on the branch node. -
EmptyViewstructA view that shows nothing and takes no space.
-
EngineFrameSinkclassThe engine's own per-window buffers: what every windowed app uses, and the default for any
DrawListbuilt against anEditor. -
EnvironmentenumScope stack for
EnvironmentValues. -
EnvironmentModifiedViewstructWraps
contentwith an environment override active for its own mount/reconcile call — i.e. for its whole subtree, not just its own node. Delegates entirely tocontent's node; this adds no Yoga node. -
EnvironmentValuesstructValues that flow down the view tree, defaulting to
Theme.current/FontStore.defaultat the root and overridable for a subtree via.theme(_:)/.font(_:)— those globals are the environment's defaults now, not the only way to set a value. -
ExpandstructDisclosure control: chevron + title in a rounded outline, content below when open.
-
ExpandStylestructColours and metrics for an
Expanddisclosure. -
FileDialogenumNative "open"/"save" file picker.
-
FileDragenumWhen a press on a
.onFileDragview becomes a drag. -
FileDragSourceViewstructRegisters the content's root layout box as something files can be dragged out of.
-
FlexDirectionenumThe main axis of a stack: the direction its children are laid out in.
-
FocusManagerenumWhich node currently receives keyboard input.
-
FocusRingStyleenumHow a focused text field draws its attention ring.
-
FontFallbackstructA fallback face named rather than loaded.
-
FontHintingenumHow a face is fitted to the pixel grid on its way to the atlas.
-
FontRasterFlagsstructHinting selection plus flags, packed the way
canvas::RasterFlagsreads it. Bits outside the ones defined here are refused by the renderer rather than ignored, so this type is the only supported way to build the word. -
FontStoreenumDefault UI font when
Textdoes not specify one. -
ForEachstructVariable-length children with explicit key identity. Fragment: children splice into the parent (inherits row/column). No
buildArray— plainforin builders is intentionally unsupported. -
ForEach3DstructOne group of 3D views per element of a collection.
-
FrameBuffersstructWhere the frame being built actually lives.
-
FrameCapacitystructElement counts for one frame — used both for "how much fits" and for "how much was written", because those two are compared constantly and one type makes the comparison a line rather than four.
-
FrameSchedulerenumWhen the frame loop should next wake up.
-
FrameSinkprotocolWhere a
DrawListwrites its frame, and who it hands the frame to. -
FrameTasksenumWork deferred until the current frame is on screen.
-
GlassEffectstructWhat
.glassEffect(refraction:rim:frost:magnification:)asked for. -
GLibPumpenumRuns GLib's work on the frame loop when there is some, and not otherwise.
-
GPUResourceHostprotocolWho names the things that live on a GPU.
-
GradientstructA two-stop linear ramp, for
.background(_:). -
HighlightRulestructA pattern-to-style mapping, applied per line.
-
HighlightSpanstructA styled character range within one line.
-
HorizontalAlignmentenumHorizontal placement of content inside a box larger than it.
-
HoverRegionActionstructA region's callback, as a
ViewStylefield. -
HoverStateenumWhich node the pointer is over.
-
HSplitViewstructTwo side-by-side panes with a draggable divider between them.
-
HStackstructLays its children out left to right.
-
ImagestructRaster image laid out as a Yoga leaf and drawn as a textured quad.
-
ImageContentModeenumHow the source bitmap maps into the layout box.
-
ImageStoreenumPath →
UIImagecache with a VRAM budget, async decode, and LRU eviction. -
ImageTurnenumA quarter turn applied to an image as it is decoded.
-
ImportedMenuenumTurning a flattened DBusMenu import into a
MenuModel. -
ImportedMenuItemstructOne row of a menu imported from another application.
-
InputEventstructOne polled event from
Editor.pollInputEvent. -
InputEventKindenumMirrors
canvas::InputEventKind. -
InvalidationLevelenumHow much of the pipeline a change actually invalidates.
-
KeyActionenumKey action (GLFW). Packaged as
FloatinInputEvent.xfor Key events. -
KeyCodeenumPhysical key codes (GLFW numbering).
-
KeyEventstructA key transition, decoded from the raw engine event.
-
KeyModsenumModifier bitfield (GLFW
mods). -
KeyShortcutstructKeyboard shortcut attached to a menu item.
-
KeyShortcutModifierstructModifier flags for
KeyShortcut, resolved to GLFW-styleKeyModsbits. -
LavaAppenumReusable window/input/invalidation/render loop, so a second LavaUI executable is a
main.swiftof a dozen lines instead of a copy ofHelloWorldApp's ~350. -
LavaResourcesenumSwiftPM resource bundle for LavaUI defaults (fonts).
-
LavaWindowclassOne 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.
-
LayeredViewstructA base view with a layer drawn behind it (
.underlay { }) or over it (.overlayLayer { }), covering its box and taking no layout space and no input. -
LayoutFramestructWhere one node landed in the last layout pass, in window coordinates.
-
LayoutHostclassOwns the retained root and runs Yoga layout.
-
LazyVGridstructA vertically scrolling grid that mounts only the cells the viewport shows.
-
LazyVStackstructA vertically scrolling list that mounts only the rows the viewport shows.
-
LineIndexstructWhere each logical line sits, in characters and (optionally) in bytes.
-
ListstructA scrolling column of rows, one of which is selected.
-
ListBehaviorstructHow a
Listanswers the pointer and the keyboard. -
MainQueueenumWork handed to the main thread from another one.
-
MarkstructA small stroked symbol — a close cross, a plus — drawn as lines.
-
MarkdownDocumentstructDisplay text with Markdown delimiters removed and styles mapped to character offsets in that display text.
-
MarkdownParserenumA deliberately compact Markdown parser for model responses.
-
MarkdownSpanstructA styled range of a
MarkdownDocument's display text. -
MarkdownSpanStyleenumSemantic styles emitted by the small Markdown parser.
-
MarkdownStylestructColours for a
MarkdownView. -
MarkdownViewstructRead-only Markdown rendered as one wrapping, character-styled text leaf.
-
Material3DstructHow a 3D object's faces are coloured.
-
MenustructOne top-level menu ("File", "Edit") or a nested submenu.
-
MenuActionTablestructClosures keyed by
MenuID. NotEquatable— compared only by key set in tests. -
MenuBackendKindenumWhich code path owns the menubar.
-
MenuBarstructRoot menubar description.
-
MenuBarBuilderenumBuilds the menus of a
MenuBar, withif,if/elseandforsupported. -
MenuBarStripstructTop-level titles in a fixed-height strip; each opens a dropdown overlay.
-
MenuBarStylestructHow a menubar strip and its dropdowns look.
-
MenuBuilderenumBuilds the rows of a
Menufrom items, separators and submenus, withif,if/elseandforsupported. Items built in a loop get distinct derived ids even when their titles repeat. -
MenuChromeRootstructWraps app content with an in-window menu strip when
modelis non-empty. -
MenuContentenumOne row of a menu description, before resolving.
-
MenuControllerclassOwns the last resolved menubar and dispatches activations.
-
MenuDropdownPanelstructPopup body for one top-level menu (items, separators, nested submenus).
-
MenuEntryenumOne row of a resolved menu.
-
MenuHostclassApp-level menubar owner: retains
MenuControllerand the active backend. -
MenuIconstructPicture for a top-level menu title.
-
MenuIDstructStable identity for a menu or menu item across rebuilds.
-
MenuItemstructA menu item in a menubar description: text, an action, and optionally an id, a shortcut and a checkmark.
-
MenuItemModelstructA resolved menu item.
-
MenuKeyModsenumModifier bitfield used by
KeyShortcut. Same values as GLFW / LavaUIKeyMods. -
MenuModelstructA resolved menubar: every menu, submenu and item with a final
MenuID, and no closures. What a backend draws or exports, and cheap to compare. -
MenuNodestructA resolved menu or submenu.
-
MenuSeparatorstructA separator line between groups of items.
-
MenuShortcutLabelenumHuman-readable shortcut for menu rows (Ctrl+S, etc.).
-
ModifiedViewstructA view wearing a style.
-
NodeIDstructStable identity for a retained node (lifetime of the node object).
-
NotificationInfostructOne live desktop notification, as the server holds it.
-
NotificationsclassDesktop notifications, from the panel's side: what is on screen right now, and what a click on it does.
-
OptionalViewstructNon-exhaustive
if— fragment (no flex wrapper). -
OverlayAlignmentenumContent drawn above everything, anchored to the view that presents it.
-
OverlayAnchortypealiasWhere composed overlay content sits inside its base view's box.
-
OverlayFramestructA detached overlay's resolved frame in window coordinates.
-
OverlayPlacementstructPlacement policy for a detached overlay.
-
OverlayPlacementContextstructGeometry available when placing a detached overlay.
-
OverlayStylestructStyling for the floating surface an overlay draws on.
-
OverlayViewstructcontent.overlay(isPresented:) { ... } -
PanelMenuclassThe global menu, from a panel's side: the focused window's menu, imported over DBusMenu and turned into the same
MenuModelan app's own menubar is. -
PerfCountersenumProcess-wide counters for work the frame pipeline did.
-
PixelFormatenumByte order of one pixel handed to
GPUResourceHost.uploadPixels, in memory order. -
Plane3DstructA flat rectangle in the x–y plane, facing +z.
-
PointerButtonenumWhich mouse button an event came from.
-
PointerCaptureenumRoutes pointer motion to whichever node started a drag.
-
PointerReleaseenumRuns something once, on the next release of the pointer.
-
PointerStateenumLast known window-space pointer position, updated on every
.mouseMove. -
PrimitiveMountprotocolRequired retained-tree construction for primitives. No default.
-
PrimitiveViewprotocolMarker for views that own content directly (
Body == Never). -
Reflection3DStylestructA mirror image of a 3D object in a horizontal floor, fading with distance.
-
Scene3DstructA viewport onto 3D content: cards, boxes and lights, drawn with depth, perspective and simple lighting, and optionally orbited with the pointer.
-
SceneAnimationFlagsstructWhich properties a
animateNodecall is stating. Mirrorscanvas::SceneAnimationFlags. -
SceneNodeFlagsstructBits in a
beginNodecommand'scolorfield. Mirrorscanvas::SceneNodeFlags. -
SceneNodeIdentityenumHands each view node the compact id the scene graph addresses it by.
-
SceneScrollFlagsstructBits in a
scrollNodecommand'scolorfield. Mirrorscanvas::SceneScrollFlags. -
ScreenCaptureenumA picture of the whole screen, for the one app that needs one.
-
ScreenshotBridgeenumWhere a screenshot comes from.
-
ScrollAxisenumThe direction a
ScrollViewscrolls. -
ScrollBridgeenumWhere a wheel notch goes when nothing in the view tree wanted it.
-
ScrollPositionclassWhere a
ScrollViewis — for an app that has to remember it and put it back: a folder list returning to the row it was opened from, or a tab whose list should not come back scrolled to where another tab left it. -
ScrollRouterenumWheel routing. The node under the pointer receives the wheel, focused or not — that is what every desktop app does, and it means scrolling a panel does not steal focus from a field.
-
ScrollViewstructA clipped, scrollable container.
-
Shadow3DStylestructA soft shadow under a 3D object, drawn on the screen rather than cast in the world.
-
ShapedGlyphstructA shaped glyph, plus which face has to draw it.
-
ShapedRunstructA shaped line plus the two mappings text editing needs.
-
SliderstructA draggable value in a range.
-
SliderStylestructColours and metrics for a
Slider. -
SoftWrapenumGreedy line breaking.
-
SpacerstructEmpty space that expands along its stack's main axis.
-
SpatialAnimationstructHow a 3D object moves to a new transform.
-
SpatialElementstructOne drawable object or light, with everything the modifiers have set on it. Built by
Plane3D,Box3Dand the light views; not constructed directly. -
SpatialGroup3DstructSeveral 3D views treated as one, so a modifier applies to all of them.
-
SpeakerMarkstructA speaker with sound waves that light with the volume, or a cross when muted — for volume buttons, drawn rather than taken from "🔊", for the same reasons as
TransportMark. -
SplitStylestructColours and metrics for a split divider.
-
StackAlignmentenum -
StackStylestruct -
StatestructA source of truth owned by a view, surviving that view being rebuilt.
-
StatefulLexerprotocolA lexer whose highlighting for line N depends on what came before it — the gap a per-line
HighlightRulelist cannot close: a block comment or a string that opens on one line and closes on another. -
StateStorageclassThe value that actually persists across view rebuilds.
-
StatusNotifierItemInfostructOne StatusNotifierItem as the panel sees it after a poll.
-
StatusNotifierTrayclassSystem tray host: owns
org.kde.StatusNotifierWatcherand surfaces items for a panel strip. -
SyntaxHighlighterstructApplies rules to a line and resolves overlaps by priority — or, if built from a
StatefulLexerinstead, threads that lexer's state line to line. -
TextstructText label primitive — Phase 4: Yoga measure via
canvas::Font+ layout cache. -
TextEditstructOne reversible edit: replace a range of the buffer with new text.
-
TextEditingStatestructSelection and caret for a single editable string.
-
TextFieldstructSingle-line editable text.
-
TextLayoutCacheclassKeyed on (text, font, quantized width, mode). Yoga measure is chatty; this is the main Phase 4 perf lever.
-
TextSearchstructFind-in-buffer: match locations plus which one is current.
-
ThemestructSemantic styling tokens.
-
TogglestructA boolean switch with an animated knob.
-
ToggleStylestructColours and metrics for a
Toggle. -
TooltipPlacementenumWhich side of its view a tooltip goes.
-
Transform3DstructWhere an object sits in the world, how it is turned and how big it is.
-
TransitionstructHow a view animates as it appears and disappears.
-
TransitionViewstructcontent.transition(...) -
TransportMarkstructMedia transport symbols — play, pause, previous, next — drawn as filled shapes, for the same reason
Markis not a character: "▶" and "⏮" are whatever the fallback font made of them, sat on its baseline, at a size and weight that never match each other, and "❚❚" is two letters. -
TupleViewstructHeterogeneous children from a multi-statement
@ViewBuilderblock. Fragment: expands into the parent flex container (not a Yoga box). -
UIFontclassSwift-facing typeface handle. Wraps
canvas::Font(FreeType + HarfBuzz). -
UIImageclassGPU texture handle for LavaUI
Imageviews. -
UndoStackstructUndo/redo history for a single buffer.
-
Vector3structA point, direction or per-axis scale in a
Scene3D's world. -
VerticalAlignmentenumVertical placement of content inside a box larger than it.
-
VideoBufferLayoutstructOne single-plane dma-buf, as its allocator describes it.
-
VideoFramestructA frame the renderer has: the texture to draw, and its size.
-
VideoFrameHostprotocolA host that can sample a client's dma-bufs. See the top of this file.
-
VideoTargetstructWhere a client must allocate its buffers: the renderer's GPU, and the layouts of
DRM_FORMAT_ABGR8888it can import. -
ViewprotocolA declarative UI description.
-
View3DprotocolContent of a
Scene3D: objects, lights and groups of them. -
View3DBuilderenumBuilds the content of a
Scene3D,ForEach3DorSpatialGroup3Dfrom 3D views, withif,if/elseandforsupported. -
ViewBuilderenumBuilds a view from the statements of a closure: several views become a
TupleView,ifbecomes anOptionalViewandif/elseanEitherView. -
ViewInvalidationenum"Something changed; do at least this much work again."
-
ViewStylestructStyle a modifier pushes onto a node.
-
VisualLayoutstructWhere each visual row begins and ends, in character offsets over the whole buffer.
-
VSplitViewstructTwo stacked panes with a draggable divider between them.
-
VStackstructLays its children out top to bottom.
-
WidgetProfilerenumPer-widget paint cost, opt-in via
LAVAUI_PROFILE=1. -
WindowBackdropenumWhat a window paints behind its content, before anything in the tree.
-
WindowBridgeenumWhere a window's chrome sends the verbs it cannot perform itself.
-
WindowControlButtonstructOne window control, for chrome that places them apart — a close button in one corner of an overlay and nothing else at all.
-
WindowControlKindenumWhich control. Three, because these are the three a window manager offers, and an app inventing a fourth would be inventing a window state nothing else in the desktop understands.
-
WindowControlsstructThe three controls as one cluster, in the order this desktop puts them.
-
WindowControlsStylestructColours and metrics for a control cluster.
-
WindowDragAreastructMakes a view's empty space a place the window can be dragged by.
-
WindowIDstructIdentifies one window of an
Editor. -
WindowScopeclassThe per-window half of LavaUI's framework state.