pub struct EmbeddedView { /* private fields */ }Expand description
A view the app added on a layer of its own (ViewEmbedder::add_view): the app gives it its
metrics and says whether it is in sight, as only the app knows where it placed the layer, and
the view lives as long as this handle: dropping it removes the view, as Flutter’s embedder API
removes one with RemoveView and Android’s SurfaceControlViewHost with release.
Implementations§
Source§impl EmbeddedView
impl EmbeddedView
Sourcepub fn new(
request_id: RequestId,
host: Box<dyn HostEmbeddedView>,
) -> EmbeddedView
pub fn new( request_id: RequestId, host: Box<dyn HostEmbeddedView>, ) -> EmbeddedView
The handle a host answers for a view the app added: the request the view arrives for, and the host’s side of the view, which the handle’s calls reach.
Sourcepub fn request_id(&self) -> RequestId
pub fn request_id(&self) -> RequestId
The request the view arrives for, as its View::request_id, through
EmbedderClient::view_added.
Sourcepub fn set_metrics(&self, metrics: ViewMetrics)
pub fn set_metrics(&self, metrics: ViewMetrics)
Flutter’s SendWindowMetricsEvent: the view takes metrics, which the framework hears of
through EmbedderClient::view_metrics_changed.
Sourcepub fn set_in_sight(&self, in_sight: bool)
pub fn set_in_sight(&self, in_sight: bool)
Whether the view is in sight, as only the app knows where it placed the view’s layer: its frames are held while it is not, as a window’s are while the window is minimized or occluded.