pub enum ViewCommand {
Create {
slot_id: u64,
view_type: String,
params_json: String,
interactive: bool,
},
Update {
slot_id: u64,
rect: Rect,
clip: Option<Rect>,
visible: bool,
shields: Vec<Rect>,
},
UpdateParams {
slot_id: u64,
params_json: String,
},
Dispose {
slot_id: u64,
},
}Expand description
One native-sibling-compositor instruction — the differ’s whole output
vocabulary. Clone + PartialEq + Debug so a golden
test can assert an exact command sequence.
Variants§
Create
Create a new native view for slot_id. Always immediately followed,
in the same batch, by an ViewCommand::Update placing it.
Fields
Update
Place/resize/clip/show-or-hide an already-created slot. Logical px,
absolute window coordinates (mirroring PlatformViewFrame) — the
receiving shell scales to physical px at its own FFI boundary.
Fields
UpdateParams
params_json changed (params_generation advanced) with no
necessary rect/clip/visible change — a separate command so a shell
doesn’t have to re-place a view just to hand it new creation params.
Dispose
Tear down a slot’s native view entirely. A slot_id reused after this
(the same numeric id reappearing in a later ingest) is treated as
brand-new — see the module docs’ Widget teardown detection.