SDL_MouseButtonEvent

Mouse button event structure (event.button.*)

\since This struct is available since SDL 3.2.0.

Members

Variables

button
Uint8 button;

< The mouse button index

clicks
Uint8 clicks;

< 1 for single-click, 2 for double-click, etc.

down
bool down;

< true if the button is pressed

padding
Uint8 padding;
Undocumented in source.
reserved
Uint32 reserved;
Undocumented in source.
timestamp
Uint64 timestamp;

< In nanoseconds, populated using SDL_GetTicksNS()

type
SDL_EventType type;

< SDL_EVENT_MOUSE_BUTTON_DOWN or SDL_EVENT_MOUSE_BUTTON_UP

which
SDL_MouseID which;

< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0

windowID
SDL_WindowID windowID;

< The window with mouse focus, if any

x
float x;

< X coordinate, relative to window

y
float y;

< Y coordinate, relative to window

Meta