[][src]Struct sdl2::keyboard::KeyboardUtil

pub struct KeyboardUtil { /* fields omitted */ }

Keyboard utility functions. Access with Sdl::keyboard().

let sdl_context = sdl2::init().unwrap();

let focused = sdl_context.keyboard().focused_window_id().is_some();

Methods

impl KeyboardUtil[src]

pub fn focused_window_id(&self) -> Option<u32>[src]

Gets the id of the window which currently has keyboard focus.

pub fn mod_state(&self) -> Mod[src]

pub fn set_mod_state(&self, flags: Mod)[src]

Auto Trait Implementations

impl !RefUnwindSafe for KeyboardUtil

impl !Send for KeyboardUtil

impl !Sync for KeyboardUtil

impl Unpin for KeyboardUtil

impl UnwindSafe for KeyboardUtil

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.