pub enum ParentViewportWatcherRequest {
GetLayout {
responder: ParentViewportWatcherGetLayoutResponder,
},
GetStatus {
responder: ParentViewportWatcherGetStatusResponder,
},
}
Expand description
A protocol that provides information about the parent Viewport attached to a Flatland instance’s
sole View. Although Flatland instances can have at most one view, it is possible to have
multiple ParentViewportWatchers during the brief transition period when replacing the instance’s
View with another, e.g. via [CreateView
]. During this period, certain updates may be
duplicated and sent to each ParentViewportWatcher connection.
A ParentViewportWatcher will remain connected as long as the corresponding parent Viewport exists; the connection will also be closed if the parents’s ViewportCreationToken is dropped without using it to create a Viewport.
Variants§
GetLayout
A hanging get for receiving layout information. Clients may receive layout information
before the ParentViewportWatcher operation has been presented. This allows children to
layout their content before their first call to [Present
]. In transition cases where two
ParentViewportWatcher channels exist at the same time, both protocol instances will be
receiving different layout information.
This hanging get will only fire when the LayoutInfo is different than the previously returned LayoutInfo. Note that, since LayoutInfo is a table, only some fields may have changed.
It is invalid to call GetLayout
while a previous call is still pending. Doing so will
cause both this channel and the Flatland channel that handed out ParentViewportWatcher to be
closed.
Fields
responder: ParentViewportWatcherGetLayoutResponder
GetStatus
A hanging get for receiving the status of the parent Viewport. This provides global connectivity information to the child.
This hanging get will only fire when the ParentViewportStatus is different than the previously returned ParentViewportStatus.
It is invalid to call GetStatus
while a previous call is still pending. Doing so will
cause both this channel and the Flatland channel that handed out ParentViewportWatcher to be
closed.
Fields
responder: ParentViewportWatcherGetStatusResponder
Implementations§
Source§impl ParentViewportWatcherRequest
impl ParentViewportWatcherRequest
pub fn into_get_layout(self) -> Option<ParentViewportWatcherGetLayoutResponder>
pub fn into_get_status(self) -> Option<ParentViewportWatcherGetStatusResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL