---
name: "SDL_MouseWheelEvent"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_MouseWheelEvent"
---

# SDL\_MouseWheelEvent(3type)

Mouse wheel event structure (event.wheel.\*)

## NAME

SDL\_MouseWheelEvent - Mouse wheel event structure (event.wheel.\*)

## HEADER FILE

Defined in SDL3/SDL\_events.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef struct SDL\_MouseWheelEvent** **{**     **SDL\_EventType type; /\*\*\< SDL\_EVENT\_MOUSE\_WHEEL \*/**     **Uint32 reserved;**     **Uint64 timestamp;   /\*\*\< In nanoseconds, populated using SDL\_GetTicksNS() \*/**     **SDL\_WindowID windowID; /\*\*\< The window with mouse focus, if any \*/**     **SDL\_MouseID which;  /\*\*\< The mouse instance id in relative mode or 0 \*/**     **float x;            /\*\*\< The amount scrolled horizontally, positive to the right and negative to the left \*/**     **float y;            /\*\*\< The amount scrolled vertically, positive away from the user and negative toward the user \*/**     **SDL\_MouseWheelDirection 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 \*/**     **float mouse\_x;      /\*\*\< X coordinate, relative to window \*/**     **float mouse\_y;      /\*\*\< Y coordinate, relative to window \*/** **} SDL\_MouseWheelEvent;**

## AVAILABILITY

This struct is available since SDL 3.2.0.
