#[repr(C)]pub struct SDL_JoyBatteryEvent {
pub type_: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub which: SDL_JoystickID,
pub state: SDL_PowerState,
pub percent: c_int,
}Expand description
Joystick battery level change event structure (event.jbattery.*)
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_JOYSTICK_BATTERY_UPDATED
reserved: Uint32§timestamp: Uint64< In nanoseconds, populated using SDL_GetTicksNS()
which: SDL_JoystickID< The joystick instance id
state: SDL_PowerState< The joystick battery state
percent: c_int< The joystick battery percent charge remaining
Trait Implementations§
Source§impl Clone for SDL_JoyBatteryEvent
impl Clone for SDL_JoyBatteryEvent
Source§fn clone(&self) -> SDL_JoyBatteryEvent
fn clone(&self) -> SDL_JoyBatteryEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_JoyBatteryEvent
impl Debug for SDL_JoyBatteryEvent
Source§impl Default for SDL_JoyBatteryEvent
impl Default for SDL_JoyBatteryEvent
Source§impl Hash for SDL_JoyBatteryEvent
impl Hash for SDL_JoyBatteryEvent
impl Copy for SDL_JoyBatteryEvent
Auto Trait Implementations§
impl Freeze for SDL_JoyBatteryEvent
impl RefUnwindSafe for SDL_JoyBatteryEvent
impl Send for SDL_JoyBatteryEvent
impl Sync for SDL_JoyBatteryEvent
impl Unpin for SDL_JoyBatteryEvent
impl UnsafeUnpin for SDL_JoyBatteryEvent
impl UnwindSafe for SDL_JoyBatteryEvent
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