SDL_HasClipboardData(3)

πŸ’– SDL_HasClipboardData(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_HasClipboardData β€” she's the girl who just checks if there's anything on the clipboard for you. No taking, no giving, just vibes and a yes/no. πŸŽ€


✨ NAME ✨

SDL_HasClipboardData β€” query whether there is data in the clipboard for the provided mime type. that's it, that's the whole job, and she does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_clipboard.h>

bool SDL_HasClipboardData(const char *mime_type);

πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • mime_type β€” the mime type to check for data. like, which flavour of clipboard content are we asking about? text/plain? image/png? you tell her, she'll go look πŸ‘€

⭐ RETURN VALUE ⭐

Returns true if data exists in the clipboard for the provided mime type, and false if it does not. literally a vibe check for your clipboard, no cap 🫢


πŸ”₯ THREAD SAFETY πŸ”₯

This function should only be called on the main thread. not me catching you calling it from a worker thread 😭 she's a main-thread girlie, respect it. periodt.


πŸ‘‘ AVAILABILITY πŸ‘‘

This function is available since SDL 3.2.0. so if you're on something older, she's not there yet bestie, sorry πŸ’€


🌈 SEE ALSO 🌈

iykyk, the clipboard trio ate πŸ’–


mwah, that's the whole page, love you, bye πŸ’œβœ¨

this cutie was brought to you by Simple Directmedia Layer β€” SDL 3.4.18 edition, straight from the SDL3 FUNCTIONS manual. go forth and check your clipboard, bestie πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from