libghostty
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
75
76#include <stdbool.h>
77#include <stddef.h>
78#include <ghostty/vt/types.h>
79#include <ghostty/vt/io.h>
80#include <ghostty/vt/terminal.h>
81
82#ifdef __cplusplus
83extern "C" {
84#endif
85
89typedef enum GHOSTTY_ENUM_TYPED {
92
100 GHOSTTY_PASTE_SOURCE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
102
111typedef struct {
113 size_t size;
114
122
125
134
136 size_t mimes_len;
137
151
158
188 GhosttyTerminal terminal,
189 const GhosttyPaste* paste,
190 bool* out_written);
191
209GHOSTTY_API bool ghostty_paste_is_safe(const char* data, size_t len);
210
242 char* data,
243 size_t data_len,
244 bool bracketed,
245 char* buf,
246 size_t buf_len,
247 size_t* out_written);
248
249#ifdef __cplusplus
250}
251#endif
252
254
255#endif /* GHOSTTY_VT_PASTE_H */
GHOSTTY_API GhosttyResult ghostty_paste_encode(char *data, size_t data_len, bool bracketed, char *buf, size_t buf_len, size_t *out_written)
GHOSTTY_API GhosttyResult ghostty_terminal_paste(GhosttyTerminal terminal, const GhosttyPaste *paste, bool *out_written)
GHOSTTY_API bool ghostty_paste_is_safe(const char *data, size_t len)
GhosttyPasteSource
Definition paste.h:89
@ GHOSTTY_PASTE_SOURCE_CLIPBOARD
Definition paste.h:91
@ GHOSTTY_PASTE_SOURCE_TEXT
Definition paste.h:99
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:119
GhosttyClipboardLocation
Definition terminal.h:433
bool allow_unsafe
Definition paste.h:156
size_t mimes_len
Definition paste.h:136
GhosttyPasteSource source
Definition paste.h:124
size_t size
Definition paste.h:113
GhosttyClipboardLocation location
Definition paste.h:121
const GhosttyString * mimes
Definition paste.h:133
GhosttyMimeReader reader
Definition paste.h:150
GhosttyResult
Definition types.h:88
#define GHOSTTY_ENUM_TYPED
Definition types.h:81