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
115 bool trim;
116
119
124
140 const GhosttyAllocator* allocator,
141 GhosttyFormatter* formatter,
142 GhosttyTerminal terminal,
144
166 GhosttyFormatter formatter,
167 GhosttyWriter writer);
168
191 uint8_t* buf,
192 size_t buf_len,
193 size_t* out_written);
194
216 const GhosttyAllocator* allocator,
217 uint8_t** out_ptr,
218 size_t* out_len);
219
230GHOSTTY_API void ghostty_formatter_free(GhosttyFormatter formatter);
231
233
234#ifdef __cplusplus
235}
236#endif
237
238#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:256
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:227
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:119
GhosttyFormatterScreenExtra screen
Definition formatter.h:92
GhosttyFormatterFormat emit
Definition formatter.h:105
GhosttyFormatterTerminalExtra extra
Definition formatter.h:118
const GhosttySelection * selection
Definition formatter.h:122
GhosttyResult
Definition types.h:88