Mouse button event structure (event.button.*)
Defined in [SDL_events.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_events.h), but apps should _only_ `#include "SDL.h"`!
typedef struct SDL_MouseButtonEvent
{/**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
Uint32 type; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 timestamp; /**< The window with mouse focus, if any */
Uint32 windowID; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Uint32 which; /**< The mouse button index */
Uint8 button; /**< ::SDL_PRESSED or ::SDL_RELEASED */
Uint8 state; /**< 1 for single-click, 2 for double-click, etc. */
Uint8 clicks;
Uint8 padding1;/**< X coordinate, relative to window */
Sint32 x; /**< Y coordinate, relative to window */
Sint32 y; } SDL_MouseButtonEvent;
Uint32 |
type |
the event type; SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP |
Uint32 |
timestamp |
timestamp of the event |
Uint32 |
windowID |
the window with mouse focus, if any |
Uint32 |
which |
the mouse instance id, or SDL_TOUCH_MOUSEID; see Remarks for details |
Uint8 |
button |
the button that changed; see Remarks for details |
Uint8 |
state |
the state of the button; SDL_PRESSED or SDL_RELEASED |
Uint8 |
clicks |
1 for single-click, 2 for double-click, etc. (>= SDL 2.0.2) |
Sint32 |
x |
X coordinate, relative to window |
Sint32 |
y |
Y coordinate, relative to window |
CategoryAPI, CategoryAPIStruct, CategoryStruct, CategoryEvents