![]() |
libghostty
|
#include <ghostty/vt/terminal.h>
Data Fields | |
| size_t | size |
| GhosttyClipboardReadResult | result |
| const GhosttyClipboardContent * | contents |
| size_t | contents_len |
| const GhosttyString * | available |
| size_t | available_len |
| bool | remember |
The reply to a clipboard read request.
This is a sized struct; set size to sizeof(GhosttyClipboardReadReply). All arrays and the strings they point to are borrowed only for the duration of the reply call and may be freed as soon as it returns.
Any result other than GHOSTTY_CLIPBOARD_READ_RESULT_SUCCESS answers the program with an empty clipboard (OSC 52) or the matching protocol status (OSC 5522: EPERM, ENOSYS, EBUSY, EIO); the other fields are ignored in that case. On success, contents should carry one representation per requested MIME type (GhosttyClipboardRead::mimes) that the clipboard has; unrequested representations are ignored. Protocols that carry a single text value (OSC 52) use the first entry with a text MIME type such as "text/plain".
Definition at line 667 of file terminal.h.
| const GhosttyString* available |
Borrowed array of all MIME types available on the clipboard. Only used when GhosttyClipboardRead::list is set; may be NULL otherwise.
Definition at line 684 of file terminal.h.
| size_t available_len |
Number of entries in available.
Definition at line 687 of file terminal.h.
| const GhosttyClipboardContent* contents |
Borrowed array of MIME representations of the clipboard contents.
Definition at line 675 of file terminal.h.
| size_t contents_len |
Number of entries in contents.
Definition at line 678 of file terminal.h.
| bool remember |
Record a session grant so future requests from the same program skip the permission prompt. Only honored on success when GhosttyClipboardRead::can_remember is set.
Definition at line 694 of file terminal.h.
| GhosttyClipboardReadResult result |
Outcome of the read.
Definition at line 672 of file terminal.h.
| size_t size |
Size of this struct in bytes.
Definition at line 669 of file terminal.h.