sdl.clipboard

SDL Clipboard

Members

Aliases

SDL_ClipboardCleanupCallback
alias SDL_ClipboardCleanupCallback = void function(void* userdata)

Callback function that will be called when the clipboard is cleared, or new data is set.

SDL_ClipboardDataCallback
alias SDL_ClipboardDataCallback = const(void)* function(void* userdata, const(char)* mime_type, size_t* size)

Callback function that will be called when data for the specified mime-type is requested by the OS.

Functions

SDL_ClearClipboardData
bool SDL_ClearClipboardData()

Clear the clipboard data.

SDL_GetClipboardData
void* SDL_GetClipboardData(const(char)* mime_type, size_t* size)

Get the data from clipboard for a given mime type.

SDL_GetClipboardMimeTypes
char** SDL_GetClipboardMimeTypes(size_t* num_mime_types)

Retrieve the list of mime types available in the clipboard.

SDL_GetClipboardText
char* SDL_GetClipboardText()

Get UTF-8 text from the clipboard.

SDL_GetPrimarySelectionText
char* SDL_GetPrimarySelectionText()

Get UTF-8 text from the primary selection.

SDL_HasClipboardData
bool SDL_HasClipboardData(const(char)* mime_type)

Query whether there is data in the clipboard for the provided mime type.

SDL_HasClipboardText
bool SDL_HasClipboardText()

Query whether the clipboard exists and contains a non-empty text string.

SDL_HasPrimarySelectionText
bool SDL_HasPrimarySelectionText()

Query whether the primary selection exists and contains a non-empty text string.

SDL_SetClipboardData
bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void* userdata, const(char)** mime_types, size_t num_mime_types)

Offer clipboard data to the OS.

SDL_SetClipboardText
bool SDL_SetClipboardText(const(char)* text)

Put UTF-8 text into the clipboard.

SDL_SetPrimarySelectionText
bool SDL_SetPrimarySelectionText(const(char)* text)

Put UTF-8 text into the primary selection.

See Also

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen