Struct fermium::events::SDL_KeyboardEvent
source · #[repr(C)]pub struct SDL_KeyboardEvent {
pub type_: SDL_EventType,
pub timestamp: u32,
pub windowID: u32,
pub state: u8,
pub repeat: u8,
pub padding2: u8,
pub padding3: u8,
pub keysym: SDL_Keysym,
}
Expand description
Keyboard button event structure (event.key.*)
Fields
type_: SDL_EventType
Should always be SDL_KEYDOWN
or SDL_KEYUP
.
timestamp: u32
windowID: u32
The window with keyboard focus, if any.
state: u8
repeat: u8
Non-zero if this is a key repeat.
padding2: u8
padding3: u8
keysym: SDL_Keysym
The key that was pressed or released.
Trait Implementations
sourceimpl Clone for SDL_KeyboardEvent
impl Clone for SDL_KeyboardEvent
sourcefn clone(&self) -> SDL_KeyboardEvent
fn clone(&self) -> SDL_KeyboardEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SDL_KeyboardEvent
impl Debug for SDL_KeyboardEvent
sourceimpl Default for SDL_KeyboardEvent
impl Default for SDL_KeyboardEvent
sourcefn default() -> SDL_KeyboardEvent
fn default() -> SDL_KeyboardEvent
Returns the “default value” for a type. Read more
sourceimpl Hash for SDL_KeyboardEvent
impl Hash for SDL_KeyboardEvent
sourceimpl Ord for SDL_KeyboardEvent
impl Ord for SDL_KeyboardEvent
sourcefn cmp(&self, other: &SDL_KeyboardEvent) -> Ordering
fn cmp(&self, other: &SDL_KeyboardEvent) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<SDL_KeyboardEvent> for SDL_KeyboardEvent
impl PartialEq<SDL_KeyboardEvent> for SDL_KeyboardEvent
sourcefn eq(&self, other: &SDL_KeyboardEvent) -> bool
fn eq(&self, other: &SDL_KeyboardEvent) -> bool
sourceimpl PartialOrd<SDL_KeyboardEvent> for SDL_KeyboardEvent
impl PartialOrd<SDL_KeyboardEvent> for SDL_KeyboardEvent
sourcefn partial_cmp(&self, other: &SDL_KeyboardEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &SDL_KeyboardEvent) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SDL_KeyboardEvent
impl Eq for SDL_KeyboardEvent
impl StructuralEq for SDL_KeyboardEvent
impl StructuralPartialEq for SDL_KeyboardEvent
Auto Trait Implementations
impl RefUnwindSafe for SDL_KeyboardEvent
impl Send for SDL_KeyboardEvent
impl Sync for SDL_KeyboardEvent
impl Unpin for SDL_KeyboardEvent
impl UnwindSafe for SDL_KeyboardEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more