SDL_SysWMEvent(3)

πŸ’– SDL_SysWMEvent πŸ’–

okay bestie, welcome to the SDL API Reference ✨ this one's about SDL_SysWMEvent(3) and honestly? it's giving behind-the-scenes window manager tea πŸ«–


✨ NAME ✨

SDL_SysWMEvent β€” the platform-dependent window manager event πŸ’…


🌸 DESCRIPTION 🌸

so basically, the system window manager event is carrying a pointer to system-specific info about all those window manager events that nobody really knows what to do with πŸ¦‹

if you turn this event ON using SDL_EventState(), it's gonna get generated every single time unhandled events come in from the window manager. no cap. and like β€” that's actually so useful, because you can use it to do stuff like implement cut-and-paste in your application πŸ‘‘

here's the struct, and yes she's tiny but she's iconic:

typedef struct {
         Uint8 type;   /* Always SDL_SysWM */
} SDL_SysWMEvent;

now β€” if you wanna get that system-specific info about the window manager, here's the vibe: you fill the version member of a SDL_SysWMinfo structure (all the deets live in SDL_syswm.h, which you must include, periodt) using the SDL_VERSION() macro that's chilling in SDL_version.h. then you pass it to this function:

int SDL_GetWMInfo(SDL_SysWMinfo *info);

slay. that's the whole thing 🌈


πŸ‘€ SEE ALSO πŸ‘€

  • SDL_EventState

okay that's a wrap, gorgeous πŸ’œ this page was brought to you by SDL, dated Tue 11 Sep 2001, 23:00 β€” yeah, a whole vintage queen from 2001, and she still eats πŸŽ€ bye bestie, go write some cut-and-paste code πŸ’–βœ¨

πŸ“¦ where this page comes from