AUDIO
Source snapshot · 12 October 2026

Native embedded-editor prototype

Native backend contract

The C++ header retains local-file creation for existing consumers and adds ravet_web_create_html with copied buffer snapshots. Every call/callback belongs on the host UI thread (the Cocoa main thread on macOS). Windows/Linux bind their UI-thread check to the first successful creation; the caller must choose the correct thread. Local-file navigation stays under its asset root; inline HTML permits about:blank. Callback message JSON is bounded to 65,536 bytes; inline page input is bounded to 1 MiB. Consumers of the raw C++ API own pointer validity and callback lifetime. The Rust wrapper supplies those contracts for its owned view and context.

Opaque layer backing is configurable through finite clamped RGB values. The WebKit under-page colour requires macOS 12. A 50 ms timer delivers validated JSON objects/arrays through window.ravetUpdate. Identical strings are suppressed after successful delivery; changed snapshots coalesce while one JavaScript evaluation is in flight. Navigation clears the delivered snapshot. DOM updates also avoid rewriting unchanged properties. No callback deadline or native heap accounting is implied by this control-thread machinery.

Cocoa/WebKit and Linux/WebKitGTK disable browser context menus by default for both local-file and inline HTML editors, including child frames and reloads. A document-start listener cancels the contextmenu default action without stopping event propagation or cancelling mouse/pointer events. Controls can still implement right-click reset and custom menus; their contextmenu handlers receive an event with defaultPrevented already set. This also applies to standalone windows using the shared WebKit backend. There is currently no native option to restore the browser menu; Windows/WebView2 retains its existing policy. The hidden macOS context-menu probe checks synthetic DOM event cancellation, reset/custom-handler delivery, left-click preservation and child-frame/reload coverage for both creation paths; Linux runtime evidence for this policy is pending.

On macOS, editor web views accept the activating mouse press. A drag that begins in an inactive editor window reaches the page on that first press, without a separate click to focus it. The native AppKit first-mouse probe checks begin, change and end delivery while another owned window is key. Host-specific window routing still needs actual DAW validation. This probe briefly shows two owned windows and requires an interactive Cocoa desktop session.