libghostty
Loading...
Searching...
No Matches
terminal.h
Go to the documentation of this file.
1
6
7#ifndef GHOSTTY_VT_TERMINAL_H
8#define GHOSTTY_VT_TERMINAL_H
9
10#include <stddef.h>
11#include <stdint.h>
12#include <ghostty/vt/types.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
28
35
41typedef struct {
43 uint16_t cols;
44
46 uint16_t rows;
47
50
51 // TODO: Consider ABI compatibility implications of this struct.
52 // We may want to artificially pad it significantly to support
53 // future options.
55
61typedef enum {
64
67
71
77typedef union {
79 intptr_t delta;
80
82 uint64_t _padding[2];
84
90typedef struct {
94
106 GhosttyTerminal* terminal,
107 GhosttyTerminalOptions options);
108
120
133
149 uint16_t cols,
150 uint16_t rows);
151
175 const uint8_t* data,
176 size_t len);
177
193
195
196#ifdef __cplusplus
197}
198#endif
199
200#endif /* GHOSTTY_VT_TERMINAL_H */
struct GhosttyTerminal * GhosttyTerminal
Definition terminal.h:34
GhosttyTerminalScrollViewportTag
Definition terminal.h:61
GhosttyResult ghostty_terminal_new(const GhosttyAllocator *allocator, GhosttyTerminal *terminal, GhosttyTerminalOptions options)
void ghostty_terminal_scroll_viewport(GhosttyTerminal terminal, GhosttyTerminalScrollViewport behavior)
GhosttyResult ghostty_terminal_resize(GhosttyTerminal terminal, uint16_t cols, uint16_t rows)
void ghostty_terminal_reset(GhosttyTerminal terminal)
void ghostty_terminal_vt_write(GhosttyTerminal terminal, const uint8_t *data, size_t len)
void ghostty_terminal_free(GhosttyTerminal terminal)
@ GHOSTTY_SCROLL_VIEWPORT_BOTTOM
Definition terminal.h:66
@ GHOSTTY_SCROLL_VIEWPORT_DELTA
Definition terminal.h:69
@ GHOSTTY_SCROLL_VIEWPORT_TOP
Definition terminal.h:63
GhosttyResult
Definition types.h:13