libghostty
Toggle main menu visibility
Loading...
Searching...
No Matches
formatter.h
Go to the documentation of this file.
1
6
7
#ifndef GHOSTTY_VT_FORMATTER_H
8
#define GHOSTTY_VT_FORMATTER_H
9
10
#include <stdbool.h>
11
#include <stddef.h>
12
#include <stdint.h>
13
#include <
ghostty/vt/allocator.h
>
14
#include <
ghostty/vt/io.h
>
15
#include <
ghostty/vt/selection.h
>
16
#include <
ghostty/vt/types.h
>
17
#include <
ghostty/vt/terminal.h
>
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
35
41
typedef
struct
{
43
size_t
size
;
44
46
bool
cursor
;
47
49
bool
style
;
50
52
bool
hyperlink
;
53
55
bool
protection
;
56
58
bool
kitty_keyboard
;
59
61
bool
charsets
;
62
}
GhosttyFormatterScreenExtra
;
63
69
typedef
struct
{
71
size_t
size
;
72
74
bool
palette
;
75
77
bool
modes
;
78
80
bool
scrolling_region
;
81
83
bool
tabstops
;
84
86
bool
pwd
;
87
89
bool
keyboard
;
90
92
GhosttyFormatterScreenExtra
screen
;
93
}
GhosttyFormatterTerminalExtra
;
94
100
typedef
struct
{
102
size_t
size
;
103
105
GhosttyFormatterFormat
emit
;
106
108
bool
unwrap
;
109
111
bool
trim
;
112
114
GhosttyFormatterTerminalExtra
extra
;
115
118
const
GhosttySelection
*
selection
;
119
}
GhosttyFormatterTerminalOptions
;
120
135
GHOSTTY_API
GhosttyResult
ghostty_formatter_terminal_new
(
136
const
GhosttyAllocator
* allocator,
137
GhosttyFormatter
* formatter,
138
GhosttyTerminal
terminal,
139
GhosttyFormatterTerminalOptions
options);
140
161
GHOSTTY_API
GhosttyResult
ghostty_formatter_format
(
162
GhosttyFormatter
formatter,
163
GhosttyWriter
writer);
164
186
GHOSTTY_API
GhosttyResult
ghostty_formatter_format_buf
(
GhosttyFormatter
formatter,
187
uint8_t* buf,
188
size_t
buf_len,
189
size_t
* out_written);
190
209
GHOSTTY_API
GhosttyResult
ghostty_formatter_format_alloc
(
GhosttyFormatter
formatter,
210
const
GhosttyAllocator
* allocator,
211
uint8_t** out_ptr,
212
size_t
* out_len);
213
224
GHOSTTY_API
void
ghostty_formatter_free
(
GhosttyFormatter
formatter);
225
227
228
#ifdef __cplusplus
229
}
230
#endif
231
232
#endif
/* GHOSTTY_VT_FORMATTER_H */
allocator.h
ghostty_formatter_format_alloc
GHOSTTY_API GhosttyResult ghostty_formatter_format_alloc(GhosttyFormatter formatter, const GhosttyAllocator *allocator, uint8_t **out_ptr, size_t *out_len)
ghostty_formatter_free
GHOSTTY_API void ghostty_formatter_free(GhosttyFormatter formatter)
ghostty_formatter_terminal_new
GHOSTTY_API GhosttyResult ghostty_formatter_terminal_new(const GhosttyAllocator *allocator, GhosttyFormatter *formatter, GhosttyTerminal terminal, GhosttyFormatterTerminalOptions options)
ghostty_formatter_format
GHOSTTY_API GhosttyResult ghostty_formatter_format(GhosttyFormatter formatter, GhosttyWriter writer)
GhosttyFormatterFormat
GhosttyFormatterFormat
Definition
types.h:248
ghostty_formatter_format_buf
GHOSTTY_API GhosttyResult ghostty_formatter_format_buf(GhosttyFormatter formatter, uint8_t *buf, size_t buf_len, size_t *out_written)
GhosttyFormatter
struct GhosttyFormatterImpl * GhosttyFormatter
Definition
types.h:219
GhosttyTerminal
struct GhosttyTerminalImpl * GhosttyTerminal
Definition
types.h:119
io.h
selection.h
GhosttyAllocator
Definition
allocator.h:203
GhosttyFormatterScreenExtra
Definition
formatter.h:41
GhosttyFormatterScreenExtra::style
bool style
Definition
formatter.h:49
GhosttyFormatterScreenExtra::hyperlink
bool hyperlink
Definition
formatter.h:52
GhosttyFormatterScreenExtra::size
size_t size
Definition
formatter.h:43
GhosttyFormatterScreenExtra::protection
bool protection
Definition
formatter.h:55
GhosttyFormatterScreenExtra::kitty_keyboard
bool kitty_keyboard
Definition
formatter.h:58
GhosttyFormatterScreenExtra::cursor
bool cursor
Definition
formatter.h:46
GhosttyFormatterScreenExtra::charsets
bool charsets
Definition
formatter.h:61
GhosttyFormatterTerminalExtra
Definition
formatter.h:69
GhosttyFormatterTerminalExtra::scrolling_region
bool scrolling_region
Definition
formatter.h:80
GhosttyFormatterTerminalExtra::keyboard
bool keyboard
Definition
formatter.h:89
GhosttyFormatterTerminalExtra::modes
bool modes
Definition
formatter.h:77
GhosttyFormatterTerminalExtra::tabstops
bool tabstops
Definition
formatter.h:83
GhosttyFormatterTerminalExtra::pwd
bool pwd
Definition
formatter.h:86
GhosttyFormatterTerminalExtra::size
size_t size
Definition
formatter.h:71
GhosttyFormatterTerminalExtra::palette
bool palette
Definition
formatter.h:74
GhosttyFormatterTerminalExtra::screen
GhosttyFormatterScreenExtra screen
Definition
formatter.h:92
GhosttyFormatterTerminalOptions
Definition
formatter.h:100
GhosttyFormatterTerminalOptions::trim
bool trim
Definition
formatter.h:111
GhosttyFormatterTerminalOptions::emit
GhosttyFormatterFormat emit
Definition
formatter.h:105
GhosttyFormatterTerminalOptions::unwrap
bool unwrap
Definition
formatter.h:108
GhosttyFormatterTerminalOptions::extra
GhosttyFormatterTerminalExtra extra
Definition
formatter.h:114
GhosttyFormatterTerminalOptions::size
size_t size
Definition
formatter.h:102
GhosttyFormatterTerminalOptions::selection
const GhosttySelection * selection
Definition
formatter.h:118
GhosttySelection
Definition
selection.h:92
GhosttyWriter
Definition
io.h:97
terminal.h
types.h
GhosttyResult
GhosttyResult
Definition
types.h:88
include
ghostty
vt
formatter.h
Generated by
1.18.0