SDL 3.0
SDL_MouseButtonEvent Struct Reference

#include <SDL_events.h>

Data Fields

SDL_EventType type
 
Uint32 reserved
 
Uint64 timestamp
 
SDL_WindowID windowID
 
SDL_MouseID which
 
Uint8 button
 
Uint8 state
 
Uint8 clicks
 
Uint8 padding
 
float x
 
float y
 

Detailed Description

Mouse button event structure (event.button.*)

Since
This struct is available since SDL 3.0.0.

Definition at line 443 of file SDL_events.h.

Field Documentation

◆ button

Uint8 SDL_MouseButtonEvent::button

The mouse button index

Definition at line 450 of file SDL_events.h.

◆ clicks

Uint8 SDL_MouseButtonEvent::clicks

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

Definition at line 452 of file SDL_events.h.

◆ padding

Uint8 SDL_MouseButtonEvent::padding

Definition at line 453 of file SDL_events.h.

◆ reserved

Uint32 SDL_MouseButtonEvent::reserved

Definition at line 446 of file SDL_events.h.

◆ state

Uint8 SDL_MouseButtonEvent::state

SDL_PRESSED or SDL_RELEASED

Definition at line 451 of file SDL_events.h.

◆ timestamp

Uint64 SDL_MouseButtonEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 447 of file SDL_events.h.

◆ type

SDL_EventType SDL_MouseButtonEvent::type

SDL_EVENT_MOUSE_BUTTON_DOWN or SDL_EVENT_MOUSE_BUTTON_UP

Definition at line 445 of file SDL_events.h.

◆ which

SDL_MouseID SDL_MouseButtonEvent::which

The mouse instance id, SDL_TOUCH_MOUSEID

Definition at line 449 of file SDL_events.h.

◆ windowID

SDL_WindowID SDL_MouseButtonEvent::windowID

The window with mouse focus, if any

Definition at line 448 of file SDL_events.h.

◆ x

float SDL_MouseButtonEvent::x

X coordinate, relative to window

Definition at line 454 of file SDL_events.h.

◆ y

float SDL_MouseButtonEvent::y

Y coordinate, relative to window

Definition at line 455 of file SDL_events.h.


The documentation for this struct was generated from the following file: