#[repr(C)]pub struct SDL_PenButtonEvent {
pub type: SDL_EventType,
pub reserved: Uint32,
pub timestamp: Uint64,
pub windowID: SDL_WindowID,
pub which: SDL_PenID,
pub pen_state: SDL_PenInputFlags,
pub x: c_float,
pub y: c_float,
pub button: Uint8,
pub down: bool,
}Expand description
Pressure-sensitive pen button event structure (event.pbutton.*)
This is for buttons on the pen itself that the user might click. The pen
itself pressing down to draw triggers a SDL_EVENT_PEN_DOWN event instead.
§Availability
This struct is available since SDL 3.2.0.
Fields§
§type: SDL_EventType§reserved: Uint32§timestamp: Uint64In nanoseconds, populated using SDL_GetTicksNS()
windowID: SDL_WindowIDThe window with mouse focus, if any
which: SDL_PenIDThe pen instance id
pen_state: SDL_PenInputFlagsComplete pen input state at time of event
x: c_floatX coordinate, relative to window
y: c_floatY coordinate, relative to window
The pen button index (first button is 1).
down: booltrue if the button is pressed
Trait Implementations§
Source§impl Clone for SDL_PenButtonEvent
impl Clone for SDL_PenButtonEvent
Source§fn clone(&self) -> SDL_PenButtonEvent
fn clone(&self) -> SDL_PenButtonEvent
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_PenButtonEvent
impl Debug for SDL_PenButtonEvent
Source§impl Default for SDL_PenButtonEvent
impl Default for SDL_PenButtonEvent
Source§fn default() -> SDL_PenButtonEvent
fn default() -> SDL_PenButtonEvent
Returns the “default value” for a type. Read more
Source§impl PartialEq for SDL_PenButtonEvent
impl PartialEq for SDL_PenButtonEvent
impl Copy for SDL_PenButtonEvent
impl StructuralPartialEq for SDL_PenButtonEvent
Auto Trait Implementations§
impl Freeze for SDL_PenButtonEvent
impl RefUnwindSafe for SDL_PenButtonEvent
impl Send for SDL_PenButtonEvent
impl Sync for SDL_PenButtonEvent
impl Unpin for SDL_PenButtonEvent
impl UnwindSafe for SDL_PenButtonEvent
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