SDL_MouseWheelEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

Uint32 | type
Uint32 | timestamp
Uint32 | windowID
Uint32 | which
Sint32 | x
Sint32 | y
Uint32 | direction
float | preciseX
float | preciseY
Sint32 | mouseX
Sint32 | mouseY

## Detailed Description

Mouse wheel event structure (event.wheel.*)

Definition at line 332 of file SDL_events.h.

## Field Documentation

## direction

Uint32 SDL_MouseWheelEvent::direction

Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back

Definition at line 340 of file SDL_events.h.

## mouseX

Sint32 SDL_MouseWheelEvent::mouseX

X coordinate, relative to window (added in 2.26.0)

Definition at line 343 of file SDL_events.h.

## mouseY

Sint32 SDL_MouseWheelEvent::mouseY

Y coordinate, relative to window (added in 2.26.0)

Definition at line 344 of file SDL_events.h.

## preciseX

float SDL_MouseWheelEvent::preciseX

The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18)

Definition at line 341 of file SDL_events.h.

## preciseY

float SDL_MouseWheelEvent::preciseY

The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18)

Definition at line 342 of file SDL_events.h.

## timestamp

Uint32 SDL_MouseWheelEvent::timestamp

In milliseconds, populated using SDL_GetTicks()

Definition at line 335 of file SDL_events.h.

## type

Uint32 SDL_MouseWheelEvent::type

SDL_MOUSEWHEEL

Definition at line 334 of file SDL_events.h.

## which

Uint32 SDL_MouseWheelEvent::which

The mouse instance id, or SDL_TOUCH_MOUSEID

Definition at line 337 of file SDL_events.h.

## windowID

Uint32 SDL_MouseWheelEvent::windowID

The window with mouse focus, if any

Definition at line 336 of file SDL_events.h.

## x

Sint32 SDL_MouseWheelEvent::x

The amount scrolled horizontally, positive to the right and negative to the left

Definition at line 338 of file SDL_events.h.

## y

Sint32 SDL_MouseWheelEvent::y

The amount scrolled vertically, positive away from the user and negative toward the user

Definition at line 339 of file SDL_events.h.

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

- SDL_events.h