pub struct Context { /* private fields */ }Expand description
HID context.
Implementations§
Source§impl Context
impl Context
Sourcepub fn new(ptr: *mut Context) -> Self
pub fn new(ptr: *mut Context) -> Self
Creates a new Context from the given pointer.
You probably want dmengine::get_hid_context() instead.
Sourcepub fn get_keyboard(&self, index: u8) -> Option<Keyboard>
pub fn get_keyboard(&self, index: u8) -> Option<Keyboard>
Returns the keyboard at the given index if it exists.
Sourcepub fn get_mouse(&self, index: u8) -> Option<Mouse>
pub fn get_mouse(&self, index: u8) -> Option<Mouse>
Returns the mouse at the given index if it exists.
Sourcepub fn get_touch_device(&self, index: u8) -> Option<TouchDevice>
pub fn get_touch_device(&self, index: u8) -> Option<TouchDevice>
Returns the touch device at the given index if it exists.
Sourcepub fn get_gamepad(&self, index: u8) -> Option<Gamepad>
pub fn get_gamepad(&self, index: u8) -> Option<Gamepad>
Returns the gamepad at the given index if it exists.
Sourcepub fn add_keyboard_char(&self, char: i32)
pub fn add_keyboard_char(&self, char: i32)
Adds the given character as text input.
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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