pub enum KeyboardListenerRequest {
OnKeyEvent {
event: KeyEvent,
responder: KeyboardListenerOnKeyEventResponder,
},
}
Expand description
Client should implement this protocol to get notified of key events.
Variants§
OnKeyEvent
Called when a key event takes place, such as key press or release.
Protocol implementers must respond to acknowledge the event by returning Status in a timely manner, i.e. not introducing significant delays to the input pipeline (typically 10s of milliseconds).
Returning NOT_HANDLED
means the event may be offered to other
clients of other related APIs.
Clients that do not acknowledge their events will eventually be disconnected.
Notification is only dispatched to a view that has focus. No other views,
including parents or children, will get notified specifically via OnKeyEvent
.
Implementations§
Source§impl KeyboardListenerRequest
impl KeyboardListenerRequest
pub fn into_on_key_event( self, ) -> Option<(KeyEvent, KeyboardListenerOnKeyEventResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyboardListenerRequest
impl !RefUnwindSafe for KeyboardListenerRequest
impl Send for KeyboardListenerRequest
impl Sync for KeyboardListenerRequest
impl Unpin for KeyboardListenerRequest
impl !UnwindSafe for KeyboardListenerRequest
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
Mutably borrows from an owned value. Read more