pub struct ManagerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ManagerSynchronousProxy
impl ManagerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ManagerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ManagerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn set_root_view(
&self,
view_provider: ClientEnd<ViewProviderMarker>,
___deadline: MonotonicInstant,
) -> Result<ManagerSetRootViewResult, Error>
pub fn set_root_view( &self, view_provider: ClientEnd<ViewProviderMarker>, ___deadline: MonotonicInstant, ) -> Result<ManagerSetRootViewResult, Error>
Sets the root view of the scene graph to the view provided by view_provider
.
Subsequent calls will replace the view tree with the one starting at the new root view.
The root view is shared between all clients of Manager
.
Returns a fuchsia.ui.views.ViewRef
referencing the view provided by view_provider
.
If this ViewRef cannot be returned (e.g. in Flatland case, if the ViewCreationToken is
dropped before it is given to Scenic), then the connection to the Manager
will be closed.
The client can expect that:
(1) Its root view will be focused once it’s connected to the scene. (2) The logical size and position of its root view match the display.
TODO(https://fxbug.dev/42055565): Fix this situation. NOTE: the ViewRef is only returned after the child view is connected to the scene graph. Therefore, the caller must guarantee that the child view will eventually be connected before waiting for the ViewRef; if the child view doesn’t connect, it is possible to deadlock.
Sourcepub fn present_root_view_legacy(
&self,
view_holder_token: ViewHolderToken,
view_ref: ViewRef,
___deadline: MonotonicInstant,
) -> Result<ManagerPresentRootViewLegacyResult, Error>
pub fn present_root_view_legacy( &self, view_holder_token: ViewHolderToken, view_ref: ViewRef, ___deadline: MonotonicInstant, ) -> Result<ManagerPresentRootViewLegacyResult, Error>
Presents a view tree to the display, via the provided view holder token.
This call will present the view using the legacy GFX API.
Subsequent calls will replace the view tree with the one starting at the new root viewport.
The root view is shared between all clients of Manager
.
The client can expect that:
(1) Its root view will be focused once it’s connected to the scene. (2) The logical size and position of its root view match the display.
TODO(https://fxbug.dev/42055565): Fix this situation. NOTE: this method returns only after the child view is connected to the scene graph. Therefore, the caller must guarantee that the child view will eventually be connected before waiting for the return; if the child view doesn’t connect, it is possible to deadlock.
Sourcepub fn present_root_view(
&self,
viewport_creation_token: ViewportCreationToken,
___deadline: MonotonicInstant,
) -> Result<ManagerPresentRootViewResult, Error>
pub fn present_root_view( &self, viewport_creation_token: ViewportCreationToken, ___deadline: MonotonicInstant, ) -> Result<ManagerPresentRootViewResult, Error>
Presents a view tree to the display, via the provided viewport token.
Subsequent calls will replace the view tree with the one starting at the new root viewport.
The root view is shared between all clients of Manager
.
The client can expect that:
(1) Its root view will be focused once it’s connected to the scene. (2) The logical size and position of its root view match the display.
TODO(https://fxbug.dev/42055565): Fix this situation. NOTE: this method returns only after the child view is connected to the scene graph. Therefore, the caller must guarantee that the child view will eventually be connected before waiting for the return; if the child view doesn’t connect, it is possible to deadlock.
Trait Implementations§
Source§impl Debug for ManagerSynchronousProxy
impl Debug for ManagerSynchronousProxy
Source§impl SynchronousProxy for ManagerSynchronousProxy
impl SynchronousProxy for ManagerSynchronousProxy
Source§type Proxy = ManagerProxy
type Proxy = ManagerProxy
Source§type Protocol = ManagerMarker
type Protocol = ManagerMarker
Proxy
controls.