libghostty-vt 0.0.0
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 <stdbool.h>
11#include <stddef.h>
12#include <stdint.h>
13
15#include <ghostty/vt/io.h>
16#include <ghostty/vt/terminal.h>
17#include <ghostty/vt/types.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
42
50typedef enum GHOSTTY_ENUM_TYPED {
57
72
93
126
144
145 GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
147
155typedef enum GHOSTTY_ENUM_TYPED {
162
168
169 GHOSTTY_SNAPSHOT_DECODER_PROGRESS_KIND_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
171
178typedef enum GHOSTTY_ENUM_TYPED {
181
190
201
211
222
234
245
256
265
275
285
296
307
319
333
347
358
374
386
387 GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
389
416 GhosttyWriter writer);
417
442 GhosttyTerminal terminal,
443 uint8_t* buf,
444 size_t buf_len,
445 size_t* out_written);
446
468 GhosttyTerminal terminal,
469 const GhosttyAllocator* allocator,
470 uint8_t** out_ptr,
471 size_t* out_len);
472
496 const GhosttyAllocator* allocator,
497 GhosttySnapshotDecoder* decoder,
498 GhosttyReader reader);
499
517 const GhosttyAllocator* allocator,
518 GhosttySnapshotDecoder* decoder,
519 const uint8_t* ptr,
520 size_t len);
521
534
568 const void* value);
569
607 GhosttyTerminal* terminal);
608
681 GhosttySnapshotDecoder decoder);
682
712 GhosttyTerminal* terminal);
713
732 void* out);
733
762 size_t count,
763 const GhosttySnapshotDecoderData* keys,
764 void** values,
765 size_t* out_written);
766
768
769#ifdef __cplusplus
770}
771#endif
772
773#endif /* GHOSTTY_VT_SNAPSHOT_H */
GhosttyResult
Definition types.h:143
#define GHOSTTY_ENUM_TYPED
Definition types.h:124
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:50
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)
GhosttySnapshotDecoderProgressKind
Definition snapshot.h:155
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:203
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_new(const GhosttyAllocator *allocator, GhosttySnapshotDecoder *decoder, GhosttyReader reader)
GhosttySnapshotDecoderData
Definition snapshot.h:178
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_ready(GhosttySnapshotDecoder decoder, GhosttyTerminal *terminal)
@ GHOSTTY_SNAPSHOT_DECODER_OPT_RETAIN_CONTINUATION
Definition snapshot.h:92
@ GHOSTTY_SNAPSHOT_DECODER_OPT_KITTY_IMAGE_STORAGE_LIMIT
Definition snapshot.h:143
@ GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_CONTINUATION_BYTES
Definition snapshot.h:71
@ GHOSTTY_SNAPSHOT_DECODER_OPT_COMPRESS_HISTORY
Definition snapshot.h:125
@ GHOSTTY_SNAPSHOT_DECODER_OPT_INVALID
Definition snapshot.h:56
@ GHOSTTY_SNAPSHOT_DECODER_PROGRESS_KIND_IMAGE
Definition snapshot.h:167
@ GHOSTTY_SNAPSHOT_DECODER_PROGRESS_KIND_PAGE
Definition snapshot.h:161
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_IMAGES_ALTERNATE
Definition snapshot.h:357
@ GHOSTTY_SNAPSHOT_DECODER_DATA_COMPRESS_HISTORY
Definition snapshot.h:274
@ GHOSTTY_SNAPSHOT_DECODER_DATA_RETAIN_CONTINUATION
Definition snapshot.h:264
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_IMAGE_STORAGE_LIMIT
Definition snapshot.h:284
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_IMAGES_PRIMARY
Definition snapshot.h:346
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_IMAGE_ID
Definition snapshot.h:306
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_IMAGE_BYTES
Definition snapshot.h:332
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_ROWS
Definition snapshot.h:244
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_PENDING_BYTES_PRIMARY
Definition snapshot.h:373
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_KIND
Definition snapshot.h:295
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_SCREEN
Definition snapshot.h:233
@ GHOSTTY_SNAPSHOT_DECODER_DATA_INVALID
Definition snapshot.h:180
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_PRIMARY
Definition snapshot.h:210
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_IMAGE_FRAME
Definition snapshot.h:318
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_ALTERNATE
Definition snapshot.h:221
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_REMAINING
Definition snapshot.h:255
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_PENDING_BYTES_ALTERNATE
Definition snapshot.h:385
@ GHOSTTY_SNAPSHOT_DECODER_DATA_SOURCE_OFFSET
Definition snapshot.h:200
@ GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_CONTINUATION_BYTES
Definition snapshot.h:189
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:196