#[repr(C)]pub struct SDL_UserEvent {
pub type: Uint32,
pub reserved: Uint32,
pub timestamp: Uint64,
pub windowID: SDL_WindowID,
pub code: Sint32,
pub data1: *mut c_void,
pub data2: *mut c_void,
}Expand description
A user-defined event type (event.user.*)
This event is unique; it is never created by SDL, but only by the
application. The event can be pushed onto the event queue using
SDL_PushEvent(). The contents of the structure members are completely up to
the programmer; the only requirement is that ‘’‘type’‘’ is a value obtained
from SDL_RegisterEvents().
§Availability
This struct is available since SDL 3.2.0.
Fields§
§type: Uint32SDL_EVENT_USER through SDL_EVENT_LAST, Uint32 because these are not in the SDL_EventType enumeration
reserved: Uint32§timestamp: Uint64In nanoseconds, populated using SDL_GetTicksNS()
windowID: SDL_WindowIDThe associated window if any
code: Sint32User defined event code
data1: *mut c_voidUser defined data pointer
data2: *mut c_voidUser defined data pointer
Trait Implementations§
Source§impl Clone for SDL_UserEvent
impl Clone for SDL_UserEvent
Source§fn clone(&self) -> SDL_UserEvent
fn clone(&self) -> SDL_UserEvent
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_UserEvent
impl Debug for SDL_UserEvent
impl Copy for SDL_UserEvent
Auto Trait Implementations§
impl Freeze for SDL_UserEvent
impl RefUnwindSafe for SDL_UserEvent
impl !Send for SDL_UserEvent
impl !Sync for SDL_UserEvent
impl Unpin for SDL_UserEvent
impl UnwindSafe for SDL_UserEvent
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