pub struct Xkb { /* private fields */ }Expand description
An xkbcommon context, keymap, and state, that can be sent to another thread, but should not have additional ref-counts kept on one thread.
Implementations§
Source§impl Xkb
impl Xkb
Sourcepub fn active_layout(&self) -> Layout
pub fn active_layout(&self) -> Layout
Get the active layout of the keyboard.
Sourcepub fn layout_name(&self, layout: Layout) -> &str
pub fn layout_name(&self, layout: Layout) -> &str
Get the human readable name for the layout.
Sourcepub fn layouts(&self) -> impl Iterator<Item = Layout>
pub fn layouts(&self) -> impl Iterator<Item = Layout>
Iterate over layouts present in the keymap.
Sourcepub fn raw_syms_for_key_in_layout(
&self,
keycode: Keycode,
layout: Layout,
) -> &[Keysym]
pub fn raw_syms_for_key_in_layout( &self, keycode: Keycode, layout: Layout, ) -> &[Keysym]
Returns the syms for the underlying keycode without any modifications by the current keymap state applied.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Xkb
impl RefUnwindSafe for Xkb
impl !Sync for Xkb
impl Unpin for Xkb
impl UnwindSafe for Xkb
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.