Module surface_peer
Expand description
The actions socket a session hands a surface app is a descriptor of a native process: a browser page is no surface, and no session places its window. A surface app’s actions on the session that places its window.
The desktop’s own surfaces (the bar, the desk, the panels, a sheet) are
ordinary apps run as processes of their own. Besides the Wayland socket
their window becomes, the session hands each one end of a connection on
which the two speak the action protocol every app and its host already
speak (tilo_actions::remote::RemoteActionMessage): the session serves
the actions the desktop publishes, and the surface lists, runs and
reports its own. There is no other message and no surface-only kind: what
a surface does, and what it is asked to do, is actions.
One message is one frame of that protocol ([RemoteActionFrame]), framed
the way the collaboration wire frames the same frames ([FRAMING]), so a
surface’s connection is its host connection in all but the descriptor it
arrives on.
A surface process finds the socket in
ACTIONS_FD_ENV; without it the
app is an ordinary app with no host in reach, as before.
What a surface reads of the session is no action: it reads what the
session publishes through the session’s own services, as any app does
(crate::surface_services).
Structs§
- Surface
Peer - The app’s end of the connection to its session.
Constants§
- FRAMING
- Both directions’ framing: one length-prefixed frame per message, as the collaboration wire frames the same protocol’s frames.
Functions§
- publish
- Publish what this surface offers now, as its frame ends: the resources the app draws from, with the actions they carry. Nothing happens in a process that is not a surface.