pub struct ViewSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ViewSynchronousProxy
impl ViewSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ViewEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ViewEvent, 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 present(&self, view_token: ViewToken) -> Result<(), Error>
pub fn present(&self, view_token: ViewToken) -> Result<(), Error>
Provides the View with an attachment point to Scenic’s scene graph.
When Present()
is called the View’s implementation should create a
View resource within Scenic by providing it with the view_token
(using
a fuchsia.ui.gfx.CreateResourceCmd
and fuchsia.ui.gfx.ViewArgs
).
Then the implementation should attach its graphical content to the
newly-created View resource using a fuchsia.ui.gfx.AddChildCmd
.
If the implementation already owns a View resource (because Present()
had already been called before), then it should terminate the connection
with an error.
TODO(https://fxbug.dev/42098670): Allow re-parenting View
s with a new Present()
call.
Trait Implementations§
Source§impl Debug for ViewSynchronousProxy
impl Debug for ViewSynchronousProxy
Source§impl SynchronousProxy for ViewSynchronousProxy
impl SynchronousProxy for ViewSynchronousProxy
Source§type Protocol = ViewMarker
type Protocol = ViewMarker
Proxy
controls.