table of contents
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.
HEADER FILE¶
Defined in SDL3/SDL_clipboard.h
SYNOPSIS¶
#include "SDL3/SDL.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 length to 0 will cause no data to be sent to the "receiver". It is up to the receiver to handle this. Essentially returning no data is more or less undefined behavior and may cause breakage in receiving applications. 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.1.3.
SEE ALSO¶
•(3), SDL_SetClipboardData(3)
SDL 3.1.6 | Simple Directmedia Layer |