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/io.h>
16#include <ghostty/vt/types.h>
17#include <ghostty/vt/terminal.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
35
41typedef struct {
43 size_t size;
44
46 bool cursor;
47
49 bool style;
50
53
56
59
63
69typedef struct {
71 size_t size;
72
74 bool palette;
75
77 bool modes;
78
81
84
86 bool pwd;
87
90
94
100typedef struct {
102 size_t size;
103
106
108 bool unwrap;
109
111 bool trim;
112
115
120
136 const GhosttyAllocator* allocator,
137 GhosttyFormatter* formatter,
138 GhosttyTerminal terminal,
140
162 GhosttyFormatter formatter,
163 GhosttyWriter writer);
164
187 uint8_t* buf,
188 size_t buf_len,
189 size_t* out_written);
190
210 const GhosttyAllocator* allocator,
211 uint8_t** out_ptr,
212 size_t* out_len);
213
224GHOSTTY_API void ghostty_formatter_free(GhosttyFormatter formatter);
225
227
228#ifdef __cplusplus
229}
230#endif
231
232#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)
GHOSTTY_API GhosttyResult ghostty_formatter_format(GhosttyFormatter formatter, GhosttyWriter writer)
GhosttyFormatterFormat
Definition types.h:248
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:219
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:119
GhosttyFormatterScreenExtra screen
Definition formatter.h:92
GhosttyFormatterFormat emit
Definition formatter.h:105
GhosttyFormatterTerminalExtra extra
Definition formatter.h:114
const GhosttySelection * selection
Definition formatter.h:118
GhosttyResult
Definition types.h:88