SDL_WaitEvent(3)

SDL_WaitEvent3

Wait indefinitely for the next available event.

Usage

#include "SDL3/SDL.h"

bool SDL_WaitEvent(SDL_Event *event);

Header file

Defined in SDL3/SDL_events.h

Overview

If event is not NULL, the next event is removed from the queue and stored in the SDL_Event
structure pointed to by event .

As this function may implicitly call SDL_PumpEvents (), you can only call this function in the thread that initialized the video subsystem.

Function parameters

event

the SDL_Event
structure to be filled in with the next event from the queue, or NULL.

Return value

Returns true on success or false if there was an error while waiting for events; call SDL_GetError () for more information.

Thread safety

This function should only be called on the main thread.

Releases

12 releases since Debian 3.0 (Woody); the text changed 2 times.

  1. 3.0–5.0
  2. 6.0–12
  3. 13

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.