Skip to main content

Module host

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 RETRY while 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::follow changed.
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§

LiveView
What runs one embedded view.

Functions§

asks
What the person’s chosen items of the desktop’s own (by tab, as WindowSlots::take_host_actions hands them) ask of the sharing app, oldest first. A Ask::Share brings the sharing app forward, to ask where.
menu_item
The item window’s menu offers: “Stop sharing in #x” while shared holds 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 in offered (the ones it stood in) that are no longer among them. offered becomes 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 at origin within content: 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 into rect, through transform: as large as fits, keeping its proportions, from rect’s corner.