Module host
Expand description
What a desktop does for windows shared live (super), the same in the
browser desktop and the session’s shell.
- The windows’ menus. Every window on a record gets “Share to
channel…” in its menu, or “Stop sharing in #x” once the sharing app
shares it (
offer); what the person chose becomes an ask for the sharing app (asks). A share ask brings the sharing app forward. - The live views. Each resource a window embeds runs as its own app on
the desktop’s own copy of the record, started once, tried again every
RETRYwhile it cannot show, and dropped once nothing embeds it (Views). Each is laid out at about a window’s size (VIEW) and drawn scaled into the place its window gave it (view_transform), clipped to what of it may show (placed). It takes no input: opening the resource is the embedding app’s own action.
What runs a view differs: the browser runs the app in its own page
(crate::widget::TileHost), the shell runs the app’s own process on a
window of its own that it never shows as one. Both are a LiveView.
Structs§
- Followed
- What
Views::followchanged. - Views
- The views a desktop runs for the windows that embed them, by the view.
Constants§
- RETRY
- How soon a view that could not show yet (its record still on its way) is tried again.
- SHARE_
ITEM - The window menu’s item that asks the sharing app to share the window.
- STOP_
ITEM - The window menu’s item that asks the sharing app to stop sharing it.
- VIEW
- The size an embedded view is laid out at before it is scaled into its place: about a window’s, so the app lays it out as its sharer sees it.
Traits§
- Live
View - What runs one embedded view.
Functions§
- asks
- What the person’s
chosenitems of the desktop’s own (by tab, asWindowSlots::take_host_actionshands them) ask of the sharing app, oldest first. AAsk::Sharebrings the sharing app forward, to ask where. - menu_
item - The item
window’s menu offers: “Stop sharing in #x” whilesharedholds it, else “Share to channel…”. - offer
- Put each of
windows’ share item in its menu, and take it out of the menus of the windows inoffered(the ones it stood in) that are no longer among them.offeredbecomes the windows it stands in now. - placed
- Where
embed, declared in its window’s layout coordinates, is drawn on a desktop that shows the window’s content atoriginwithincontent: its place, and what of it may show. - view_
transform - The transform that draws a view laid out at
VIEW’s size from the origin intorect, throughtransform: as large as fits, keeping its proportions, fromrect’s corner.