![]() |
libghostty-vt 0.0.0
|
#include <ghostty/vt/terminal.h>
Data Fields | |
| GhosttyClipboardLocation | location |
| const GhosttyString * | mimes |
| size_t | mimes_len |
| bool | list |
| GhosttyString | name |
| bool | granted |
| bool | can_remember |
| const void * | ctx |
| GhosttyClipboardReadReplyFn | reply |
A synchronous request to read clipboard contents.
The request is borrowed and only valid until the callback returns.
The read is answered by calling reply with this request and a GhosttyClipboardReadReply. This must happen before the callback returns; the request is invalid afterwards. Calling reply more than once is ignored. Returning without replying answers the program with an empty clipboard (OSC 52) or EPERM (OSC 5522).
This struct has a frozen layout and will never gain fields. It is 72 bytes on 64-bit targets and 36 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 1048 of file terminal.h.
| bool can_remember |
True if the program supplied a session password, so you may offer to remember the decision through GhosttyClipboardReadReply::remember. When false, remember is ignored.
Definition at line 1091 of file terminal.h.
| const void* ctx |
Terminal-owned reply state. Do not access.
Definition at line 1094 of file terminal.h.
| bool granted |
True if the terminal already holds a session grant for this request (kitty clipboard protocol passwords). You should skip any permission prompt and serve the read.
Always false when mimes_len is zero: such a request is served without a prompt (see the callback docs), so the terminal never consults grants for it and a one-time password is preserved for the follow-up data read.
Definition at line 1084 of file terminal.h.
| bool list |
True if the program also wants the list of MIME types available on the clipboard, delivered through GhosttyClipboardReadReply::available.
Definition at line 1066 of file terminal.h.
| GhosttyClipboardLocation location |
| const GhosttyString* mimes |
Borrowed array of the MIME types the program wants, in order of preference. Protocols that only carry text (OSC 52) request "text/plain". NULL when mimes_len is zero.
Definition at line 1057 of file terminal.h.
| size_t mimes_len |
Number of entries in mimes.
Definition at line 1060 of file terminal.h.
| GhosttyString name |
Name of the requesting program for permission prompts, if the protocol carries one. Empty otherwise.
Definition at line 1072 of file terminal.h.
Answer the read; see the struct documentation.
Definition at line 1097 of file terminal.h.