SDL_AppQuit_func(3type)
π SDL_AppQuit_func π
okay bestie, welcome to the SDL3 DATATYPES corner of the manual, where we're talking about SDL_AppQuit_func β yes it's a mouthful, yes it's iconic, and yes you're gonna understand it in like thirty seconds. π«Ά
β¨ NAME β¨
SDL_AppQuit_func β the function pointer typedef for SDL_AppQuit. literally what it says on the tin, no notes. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_init.h>
typedef void (SDLCALL *SDL_AppQuit_func)(void *appstate, SDL_AppResult result);
π¦ DESCRIPTION π¦
So here's the tea, bestie: these are used by SDL_EnterAppMainCallbacks. β
This whole mechanism operates behind the scenes for apps that are using the optional main callbacks. So it's giving backstage-pass energy β you don't have to touch it directly. Apps that actually wanna use this should just implement SDL_AppEvent directly. that's it, that's the move. β¨
π FUNCTION PARAMETERS π
appstateβ an optional pointer, and it's provided by the app over inSDL_AppInit. your little backpack of state, if you want one. πresultβ the result code that terminated the app (success or failure). so basically the receipts of how it all ended. π
β AVAILABILITY β
This datatype is available since SDL 3.2.0. so if you're on anything older, it's not you, it's the version. π
ngl this one is short and sweet β a typedef, two params, and a whole lot of behind-the-scenes magic. periodt. π
and that's the whole page, bestie!! brought to you by Simple Directmedia Layer, version SDL 3.4.18 β mwah, go slay your app's quit handling, iykyk π§ππ
π¦ 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