Skip to main content

Crate ferroui_inspect

Crate ferroui_inspect 

Source
Expand description

Transport-independent inspection of live FerroUI objects, shared by the MCP server (ferroui-mcp, the JSON tools of execute) and the Chrome DevTools Protocol endpoint (ferroui-devtools, the per-window target::Target). Both use one Inspector per UI thread (Inspector::shared): one ID space, one set of roots and the same primitives for properties, styles, selectors, layout boxes, screenshots and highlights. All methods run on the UI thread. IDs are weak, stable for an object’s lifetime, never reused, and start at 2 (0 and 1 are left to protocols, such as CDP’s document node).

Modules§

target
One top level (a window or a popup) as the target of the Chrome DevTools Protocol endpoint (ferroui-devtools). A target is a view of the shared Inspector: the node IDs, selectors, properties, styles, layout boxes, screenshots and highlights are the inspector’s; the target keeps its root, the tree it shows (visual or logical), which nodes are in that tree, and its highlight. Every operation checks that the node is in the current tree, so a control that has been detached cannot be driven through its ID until it is attached again. UI thread only.

Structs§

BoxModel
The layout boxes of a visual, in the coordinates of another one.
Highlight
A highlight adorner of Inspector::highlight; dropping it removes the adorner.
Inspector
LogCapture
The process-wide capture. Entries are recorded only while a guard of LogCapture::install is alive; the ring keeps the last 1024.
LogEntry
A captured log event. The template keeps its placeholders; the values are kept apart.
LogGuard
Keeps the tee installed. The previous sink is restored when the last guard is dropped, if the tee is still the current sink.
Permissions
Mutating operations are disabled unless explicitly enabled by the application.
Png
PropertyInfo
A registered or attached property of an object, its effective value and where it comes from.
StyleFrame
A frame of the value store that applies to an object: a style, a control theme, a template or the local values.

Enums§

TreeKind
The tree that children are read from.

Functions§

display_value
The text of a value as the framework displays it.
execute
Executes an MCP tool on the shared inspector of this thread (Inspector::shared). The inspector is held only while it reads or changes the objects: an input tool resolves its node, releases the inspector and then delivers the input, so that the handlers of the application, which may run a nested dispatcher frame, can reach the inspector again (through another server, for example).
property_name
The name of the property as the tools and selectors use it: Owner.Name when attached.
tools
validate

Type Aliases§

InspectResult
NodeId