27#ifndef ULTRALIGHT_CAPI_CLIPBOARD_H
28#define ULTRALIGHT_CAPI_CLIPBOARD_H
ULClipboardData ulCreateClipboardDataFromText(ULString text)
Create a clipboard payload holding a single text/plain entry.
bool ulClipboardDataHas(ULClipboardData data, ULString type)
Whether or not an entry exists for a type.
ULClipboardData ulCreateClipboardData(void)
Create an empty clipboard payload.
void ulClipboardDataSetText(ULClipboardData data, ULString type, ULString text)
Set the text value for a type, replacing any existing entry with the same type.
void ulClipboardDataRemove(ULClipboardData data, ULString type)
Remove the entry for a type (does nothing if no such entry exists).
void ulClipboardDataSetSourceURL(ULClipboardData data, ULString url)
Set the URL of the document this payload came from.
ULBuffer ulClipboardDataGetBytes(ULClipboardData data, ULString type)
Get the bytes value for a type.
size_t ulClipboardDataGetSize(ULClipboardData data)
Get the number of entries.
ULString ulClipboardDataGetSourceURL(ULClipboardData data)
Get the URL of the document this payload came from (can be empty).
void ulDestroyClipboardData(ULClipboardData data)
Destroy a clipboard payload (you should only destroy payloads you have explicitly created via the fun...
ULString ulClipboardDataGetText(ULClipboardData data, ULString type)
Get the text value for a type.
bool ulClipboardDataIsText(ULClipboardData data, ULString type)
Whether or not the entry for a type holds text.
ULClipboardData(*) ULClipboardReadCallback(void *user_data)
The callback invoked when the library wants to read from the system's clipboard.
Definition CAPI_Clipboard.h:164
ULString ulClipboardDataGetTypeAt(ULClipboardData data, size_t index)
Get the type of the entry at a certain index, in insertion order.
void(*) ULClipboardClearCallback(void *user_data)
The callback invoked when the library wants to clear the system's clipboard.
Definition CAPI_Clipboard.h:153
ULClipboardData ulCreateClipboardDataRef(ULClipboardData data)
Create another owned reference to an existing clipboard payload.
void(*) ULClipboardWriteCallback(void *user_data, ULClipboardData data)
The callback invoked when the library wants to write a payload to the system's clipboard,...
Definition CAPI_Clipboard.h:177
void ulClipboardDataSetBytes(ULClipboardData data, ULString type, ULBuffer bytes)
Set the bytes value for a type, replacing any existing entry with the same type.
Various defines and utility functions for the C API.
struct C_ClipboardData * ULClipboardData
Definition CAPI_Defines.h:101
struct C_String * ULString
Opaque handle to a String object.
Definition CAPI_Defines.h:96
#define ULExport
Definition CAPI_Defines.h:42
struct C_Buffer * ULBuffer
Opaque handle to a Buffer object.
Definition CAPI_Defines.h:99
User-defined clipboard interface.
Definition CAPI_Clipboard.h:185
void * user_data
A user-defined pointer passed to every callback (can be NULL).
Definition CAPI_Clipboard.h:189
ULClipboardWriteCallback write
Called to write a payload to the system's clipboard.
Definition CAPI_Clipboard.h:204
ULClipboardClearCallback clear
Called to clear the system's clipboard.
Definition CAPI_Clipboard.h:194
ULClipboardReadCallback read
Called to read the system clipboard's current contents.
Definition CAPI_Clipboard.h:199