SDL_X11EventHook(3type)
π SDL_X11EventHook π
okay bestie, welcome to the SDL_X11EventHook page, straight outta the SDL3 DATATYPES section, iykyk β¨
πΈ NAME πΈ
SDL_X11EventHook β it's a callback, and you use it with SDL_SetX11EventHook. that's the whole vibe π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_system.h>
typedef bool (SDLCALL *SDL_X11EventHook)(void *userdata, XEvent *xevent);
π¦ DESCRIPTION π¦
so this callback? it may modify the event, and it should return true if the event should keep being processed, or false to prevent further processing. literally the whole point π
and because this is processing an event directly from the X11 event loop, this callback should do the minimum required work and return quickly. like, in-and-out. no yapping, no side quests, no main character monologue. the event loop is waiting on you fr fr π
π FUNCTION PARAMETERS π
userdataβ the app-defined pointer that got handed toSDL_SetX11EventHook. it's yours, you put it there π«Άxeventβ a pointer to an XlibXEventunion to process. yes, the whole union. go off π
π RETURN VALUE π
returns true to let the event continue on, false to drop it. simple as that, no cap β
π THREAD SAFETY π
this may only be called (by SDL) from the thread handling the X11 event loop. so like, one thread. that one. not your other one π
π AVAILABILITY π
this datatype is available since SDL 3.2.0. iconic behavior honestly π¦
π SEE ALSO π
and that's a wrap, bestie! this page came to you from Simple Directmedia Layer, rockin' SDL 3.4.18 π go forth and hook those X11 events, you absolute legend πβ¨
π¦ 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