SDL_EnumerateProperties(3)

πŸ’– SDL_EnumerateProperties(3) πŸ’–

okay bestie, so this page is SDL_EnumerateProperties(3) from the SDL3 FUNCTIONS fam β€” yes it's a real manual page, no I'm not kidding, and yes we're gonna make it cute. it lives in the SDL3 section of your man pages, so man 3 SDL_EnumerateProperties and you're in. πŸŽ€


✨ NAME ✨

SDL_EnumerateProperties β€” bestie, this is literally the "gimme the receipts" function: it walks through every property inside a group of properties and tells you about each one. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_properties.h>

bool SDL_EnumerateProperties(SDL_PropertiesID props, SDL_EnumeratePropertiesCallback callback, void *userdata);

like. look at her. three lil args. she's so simple and she's so powerful. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so the way this works is your callback function gets called once for every single property chillin' in that group of properties. every one. no skipping, no favorites, she's thorough. 🫢

and here's the spicy bit: the properties are locked during enumeration. no cap, that's literally in the docs. so while you're mid-enumeration, nobody's out here rearranging the furniture. πŸ”’βœ¨


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • props β€” the properties to query. this is the group you're snooping through, iykyk. πŸ•΅οΈβ™€οΈ
  • callback β€” the function to call for each property. this is your moment, your main character scene, called once per property. ✨
  • userdata β€” a pointer that is passed to callback. it's just a lil extra something you hand over so your callback knows what's up. πŸ“

πŸ’œ RETURN VALUE πŸ’œ

returns true on success or false on failure. periodt.

and if it fails?? call SDL_GetError() for more information β€” do NOT just sit there wondering bestie, go ask. 😭


🌈 THREAD SAFETY 🌈

it is safe to call this function from any thread. any. thread. go wild, she's built different. πŸ”₯


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. so if you're on something older... girl. upgrade. πŸ™ˆ


πŸ’… the sign-off πŸ’…

that's the whole page, babe β€” brought to you by Simple Directmedia Layer and SDL 3.4.18, served fresh in the SDL3 manual, SDL_EnumerateProperties(3). go enumerate some properties and slay. πŸ’–πŸ¦‹πŸŒΈβœ¨

πŸ“¦ where this page comes from