SDL_MouseButtonEvent Struct Reference

Mouse button event structure (event.button.*) More...

`#include <SDL_events.h>`

## Data Fields

Uint32 | type
Uint32 | timestamp
Uint32 | windowID
Uint32 | which
Uint8 | button
Uint8 | state
Uint8 | clicks
Uint8 | padding1
Sint32 | x
Sint32 | y

## Detailed Description

Mouse button event structure (event.button.*)

Definition at line 248 of file SDL_events.h.

## Field Documentation

## button

Uint8 SDL_MouseButtonEvent::button

The mouse button index

Definition at line 254 of file SDL_events.h.

Referenced by loop(), and SDLTest_PrintEvent().

## clicks

Uint8 SDL_MouseButtonEvent::clicks

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

Definition at line 256 of file SDL_events.h.

Referenced by SDLTest_PrintEvent().

## padding1

Uint8 SDL_MouseButtonEvent::padding1

Definition at line 257 of file SDL_events.h.

## state

Uint8 SDL_MouseButtonEvent::state

SDL_PRESSED or SDL_RELEASED

Definition at line 255 of file SDL_events.h.

## timestamp

Uint32 SDL_MouseButtonEvent::timestamp

In milliseconds, populated using SDL_GetTicks()

Definition at line 251 of file SDL_events.h.

## type

Uint32 SDL_MouseButtonEvent::type

SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP

Definition at line 250 of file SDL_events.h.

## which

Uint32 SDL_MouseButtonEvent::which

The mouse instance id, or SDL_TOUCH_MOUSEID

Definition at line 253 of file SDL_events.h.

## windowID

Uint32 SDL_MouseButtonEvent::windowID

The window with mouse focus, if any

Definition at line 252 of file SDL_events.h.

Referenced by SDL_RendererEventWatch(), and SDLTest_PrintEvent().

## x

Sint32 SDL_MouseButtonEvent::x

X coordinate, relative to window

Definition at line 258 of file SDL_events.h.

Referenced by loop(), main(), SDL_RendererEventWatch(), and SDLTest_PrintEvent().

## y

Sint32 SDL_MouseButtonEvent::y

Y coordinate, relative to window

Definition at line 259 of file SDL_events.h.

Referenced by loop(), SDL_RendererEventWatch(), and SDLTest_PrintEvent().

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

- include/SDL_events.h