pub struct SurfaceManager { /* private fields */ }Expand description
One window’s stateful surface driver.
Implementations§
Source§impl SurfaceManager
impl SurfaceManager
Sourcepub fn new(width: f64) -> Self
pub fn new(width: f64) -> Self
New manager for a container of width logical px, default policy.
pub fn with_policy(width: f64, policy: Policy) -> Self
pub fn graph(&self) -> &SurfaceGraph
pub fn size_class(&self) -> SizeClass
pub fn width(&self) -> f64
Sourcepub fn set_width(&mut self, width: f64) -> bool
pub fn set_width(&mut self, width: f64) -> bool
Update the container width. Returns true if the SizeClass changed
after hysteresis, i.e. when the skin must re-derive its layout.
Report the platform’s live sidebar allocation. Mobile/custom hosts use zero; desktop shells update this during resize and collapse.
Sourcepub fn open(&mut self, request: Surface) -> OpenOutcome
pub fn open(&mut self, request: Surface) -> OpenOutcome
Open (or replace by id) a surface through the arbiter at the current size. Always leaves the graph valid; returns the structured decision.
pub fn close(&mut self, id: &str) -> CloseOutcome
pub fn replace_mains( &mut self, mains: Vec<(Surface, SurfacePresentation)>, ) -> Result<SurfaceSwitcherSnapshot, ReplaceMainsError>
pub fn open_main( &mut self, surface: Surface, presentation: SurfacePresentation, ) -> Result<SurfaceSwitcherSnapshot, ReplaceMainsError>
pub fn close_other_mains(&mut self, keeping: &str) -> Vec<SurfaceId> ⓘ
pub fn close_mains_after(&mut self, id: &str) -> Vec<SurfaceId> ⓘ
pub fn set_presentation( &mut self, id: &str, presentation: SurfacePresentation, ) -> bool
pub fn update_automatic_title(&mut self, id: &str, title: Option<&str>) -> bool
pub fn rename(&mut self, id: &str, title: Option<&str>) -> bool
pub fn switcher_snapshot(&self) -> SurfaceSwitcherSnapshot
pub fn set_active_main(&mut self, id: &str) -> bool
pub fn set_focus(&mut self, id: &str) -> bool
pub fn show(&mut self, id: &str) -> bool
Sourcepub fn set_slot_collapsed(&mut self, kind: SlotKind, collapsed: bool) -> bool
pub fn set_slot_collapsed(&mut self, kind: SlotKind, collapsed: bool) -> bool
Collapse or restore a whole aside slot. Collapsing is the shell’s “put this region away” gesture: nothing closes, so the overlay fallback for a child of the slot is dropped along with the dock.
pub fn hide(&mut self, id: &str) -> bool
Sourcepub fn derive(&self) -> DerivedLayout
pub fn derive(&self) -> DerivedLayout
Derive the platform-agnostic layout output at the current size.
Sourcepub fn presentation_plan(&self) -> LayoutPresentationPlan
pub fn presentation_plan(&self) -> LayoutPresentationPlan
Build the stable, skin-bindable LayoutPresentationPlan at the current
size — the renderable contract platforms reconcile against. Slot
admission respects both the size-class ceiling and the physical fit at
the current width (§3.3).