SDL_QuitEvent(3type)
π SDL_QuitEvent π
okay bestie, welcome to the SDL3 DATATYPES corner of the manual, where we're talking about SDL_QuitEvent β literally the "quit requested" event. that's the whole vibe. someone (or something) wants out, and this lil struct is how the library tells you π«Ά
β¨ NAME β¨
SDL_QuitEvent β the "quit requested" event π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_events.h>
typedef struct SDL_QuitEvent
{
SDL_EventType type; /**< SDL_EVENT_QUIT */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
} SDL_QuitEvent;
so here's the breakdown, no cap:
typeβ it's anSDL_EventType, and for this one it's always gonna beSDL_EVENT_QUIT. iconic, consistent, we love that for it πreservedβ it's aUint32and honestly it's just sitting there being reserved. don't touch it, it's not for you πtimestampβ aUint64, measured in nanoseconds, and it gets populated usingSDL_GetTicksNS(). so you know exactly when the quit energy arrived β
heads up bestie: keep those field names and types exactly as written, fr fr. the struct is doing its job, don't come for it.
π¦ AVAILABILITY π¦
this struct has been available since SDL 3.2.0. she's new-ish but she's thriving π
that's the whole page, babe β short, sweet, and every field accounted for. the way this struct is just three members and zero drama? main character energy, periodt π
Simple Directmedia Layer wrote this one, it's from the SDL 3.4.18 era, and it lives at SDL_QuitEvent(3type). go forth and handle your quit events responsibly πβ¨π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms