![]() |
libghostty-vt 0.0.0
|
#include <ghostty/vt/terminal.h>
Data Fields | |
| GhosttyClipboardLocation | location |
| const GhosttyClipboardContent * | contents |
| size_t | contents_len |
| GhosttyString | name |
| bool | granted |
| bool | can_remember |
| const void * | ctx |
| GhosttyClipboardWriteReplyFn | reply |
A synchronous request to write clipboard contents.
The request and everything it points to, including the contents array and its strings, are borrowed. They are only valid until the callback returns.
All entries in contents are representations of the same logical value and must be committed atomically. A contents_len of zero requests that the destination be cleared. This is distinct from a content entry whose data has zero length.
The write is answered by calling reply with this request and a GhosttyClipboardWriteReply. This must happen within the clipboard write request callback. This struct is only valid during that time. Calling reply more than once is safely ignored. Returning without replying denies the write.
This struct has a frozen layout and will never gain fields. It is 64 bytes on 64-bit targets and 32 bytes on wasm32. If a later version of libghostty-vt has more to report, it will add a new option with a new struct, and this callback will keep receiving this struct unchanged.
Definition at line 873 of file terminal.h.
| bool can_remember |
True if the program supplied a session password, so you may offer to remember the decision through GhosttyClipboardWriteReply::remember. When false, remember is ignored.
Definition at line 900 of file terminal.h.
| const GhosttyClipboardContent* contents |
Borrowed array of MIME representations.
Definition at line 878 of file terminal.h.
| size_t contents_len |
Number of entries in contents; zero means clear the destination.
Definition at line 881 of file terminal.h.
| const void* ctx |
Terminal-owned reply state. Do not access.
Definition at line 903 of file terminal.h.
| bool granted |
True if the terminal already holds a session grant for this request You should skip any permission prompt and perform the write.
Definition at line 893 of file terminal.h.
| GhosttyClipboardLocation location |
| GhosttyString name |
Name of the writing program for permission prompts, if the protocol carries one. Empty otherwise.
Definition at line 887 of file terminal.h.
Answer the write; see the struct documentation.
Definition at line 906 of file terminal.h.