pub struct InputProcessor { /* private fields */ }Expand description
Processes keyboard input into actions
Implementations§
Source§impl InputProcessor
impl InputProcessor
Sourcepub fn new(activation_delay_ms: u64) -> Self
pub fn new(activation_delay_ms: u64) -> Self
Creates a new input processor with the given activation delay.
Sourcepub fn buffer(&self) -> &InputBuffer
pub fn buffer(&self) -> &InputBuffer
Returns the current input buffer.
Sourcepub fn input_string(&self) -> String
pub fn input_string(&self) -> String
Returns the input as a string.
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Returns true if there is a pending match.
Sourcepub fn timeout_elapsed(&self) -> bool
pub fn timeout_elapsed(&self) -> bool
Returns true if timeout has elapsed for pending match.
Sourcepub fn check_timeout(&mut self) -> Option<(usize, WindowId)>
pub fn check_timeout(&mut self) -> Option<(usize, WindowId)>
Returns the pending activation if timeout has elapsed.
Sourcepub fn process_key<'a>(
&mut self,
key: Keysym,
matcher: &HintMatcher<'a>,
has_launch_config: impl Fn(&str) -> bool,
) -> InputAction
pub fn process_key<'a>( &mut self, key: Keysym, matcher: &HintMatcher<'a>, has_launch_config: impl Fn(&str) -> bool, ) -> InputAction
Processes a key press and returns the resulting action.
Auto Trait Implementations§
impl Freeze for InputProcessor
impl RefUnwindSafe for InputProcessor
impl Send for InputProcessor
impl Sync for InputProcessor
impl Unpin for InputProcessor
impl UnwindSafe for InputProcessor
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.