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
115
bool
trim
;
116
118
GhosttyFormatterTerminalExtra
extra
;
119
122
const
GhosttySelection
*
selection
;
123
}
GhosttyFormatterTerminalOptions
;
124
139
GHOSTTY_API
GhosttyResult
ghostty_formatter_terminal_new
(
140
const
GhosttyAllocator
* allocator,
141
GhosttyFormatter
* formatter,
142
GhosttyTerminal
terminal,
143
GhosttyFormatterTerminalOptions
options);
144
165
GHOSTTY_API
GhosttyResult
ghostty_formatter_format
(
166
GhosttyFormatter
formatter,
167
GhosttyWriter
writer);
168
190
GHOSTTY_API
GhosttyResult
ghostty_formatter_format_buf
(
GhosttyFormatter
formatter,
191
uint8_t* buf,
192
size_t
buf_len,
193
size_t
* out_written);
194
215
GHOSTTY_API
GhosttyResult
ghostty_formatter_format_alloc
(
GhosttyFormatter
formatter,
216
const
GhosttyAllocator
* allocator,
217
uint8_t** out_ptr,
218
size_t
* out_len);
219
230
GHOSTTY_API
void
ghostty_formatter_free
(
GhosttyFormatter
formatter);
231
233
234
#ifdef __cplusplus
235
}
236
#endif
237
238
#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:256
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:227
GhosttyTerminal
struct GhosttyTerminalImpl * GhosttyTerminal
Definition
types.h:119
io.h
selection.h
GhosttyAllocator
Definition
allocator.h:209
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:115
GhosttyFormatterTerminalOptions::emit
GhosttyFormatterFormat emit
Definition
formatter.h:105
GhosttyFormatterTerminalOptions::unwrap
bool unwrap
Definition
formatter.h:108
GhosttyFormatterTerminalOptions::extra
GhosttyFormatterTerminalExtra extra
Definition
formatter.h:118
GhosttyFormatterTerminalOptions::size
size_t size
Definition
formatter.h:102
GhosttyFormatterTerminalOptions::selection
const GhosttySelection * selection
Definition
formatter.h:122
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