table of contents
- trixie 3.2.10+ds-1
 - testing 3.2.26+ds-1
 - unstable 3.2.26+ds-2
 - experimental 3.3.2+git20251103~dc5b136+ds-1
 
| SDL_ClipboardDataCallback(3type) | SDL3 DATATYPES | SDL_ClipboardDataCallback(3type) | 
NAME¶
SDL_ClipboardDataCallback - Callback function that will be called when data for the specified mime-type is requested by the OS.
SYNOPSIS¶
#include <SDL3/SDL_clipboard.h>
typedef const void *(SDLCALL *SDL_ClipboardDataCallback)(void *userdata, const char *mime_type, size_t *size);
DESCRIPTION¶
The callback function is called with NULL as the mime_type when the clipboard is cleared or new data is set. The clipboard is automatically cleared in SDL_Quit().
FUNCTION PARAMETERS¶
RETURN VALUE¶
Returns a pointer to the data for the provided mime-type. Returning NULL or setting the length to 0 will cause zero length data to be sent to the "receiver", which should be able to handle this. The returned data will not be freed, so it needs to be retained and dealt with internally.
AVAILABILITY¶
This function is available since SDL 3.2.0.
SEE ALSO¶
| SDL 3.2.26 | Simple Directmedia Layer |