class ParentViewportWatcher

Defined at line 8793 of file fidling/gen/sdk/fidl/fuchsia.ui.composition/fuchsia.ui.composition/hlcpp/fuchsia/ui/composition/cpp/fidl.h

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.

Public Methods

void ~ParentViewportWatcher ()
void GetLayout (GetLayoutCallback callback)

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.

void GetStatus (GetStatusCallback callback)

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.