libghostty-vt 0.0.0
Loading...
Searching...
No Matches
paste.h
Go to the documentation of this file.
1
6
7#ifndef GHOSTTY_VT_PASTE_H
8#define GHOSTTY_VT_PASTE_H
9
30
31#include <stdbool.h>
32#include <stddef.h>
33#include <ghostty/vt/types.h>
34#include <ghostty/vt/io.h>
35#include <ghostty/vt/terminal.h>
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
44typedef enum GHOSTTY_ENUM_TYPED {
47
55 GHOSTTY_PASTE_SOURCE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
57
68typedef struct {
70 size_t size;
71
79
82
91
93 size_t mimes_len;
94
108
115
145 GhosttyTerminal terminal,
146 const GhosttyPaste* paste,
147 bool* out_pasted);
148
168GHOSTTY_API bool ghostty_paste_is_safe(const char* data, size_t len);
169
222 char* data,
223 size_t data_len,
224 bool bracketed,
225 uint8_t* buf,
226 size_t buf_len,
227 size_t* out_written);
228
229#ifdef __cplusplus
230}
231#endif
232
234
235#endif /* GHOSTTY_VT_PASTE_H */
GhosttyResult
Definition types.h:143
#define GHOSTTY_ENUM_TYPED
Definition types.h:124
GhosttyClipboardLocation
Definition terminal.h:741
GHOSTTY_API GhosttyResult ghostty_terminal_paste(GhosttyTerminal terminal, const GhosttyPaste *paste, bool *out_pasted)
GHOSTTY_API GhosttyResult ghostty_paste_encode(char *data, size_t data_len, bool bracketed, uint8_t *buf, size_t buf_len, size_t *out_written)
GHOSTTY_API bool ghostty_paste_is_safe(const char *data, size_t len)
GhosttyPasteSource
Definition paste.h:44
@ GHOSTTY_PASTE_SOURCE_CLIPBOARD
Definition paste.h:46
@ GHOSTTY_PASTE_SOURCE_TEXT
Definition paste.h:54
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:196
bool allow_unsafe
Definition paste.h:113
size_t mimes_len
Definition paste.h:93
GhosttyPasteSource source
Definition paste.h:81
size_t size
Definition paste.h:70
GhosttyClipboardLocation location
Definition paste.h:78
const GhosttyString * mimes
Definition paste.h:90
GhosttyMimeReader reader
Definition paste.h:107