pub struct XkbState {
state: NonNull<xkb_state>,
modifiers: ModifiersState,
}
Fields§
§state: NonNull<xkb_state>
§modifiers: ModifiersState
Implementations§
source§impl XkbState
impl XkbState
pub fn new_wayland(keymap: &XkbKeymap) -> Option<Self>
pub fn new_x11(xcb: *mut xcb_connection_t, keymap: &XkbKeymap) -> Option<Self>
fn new_inner(state: NonNull<xkb_state>) -> Self
pub fn get_one_sym_raw(&mut self, keycode: xkb_keycode_t) -> xkb_keysym_t
pub fn layout(&mut self, key: xkb_keycode_t) -> xkb_layout_index_t
pub fn depressed_modifiers(&mut self) -> xkb_mod_mask_t
pub fn latched_modifiers(&mut self) -> xkb_mod_mask_t
pub fn locked_modifiers(&mut self) -> xkb_mod_mask_t
pub fn get_utf8_raw( &mut self, keycode: xkb_keycode_t, scratch_buffer: &mut Vec<u8>, ) -> Option<SmolStr>
pub fn modifiers(&self) -> ModifiersState
pub fn update_modifiers( &mut self, mods_depressed: u32, mods_latched: u32, mods_locked: u32, depressed_group: u32, latched_group: u32, locked_group: u32, )
sourcefn reload_modifiers(&mut self)
fn reload_modifiers(&mut self)
Reload the modifiers.
sourcefn mod_name_is_active(&mut self, name: &[u8]) -> bool
fn mod_name_is_active(&mut self, name: &[u8]) -> bool
Check if the modifier is active within xkb.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XkbState
impl RefUnwindSafe for XkbState
impl !Send for XkbState
impl !Sync for XkbState
impl Unpin for XkbState
impl UnwindSafe for XkbState
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.