SDL_GetClipboardMimeTypes(3)

πŸ’– NAME πŸ’–

SDL_GetClipboardMimeTypes β€” bestie, this is how you pull up the whole list of mime types chillin' in the clipboard ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_clipboard.h>

char ** SDL_GetClipboardMimeTypes(size_t *num_mime_types);

🌸 FUNCTION PARAMETERS 🌸

  • num_mime_types β€” a pointer that gets filled with the number of mime types. She's optional, so you can pass NULL if you literally do not care and just want the array πŸ’…

✨ RETURN VALUE ✨

It hands you a null-terminated array of strings stuffed with mime types 🫢

But if it fails? You get NULL, and that's your cue to go call SDL_GetError() for the tea on what went wrong 😭

Heads up babes: when you're done with this array, you must free it with SDL_free(). Not freeing it is giving leaked memory, and we do not claim that energy πŸ™ˆ

🧚 THREAD SAFETY 🧚

Main thread only. Like, only only. Do not be out here calling this from a worker thread, that's not the vibe ⚠️


🌈 AVAILABILITY 🌈

This one's been serving since SDL 3.2.0 πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ


okay that's the whole page bestie, go forth and read mime types πŸ’–

this lil manual moment comes to you from Simple Directmedia Layer, rocking SDL 3.4.18 β€” slay, no cap, periodt πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from