mcclim/luvcraft-metabar.lisp
--------------------------------------------------------------------- Luvcraft's existing knob and action vocabulary.
A shader source literal should rebuild once at release, not once per pointer-motion frame. Plain live values remain continuous.
--------------------------------------------------------------------- Luvcraft overlay lifecycle.
Application operations and value observation occur at the session's frame boundary, never in input dispatch or McCLIM repaint.
Author and publish the retained semantic revision before a game render pass opens. Overlay encoding below only replays its prepared commands.
Slide overlay away and restore world focus immediately.
A release clears a commit-style drag even if it landed outside.
Let the same click reach the world after dismissing the drawer.
Create, attach, slide in, and focus session's shared metabar.
(owner)Return OWNER's ordered group identities. Group identities remain owned by the application; symbols are sufficient when they are the vocabulary.
()The groups the knobs fall in: those in *KNOB-GROUP-ORDER* first, in that order, then the rest in order of first appearance.
(group)Every defined action, in definition order.
One live value: where it lives, what it measures, and -- by its class -- what SESSION must do after a change for the change to show.
A knob over a real, bounded and quantized.
A knob over a generalized boolean: on or off.
(control owner)Return CONTROL's cheap authored value. This runs during owner refresh, never inside repaint.
(control owner value)Format the already observed VALUE for CONTROL.
(control owner value)Return scalar VALUE's clamped position from 0 to 1.
(control owner)Return NIL for an immediate value, or a short semantic marker such as :REBUILD when realizing CONTROL involves deferred derived work.
Logical conjunction of tests and raw truth values.
(knob)Whether KNOB has been folded into a live pipeline's source, so that turning it rebuilds one. Answered for the live session.
(control owner)Return :CONTINUOUS or :COMMIT-ON-RELEASE. The latter previews a pointer drag but applies only its last value after release, which keeps expensive derived work out of motion-event bursts.
(control owner direction multiplier)At OWNER's frame boundary, move CONTROL by signed DIRECTION and MULTIPLIER.
(knob session direction &optional multiplier)Move KNOB by DIRECTION (+1 or -1) times MULTIPLIER steps in SESSION.
(control owner fraction)At OWNER's frame boundary, set scalar CONTROL from clamped FRACTION.
Compare compatible quantities and produce dimensionless values.
Addition over compatible quantities.
Multiplication and scalar scaling.
Subtraction or unary negation.
(knob value session)Set KNOB to VALUE, made fit, and realize it in SESSION. Returns the value actually set.
(control owner)At OWNER's frame boundary, toggle switch CONTROL.
(knob session)One named verb over a session.
(action session)A direct McCLIM surface mounted in the presentation HUD.
(overlay)Return where OVERLAY draws: :SCENE, :WORLD-PANEL, :VIEWMODEL, :HUD, or :NONE. Scene overlays inhabit world depth; viewmodels are first-person geometry above the world but below held items and the crosshair. World panels retain world projection and depth while drawing analytic application graphics at native…
(overlay)A native destination with a lifetime and frame clock.
(name-and-options &rest method-tail)Define a method whose complete dynamic extent is an ambient trace zone. The inferred name includes the generic function, non-T required specializers, and qualifiers. :ZONE and :VALUE have the same meaning as in ZDEFUN.
(overlay session pass surface-texture)Encode OVERLAY into SESSION's open scene PASS for SURFACE-TEXTURE.
An explicitly owned AVFrame.
(frame viewport-logical-extent slide)(overlay session)Publish any complete pending render state for OVERLAY at a frame boundary.
(frame)Logical disjunction of tests and raw truth values.
The minimum of compatible quantities.
The maximum of compatible quantities.
Test whether one compatible scalar is greater than another.
Test whether one compatible scalar is less than another.
Logical negation of one test or raw truth value.
(session overlay &key (release-p t))Detach OVERLAY at a frame boundary and optionally release it there. The no-release path is intentionally preserved for FUSE-LUVCRAFT-OVERLAY: that path may run inside a frame whose command stream still borrows OVERLAY.
(overlay)(session)(overlay session canvas event)Handle EVENT projected onto OVERLAY, returning true when consumed.
(overlay x y)(frame event local-x local-y)(session focus)Enter modal interaction with FOCUS, suspending ordinary player input. This is the common session transition behind using a world terminal or book, mounting a vehicle, and other interactions described by #8JCMA5.
(focus session canvas event)Handle EVENT while FOCUS owns SESSION's modal player interaction.
(frame event)(session)(session &key (title "luvcraft metabar"))(owner canvas context device &key (title "metabar"))(frame &key (errorp t))(session overlay)Attach OVERLAY at SESSION's next native frame boundary and return it. ADD consumes a newly offered OVERLAY on both success and terminal rejection. Once SESSION begins stopping, the rejected overlay is released exactly once before APPLICATION-ATTACHMENT-CLOSED is signalled.
(overlay)Release resources owned by an object attached to luvcraft.
(frame)(session)Slide SESSION's metabar of knobs in or out, returning true when one is available. LUVCRAFT/MCCLIM supplies the session method.
Luvcraft adapter for the shared retained-GPU metabar instrument.