SDL_SetClipboardData

Offer clipboard data to the OS.

Tell the operating system that the application is offering clipboard data for each of the provided mime-types. Once another application requests the data the callback function will be called, allowing it to generate and respond with the data for the requested mime-type.

The size of text data does not include any terminator, and the text does not need to be null terminated (e.g. you can directly copy a portion of a document).

extern (C) nothrow @nogc extern
bool
SDL_SetClipboardData

Parameters

callback SDL_ClipboardDataCallback

a function pointer to the function that provides the clipboard data.

cleanup SDL_ClipboardCleanupCallback

a function pointer to the function that cleans up the clipboard data.

userdata void*

an opaque pointer that will be forwarded to the callbacks.

mime_types const(char)**

a list of mime-types that are being offered.

num_mime_types size_t

the number of mime-types in the mime_types list.

Return Value

Type: bool

true on success or false on failure; call SDL_GetError() for more information.

Threadsafety: This function should only be called on the main thread.

See Also

Meta