libghostty
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>
14#include <ghostty/vt/types.h>
15#include <ghostty/vt/terminal.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
33
39typedef enum {
42
45
49
55typedef struct {
57 size_t size;
58
60 bool cursor;
61
63 bool style;
64
67
70
73
77
83typedef struct {
85 size_t size;
86
88 bool palette;
89
91 bool modes;
92
95
98
100 bool pwd;
101
104
108
115
121typedef struct {
123 size_t size;
124
127
129 bool unwrap;
130
132 bool trim;
133
137
153 const GhosttyAllocator* allocator,
154 GhosttyFormatter* formatter,
155 GhosttyTerminal terminal,
157
180 uint8_t* buf,
181 size_t buf_len,
182 size_t* out_written);
183
204 const GhosttyAllocator* allocator,
205 uint8_t** out_ptr,
206 size_t* out_len);
207
219
221
222#ifdef __cplusplus
223}
224#endif
225
226#endif /* GHOSTTY_VT_FORMATTER_H */
GhosttyResult ghostty_formatter_format_alloc(GhosttyFormatter formatter, const GhosttyAllocator *allocator, uint8_t **out_ptr, size_t *out_len)
GhosttyResult ghostty_formatter_format_buf(GhosttyFormatter formatter, uint8_t *buf, size_t buf_len, size_t *out_written)
void ghostty_formatter_free(GhosttyFormatter formatter)
GhosttyResult ghostty_formatter_terminal_new(const GhosttyAllocator *allocator, GhosttyFormatter *formatter, GhosttyTerminal terminal, GhosttyFormatterTerminalOptions options)
struct GhosttyFormatter * GhosttyFormatter
Definition formatter.h:114
GhosttyFormatterFormat
Definition formatter.h:39
@ GHOSTTY_FORMATTER_FORMAT_PLAIN
Definition formatter.h:41
@ GHOSTTY_FORMATTER_FORMAT_HTML
Definition formatter.h:47
@ GHOSTTY_FORMATTER_FORMAT_VT
Definition formatter.h:44
struct GhosttyTerminal * GhosttyTerminal
Definition terminal.h:34
GhosttyFormatterScreenExtra screen
Definition formatter.h:106
GhosttyFormatterFormat emit
Definition formatter.h:126
GhosttyFormatterTerminalExtra extra
Definition formatter.h:135
GhosttyResult
Definition types.h:13