libghostty-vt
0.0.0
Toggle main menu visibility
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
38
extern
"C"
{
39
#endif
40
44
typedef
enum
GHOSTTY_ENUM_TYPED
{
46
GHOSTTY_PASTE_SOURCE_CLIPBOARD
= 0,
47
54
GHOSTTY_PASTE_SOURCE_TEXT
= 1,
55
GHOSTTY_PASTE_SOURCE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
56
}
GhosttyPasteSource
;
57
68
typedef
struct
{
70
size_t
size
;
71
78
GhosttyClipboardLocation
location
;
79
81
GhosttyPasteSource
source
;
82
90
const
GhosttyString
*
mimes
;
91
93
size_t
mimes_len
;
94
107
GhosttyMimeReader
reader
;
108
113
bool
allow_unsafe
;
114
}
GhosttyPaste
;
115
144
GHOSTTY_API
GhosttyResult
ghostty_terminal_paste
(
145
GhosttyTerminal
terminal,
146
const
GhosttyPaste
* paste,
147
bool
* out_pasted);
148
168
GHOSTTY_API
bool
ghostty_paste_is_safe
(
const
char
* data,
size_t
len);
169
221
GHOSTTY_API
GhosttyResult
ghostty_paste_encode
(
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
GhosttyResult
Definition
types.h:143
GHOSTTY_ENUM_TYPED
#define GHOSTTY_ENUM_TYPED
Definition
types.h:124
GhosttyClipboardLocation
GhosttyClipboardLocation
Definition
terminal.h:741
ghostty_terminal_paste
GHOSTTY_API GhosttyResult ghostty_terminal_paste(GhosttyTerminal terminal, const GhosttyPaste *paste, bool *out_pasted)
ghostty_paste_encode
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_paste_is_safe
GHOSTTY_API bool ghostty_paste_is_safe(const char *data, size_t len)
GhosttyPasteSource
GhosttyPasteSource
Definition
paste.h:44
GHOSTTY_PASTE_SOURCE_CLIPBOARD
@ GHOSTTY_PASTE_SOURCE_CLIPBOARD
Definition
paste.h:46
GHOSTTY_PASTE_SOURCE_TEXT
@ GHOSTTY_PASTE_SOURCE_TEXT
Definition
paste.h:54
GhosttyTerminal
struct GhosttyTerminalImpl * GhosttyTerminal
Definition
types.h:196
io.h
GhosttyMimeReader
Definition
io.h:156
GhosttyPaste
Definition
paste.h:68
GhosttyPaste::allow_unsafe
bool allow_unsafe
Definition
paste.h:113
GhosttyPaste::mimes_len
size_t mimes_len
Definition
paste.h:93
GhosttyPaste::source
GhosttyPasteSource source
Definition
paste.h:81
GhosttyPaste::size
size_t size
Definition
paste.h:70
GhosttyPaste::location
GhosttyClipboardLocation location
Definition
paste.h:78
GhosttyPaste::mimes
const GhosttyString * mimes
Definition
paste.h:90
GhosttyPaste::reader
GhosttyMimeReader reader
Definition
paste.h:107
GhosttyString
Definition
types.h:439
terminal.h
types.h
include
ghostty
vt
paste.h
Generated by
1.17.0