libghostty
Loading...
Searching...
No Matches
snapshot.h
Go to the documentation of this file.
1
6
7#ifndef GHOSTTY_VT_SNAPSHOT_H
8#define GHOSTTY_VT_SNAPSHOT_H
9
10#include <stddef.h>
11#include <stdint.h>
12
14#include <ghostty/vt/io.h>
15#include <ghostty/vt/terminal.h>
16#include <ghostty/vt/types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
118
126typedef enum GHOSTTY_ENUM_TYPED {
140
141 GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
143
150typedef enum GHOSTTY_ENUM_TYPED {
153
162
173
183
194
205
215
224
225 GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
227
254 GhosttyWriter writer);
255
280 GhosttyTerminal terminal,
281 uint8_t* buf,
282 size_t buf_len,
283 size_t* out_written);
284
306 GhosttyTerminal terminal,
307 const GhosttyAllocator* allocator,
308 uint8_t** out_ptr,
309 size_t* out_len);
310
334 const GhosttyAllocator* allocator,
335 GhosttySnapshotDecoder* decoder,
336 GhosttyReader reader);
337
355 const GhosttyAllocator* allocator,
356 GhosttySnapshotDecoder* decoder,
357 const uint8_t* ptr,
358 size_t len);
359
372
390 const void* value);
391
423 GhosttyTerminal* terminal);
424
449 GhosttySnapshotDecoder decoder);
450
473 GhosttyTerminal* terminal);
474
492 void* out);
493
514 size_t count,
515 const GhosttySnapshotDecoderData* keys,
516 void** values,
517 size_t* out_written);
518
520
521#ifdef __cplusplus
522}
523#endif
524
525#endif /* GHOSTTY_VT_SNAPSHOT_H */
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_new_buf(const GhosttyAllocator *allocator, GhosttySnapshotDecoder *decoder, const uint8_t *ptr, size_t len)
GHOSTTY_API void ghostty_snapshot_decoder_free(GhosttySnapshotDecoder decoder)
GHOSTTY_API GhosttyResult ghostty_snapshot_encode_alloc(GhosttyTerminal terminal, const GhosttyAllocator *allocator, uint8_t **out_ptr, size_t *out_len)
GhosttySnapshotDecoderOption
Definition snapshot.h:126
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_get_multi(GhosttySnapshotDecoder decoder, size_t count, const GhosttySnapshotDecoderData *keys, void **values, size_t *out_written)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_decode(GhosttySnapshotDecoder decoder, GhosttyTerminal *terminal)
GHOSTTY_API GhosttyResult ghostty_snapshot_encode(GhosttyTerminal terminal, GhosttyWriter writer)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_set(GhosttySnapshotDecoder decoder, GhosttySnapshotDecoderOption option, const void *value)
GHOSTTY_API GhosttyResult ghostty_snapshot_encode_buf(GhosttyTerminal terminal, uint8_t *buf, size_t buf_len, size_t *out_written)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_next(GhosttySnapshotDecoder decoder)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_get(GhosttySnapshotDecoder decoder, GhosttySnapshotDecoderData data, void *out)
struct GhosttySnapshotDecoderImpl * GhosttySnapshotDecoder
Definition types.h:106
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_new(const GhosttyAllocator *allocator, GhosttySnapshotDecoder *decoder, GhosttyReader reader)
GhosttySnapshotDecoderData
Definition snapshot.h:150
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_ready(GhosttySnapshotDecoder decoder, GhosttyTerminal *terminal)
@ GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_CONTINUATION_BYTES
Definition snapshot.h:139
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_ROWS
Definition snapshot.h:214
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_SCREEN
Definition snapshot.h:204
@ GHOSTTY_SNAPSHOT_DECODER_DATA_INVALID
Definition snapshot.h:152
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_PRIMARY
Definition snapshot.h:182
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_ALTERNATE
Definition snapshot.h:193
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_REMAINING
Definition snapshot.h:223
@ GHOSTTY_SNAPSHOT_DECODER_DATA_SOURCE_OFFSET
Definition snapshot.h:172
@ GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_CONTINUATION_BYTES
Definition snapshot.h:161
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:99
GhosttyResult
Definition types.h:74
#define GHOSTTY_ENUM_TYPED
Definition types.h:67