#[repr(C)]pub struct SDL_PenProximityEvent {
pub type_: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub windowID: SDL_WindowID,
pub which: SDL_PenID,
}Expand description
Pressure-sensitive pen proximity event structure (event.pproximity.*)
When a pen becomes visible to the system (it is close enough to a tablet, etc), SDL will send an SDL_EVENT_PEN_PROXIMITY_IN event with the new pen’s ID. This ID is valid until the pen leaves proximity again (has been removed from the tablet’s area, the tablet has been unplugged, etc). If the same pen reenters proximity again, it will be given a new ID.
Note that “proximity” means “close enough for the tablet to know the tool is there.” The pen touching and lifting off from the tablet while not leaving the area are handled by SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP.
Not all platforms have a window associated with the pen during proximity events. Some wait until motion/button/etc events to offer this info.
Available Since: This struct is available since SDL 3.2.0.
Fields§
§type_: SDL_EventType< SDL_EVENT_PEN_PROXIMITY_IN or SDL_EVENT_PEN_PROXIMITY_OUT
reserved: Uint32§timestamp: Uint64< In nanoseconds, populated using SDL_GetTicksNS()
windowID: SDL_WindowID< The window with pen focus, if any
which: SDL_PenID< The pen instance id
Trait Implementations§
Source§impl Clone for SDL_PenProximityEvent
impl Clone for SDL_PenProximityEvent
Source§fn clone(&self) -> SDL_PenProximityEvent
fn clone(&self) -> SDL_PenProximityEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more