Expand description
The surface the host gives the application, and what the application may ask of it.
On the web that is the canvas inside its page; on desktop the window’s client area; on mobile the activity’s content view. An application that wants to lay out against it — or, on a host that allows it, ask for a different size — reads observable state here instead of reaching for a platform API and a resize callback of its own.
Structs§
- Host
Surface Observer - Keeps a host-surface observer registered until it is dropped.
- Host
Surface Size - The size of the host surface, in logical pixels, with the scale the host renders it at.
Enums§
- Resize
Refused - Why a resize request was refused.
Traits§
- Host
Surface - What an application may ask of the host’s surface.
Functions§
- clear_
platform_ host_ surface - Removes the installed host surface (tests and teardown).
- host_
surface - The installed host surface, or one that accepts no resize requests.
- host_
surface_ can_ resize - Whether this host lets the application choose its surface size.
- host_
surface_ size - The size the host last reported.
- observe_
host_ surface_ size - Registers
observerfor host-surface size changes. Applications collectrememberHostSurfaceSizeinstead of calling this. - publish_
host_ surface_ size - Publishes a new host-surface size. Platform backends call this whenever the host resizes the surface.
- remember
Host Surface Size - The host surface’s size, observed for as long as this call stays in the composition.
- request_
host_ surface_ size - Asks the host for a different surface size.
- set_
platform_ host_ surface - Installs the platform host surface.
Type Aliases§
- Host
Surface Ref - Shared handle to a
HostSurface.