![]() |
libghostty
|
#include <ghostty/vt/terminal.h>
Data Fields | |
| size_t | size |
| 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.
This is a sized struct. The callback must only access fields present in the size reported by size. The request, contents array, MIME strings, and data strings are all borrowed and valid only for the callback duration.
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.
Definition at line 556 of file terminal.h.
| bool can_remember |
True if the program supplied a session password, so the embedder may offer to remember the user's decision through GhosttyClipboardWriteReply::remember. When false, remember is ignored.
Definition at line 586 of file terminal.h.
| const GhosttyClipboardContent* contents |
Borrowed array of MIME representations.
Definition at line 564 of file terminal.h.
| size_t contents_len |
Number of entries in contents; zero means clear the destination.
Definition at line 567 of file terminal.h.
| const void* ctx |
Terminal-owned reply state. Do not access.
Definition at line 589 of file terminal.h.
| bool granted |
True if the terminal already holds a session grant for this request The embedder should skip any permission prompt and perform the write.
Definition at line 579 of file terminal.h.
| GhosttyClipboardLocation location |
Clipboard destination.
Definition at line 561 of file terminal.h.
| GhosttyString name |
Name of the writing program for permission prompts, if the protocol carries one. Empty otherwise.
Definition at line 573 of file terminal.h.
Answer the write; see the struct documentation.
Definition at line 592 of file terminal.h.
| size_t size |
Size of this struct in bytes.
Definition at line 558 of file terminal.h.