sh_write_clipboard method

int sh_write_clipboard(
  1. Pointer<SelectionHook> hook,
  2. Pointer<Char> text
)

Write text to the system clipboard.

On Linux, this function returns SH_ERR_GENERIC — clipboard write-back is not supported on Linux via this API.

@param hook Valid SelectionHook instance. @param text UTF-8 NUL-terminated string to place on the clipboard. @return SH_OK (0) on success, negative error code on failure. @thread_safety Safe from any thread.

Implementation

int sh_write_clipboard(
  ffi.Pointer<SelectionHook> hook,
  ffi.Pointer<ffi.Char> text,
) {
  return _sh_write_clipboard(hook, text);
}