pub struct ControllerSynchronousProxy { /* private fields */ }
Implementations§
source§impl ControllerSynchronousProxy
impl ControllerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<ControllerEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<ControllerEvent, 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 notify(
&self,
view_ref: &mut ViewRef,
___deadline: Time
) -> Result<(), Error>
pub fn notify( &self, view_ref: &mut ViewRef, ___deadline: Time ) -> Result<(), Error>
Informs the implementer of Controller
that further keyboard
data should be routed to the keystroke/text consumer
associated with view_ref
.
Notes
- The callee should monitor the provided
ViewRef
for aZX_EVENTPAIR_PEER_CLOSED
signal (see documentation forfuchsia.ui.views.ViewRefControl
). - When the
ViewRef
receivesZX_EVENTPAIR_PEER_CLOSED
, the callee should stop delivering keystroke/text to the consumer associated withview_ref
. - The caller should wait for each call to be acknowledged before calling again, to avoid queueing large numbers of of updates.