pub struct FocuserProxy { /* private fields */ }
Implementations§
Source§impl FocuserProxy
impl FocuserProxy
Sourcepub fn take_event_stream(&self) -> FocuserEventStream
pub fn take_event_stream(&self) -> FocuserEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn request_focus(
&self,
view_ref: ViewRef,
) -> QueryResponseFut<FocuserRequestFocusResult, DefaultFuchsiaResourceDialect>
pub fn request_focus( &self, view_ref: ViewRef, ) -> QueryResponseFut<FocuserRequestFocusResult, DefaultFuchsiaResourceDialect>
Asks the server to transfer focus to the View specified by view_ref
,
with the authority of the requestor ViewRef. Such a request may be
honored or denied.
If the request was honored, and it triggers a focus change, a FocusEvent (with focused=true) is issued to the newly-focused View, and a FocusEvent (with focused=false) is issued to the previous View.
The result callback indicates that the request was received and honored. It does not guarantee that the requested View actually received a FocusEvent in time.
The request may be denied for many reasons, for example:
- if
view_ref
is invalid - if there is no View backed by
view_ref
- if there is no requestor ViewRef accessible to Focuser
- if the requestor ViewRef lacks authority over
view_ref
’s View - if
view_ref
’s View is not hittable or may not receive focus etc. A denied request is indicated with a Error.
Sourcepub fn set_auto_focus(
&self,
payload: FocuserSetAutoFocusRequest,
) -> QueryResponseFut<FocuserSetAutoFocusResult, DefaultFuchsiaResourceDialect>
pub fn set_auto_focus( &self, payload: FocuserSetAutoFocusRequest, ) -> QueryResponseFut<FocuserSetAutoFocusResult, DefaultFuchsiaResourceDialect>
Sets the auto focus target to the View specified by view_ref
.
To unset the target, pass in an empty table.
If a target has been set, then whenever the caller’s View would receive focus, an attempt is made to transfer focus immediately to the target instead. If the target is unfocusable, the new target is the first focusable ancestor of the target instead. Setting an auto focus target places no limitations on simultaneous use of RequestFocus().
An auto focus target is “valid” only while it is a descendant of the caller’s View in the ViewTree. Specifying an invalid auto focus target is allowed, since it may become valid later. It is the client’s responsibility to ensure the target is a valid receiver of auto focus.
If the target is invalid when the auto focus behavior would trigger, then the attempt to move focus will silently fail and focus will remain with the caller’s View. A target may become invalid and then become valid again any number of times; auto focus will continue to function whenever the target is in a valid state, and will continue to ignore the target while it’s in an invalid state.
If the focus would by some further automatic mechanism return to the caller’s View (e.g. if the target is unfocusable), then focus will remain with the caller’s View.
AutoFocusError is currently never returned, and is reserved for possible future use.
Trait Implementations§
Source§impl Clone for FocuserProxy
impl Clone for FocuserProxy
Source§fn clone(&self) -> FocuserProxy
fn clone(&self) -> FocuserProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FocuserProxy
impl Debug for FocuserProxy
Source§impl FocuserProxyInterface for FocuserProxy
impl FocuserProxyInterface for FocuserProxy
type RequestFocusResponseFut = QueryResponseFut<Result<(), Error>>
type SetAutoFocusResponseFut = QueryResponseFut<Result<(), AutoFocusError>>
fn request_focus(&self, view_ref: ViewRef) -> Self::RequestFocusResponseFut
fn set_auto_focus( &self, payload: FocuserSetAutoFocusRequest, ) -> Self::SetAutoFocusResponseFut
Source§impl Proxy for FocuserProxy
impl Proxy for FocuserProxy
Source§type Protocol = FocuserMarker
type Protocol = FocuserMarker
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 FocuserProxy
impl !RefUnwindSafe for FocuserProxy
impl Send for FocuserProxy
impl Sync for FocuserProxy
impl Unpin for FocuserProxy
impl !UnwindSafe for FocuserProxy
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
)