pub struct ManagerProxy { /* private fields */ }
Implementations§
Source§impl ManagerProxy
impl ManagerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.session.scene/Manager.
Sourcepub fn take_event_stream(&self) -> ManagerEventStream
pub fn take_event_stream(&self) -> ManagerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn set_root_view(
&self,
view_provider: ClientEnd<ViewProviderMarker>,
) -> QueryResponseFut<ManagerSetRootViewResult, DefaultFuchsiaResourceDialect>
pub fn set_root_view( &self, view_provider: ClientEnd<ViewProviderMarker>, ) -> QueryResponseFut<ManagerSetRootViewResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<ManagerPresentRootViewLegacyResult, DefaultFuchsiaResourceDialect>
pub fn present_root_view_legacy( &self, view_holder_token: ViewHolderToken, view_ref: ViewRef, ) -> QueryResponseFut<ManagerPresentRootViewLegacyResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<ManagerPresentRootViewResult, DefaultFuchsiaResourceDialect>
pub fn present_root_view( &self, viewport_creation_token: ViewportCreationToken, ) -> QueryResponseFut<ManagerPresentRootViewResult, DefaultFuchsiaResourceDialect>
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 Clone for ManagerProxy
impl Clone for ManagerProxy
Source§fn clone(&self) -> ManagerProxy
fn clone(&self) -> ManagerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ManagerProxy
impl Debug for ManagerProxy
Source§impl ManagerProxyInterface for ManagerProxy
impl ManagerProxyInterface for ManagerProxy
type SetRootViewResponseFut = QueryResponseFut<Result<ViewRef, PresentRootViewError>>
type PresentRootViewLegacyResponseFut = QueryResponseFut<Result<(), PresentRootViewError>>
type PresentRootViewResponseFut = QueryResponseFut<Result<(), PresentRootViewError>>
fn set_root_view( &self, view_provider: ClientEnd<ViewProviderMarker>, ) -> Self::SetRootViewResponseFut
fn present_root_view_legacy( &self, view_holder_token: ViewHolderToken, view_ref: ViewRef, ) -> Self::PresentRootViewLegacyResponseFut
fn present_root_view( &self, viewport_creation_token: ViewportCreationToken, ) -> Self::PresentRootViewResponseFut
Source§impl Proxy for ManagerProxy
impl Proxy for ManagerProxy
Source§type Protocol = ManagerMarker
type Protocol = ManagerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ManagerProxy
impl !RefUnwindSafe for ManagerProxy
impl Send for ManagerProxy
impl Sync for ManagerProxy
impl Unpin for ManagerProxy
impl !UnwindSafe for ManagerProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)