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