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>
15#include <ghostty/vt/types.h>
16#include <ghostty/vt/terminal.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
34
40typedef struct {
42 size_t size;
43
45 bool cursor;
46
48 bool style;
49
52
55
58
62
68typedef struct {
70 size_t size;
71
73 bool palette;
74
76 bool modes;
77
80
83
85 bool pwd;
86
89
93
99typedef struct {
101 size_t size;
102
105
107 bool unwrap;
108
110 bool trim;
111
114
119
135 const GhosttyAllocator* allocator,
136 GhosttyFormatter* formatter,
137 GhosttyTerminal terminal,
139
162 uint8_t* buf,
163 size_t buf_len,
164 size_t* out_written);
165
185 const GhosttyAllocator* allocator,
186 uint8_t** out_ptr,
187 size_t* out_len);
188
199GHOSTTY_API void ghostty_formatter_free(GhosttyFormatter formatter);
200
202
203#ifdef __cplusplus
204}
205#endif
206
207#endif /* GHOSTTY_VT_FORMATTER_H */
GHOSTTY_API GhosttyResult ghostty_formatter_format_alloc(GhosttyFormatter formatter, const GhosttyAllocator *allocator, uint8_t **out_ptr, size_t *out_len)
GHOSTTY_API void ghostty_formatter_free(GhosttyFormatter formatter)
GHOSTTY_API GhosttyResult ghostty_formatter_terminal_new(const GhosttyAllocator *allocator, GhosttyFormatter *formatter, GhosttyTerminal terminal, GhosttyFormatterTerminalOptions options)
GhosttyFormatterFormat
Definition types.h:204
GHOSTTY_API GhosttyResult ghostty_formatter_format_buf(GhosttyFormatter formatter, uint8_t *buf, size_t buf_len, size_t *out_written)
struct GhosttyFormatterImpl * GhosttyFormatter
Definition types.h:175
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:95
GhosttyFormatterScreenExtra screen
Definition formatter.h:91
GhosttyFormatterFormat emit
Definition formatter.h:104
GhosttyFormatterTerminalExtra extra
Definition formatter.h:113
const GhosttySelection * selection
Definition formatter.h:117
GhosttyResult
Definition types.h:74