SDL_SetPointerProperty(3)
π SDL_SetPointerProperty π
okay bestie, welcome to SDL3 FUNCTIONS β today's episode is all about SDL_SetPointerProperty, and honestly? she's a lil legend. β¨
πΈ NAME πΈ
SDL_SetPointerProperty β sets a pointer property inside a group of properties. that's it, that's the whole job, and she does it flawlessly. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_properties.h>
bool SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value);
π FUNCTION PARAMETERS π
propsβ the properties you wanna modify. the lil group of properties. your canvas. π¨nameβ the name of the property you're modifying. yep, just the name. identify yourself queen. πvalueβ the new value of the property, orNULLto delete the property. so like, passingNULLhere is you saying "and scene, we're done here." π
β¨ RETURN VALUE β¨
returns true on success or false on failure. and if it fails? call SDL_GetError() for more info, because she WILL tell you what went wrong, no cap. π
π§ THREAD SAFETY π§
it is safe to call this function from any thread. literally any of them. go wild. π«Ά
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on something older... bestie. upgrade. π
π SEE ALSO π
the whole friend group, fr fr:
SDL_GetPointerProperty(3)SDL_HasProperty(3)SDL_SetBooleanProperty(3)SDL_SetFloatProperty(3)SDL_SetNumberProperty(3)SDL_SetPointerPropertyWithCleanup(3)SDL_SetStringProperty(3)
lowkey reminder:valuebeingNULLdoesn't set a null pointer property, it deletes the property. that's not a vibe, that's a whole different operation. don't get it twisted. π
and that's the page!! brought to you by Simple Directmedia Layer, version SDL 3.4.18. go forth and set those pointer properties, bestie, you're gonna slay. ππ π
π¦ 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