libghostty
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
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
83
extern
"C"
{
84
#endif
85
89
typedef
enum
GHOSTTY_ENUM_TYPED
{
91
GHOSTTY_PASTE_SOURCE_CLIPBOARD
= 0,
92
99
GHOSTTY_PASTE_SOURCE_TEXT
= 1,
100
GHOSTTY_PASTE_SOURCE_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
101
}
GhosttyPasteSource
;
102
111
typedef
struct
{
113
size_t
size
;
114
121
GhosttyClipboardLocation
location
;
122
124
GhosttyPasteSource
source
;
125
133
const
GhosttyString
*
mimes
;
134
136
size_t
mimes_len
;
137
150
GhosttyMimeReader
reader
;
151
156
bool
allow_unsafe
;
157
}
GhosttyPaste
;
158
187
GHOSTTY_API
GhosttyResult
ghostty_terminal_paste
(
188
GhosttyTerminal
terminal,
189
const
GhosttyPaste
* paste,
190
bool
* out_written);
191
209
GHOSTTY_API
bool
ghostty_paste_is_safe
(
const
char
* data,
size_t
len);
210
241
GHOSTTY_API
GhosttyResult
ghostty_paste_encode
(
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_paste_encode
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_terminal_paste
GHOSTTY_API GhosttyResult ghostty_terminal_paste(GhosttyTerminal terminal, const GhosttyPaste *paste, bool *out_written)
ghostty_paste_is_safe
GHOSTTY_API bool ghostty_paste_is_safe(const char *data, size_t len)
GhosttyPasteSource
GhosttyPasteSource
Definition
paste.h:89
GHOSTTY_PASTE_SOURCE_CLIPBOARD
@ GHOSTTY_PASTE_SOURCE_CLIPBOARD
Definition
paste.h:91
GHOSTTY_PASTE_SOURCE_TEXT
@ GHOSTTY_PASTE_SOURCE_TEXT
Definition
paste.h:99
GhosttyTerminal
struct GhosttyTerminalImpl * GhosttyTerminal
Definition
types.h:119
GhosttyClipboardLocation
GhosttyClipboardLocation
Definition
terminal.h:433
io.h
GhosttyMimeReader
Definition
io.h:140
GhosttyPaste
Definition
paste.h:111
GhosttyPaste::allow_unsafe
bool allow_unsafe
Definition
paste.h:156
GhosttyPaste::mimes_len
size_t mimes_len
Definition
paste.h:136
GhosttyPaste::source
GhosttyPasteSource source
Definition
paste.h:124
GhosttyPaste::size
size_t size
Definition
paste.h:113
GhosttyPaste::location
GhosttyClipboardLocation location
Definition
paste.h:121
GhosttyPaste::mimes
const GhosttyString * mimes
Definition
paste.h:133
GhosttyPaste::reader
GhosttyMimeReader reader
Definition
paste.h:150
GhosttyString
Definition
types.h:266
terminal.h
types.h
GhosttyResult
GhosttyResult
Definition
types.h:88
GHOSTTY_ENUM_TYPED
#define GHOSTTY_ENUM_TYPED
Definition
types.h:81
include
ghostty
vt
paste.h
Generated by
1.18.0