Function in ldk_os.h

ldk_os_clipboard_text_get

Read UTF-8 text from the system clipboard. Passing NULL and zero queries the required byte length. If out_size is too small, out_text is left empty and the required byte length is returned. The returned length excludes the null terminator.

LDK_API size_t ldk_os_clipboard_text_get(
 LDKWindow window,
 char *out_text,
 size_t out_size
);

Parameters

LDKWindow window
Native window handle.
char *out_text
Destination buffer for the resulting text.
size_t out_size
Receives or specifies the byte size of the output buffer, as defined by the operation.

Returns

The resulting numeric value.

Function in ldk_os.h

ldk_os_clipboard_text_set

Store UTF-8 text in the system clipboard.

LDK_API bool ldk_os_clipboard_text_set(
 LDKWindow window,
 const char *text
);

Parameters

LDKWindow window
Native window handle.
const char *text
Text used by this operation.

Returns

True if the operation succeeds; false otherwise.