libghostty-vt 1.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
45
53typedef enum GHOSTTY_ENUM_TYPED {
60
75
96
129
147
148 GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
150
158typedef enum GHOSTTY_ENUM_TYPED {
165
171
172 GHOSTTY_SNAPSHOT_DECODER_PROGRESS_KIND_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
174
181typedef enum GHOSTTY_ENUM_TYPED {
184
193
204
214
225
237
248
259
268
278
288
299
310
322
336
350
361
377
389
390 GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
392
419 GhosttyWriter writer);
420
445 GhosttyTerminal terminal,
446 uint8_t* buf,
447 size_t buf_len,
448 size_t* out_written);
449
471 GhosttyTerminal terminal,
472 const GhosttyAllocator* allocator,
473 uint8_t** out_ptr,
474 size_t* out_len);
475
499 const GhosttyAllocator* allocator,
500 GhosttySnapshotDecoder* decoder,
501 GhosttyReader reader);
502
520 const GhosttyAllocator* allocator,
521 GhosttySnapshotDecoder* decoder,
522 const uint8_t* ptr,
523 size_t len);
524
537
571 const void* value);
572
610 GhosttyTerminal* terminal);
611
684 GhosttySnapshotDecoder decoder);
685
715 GhosttyTerminal* terminal);
716
735 void* out);
736
765 size_t count,
766 const GhosttySnapshotDecoderData* keys,
767 void** values,
768 size_t* out_written);
769
771
772#ifdef __cplusplus
773}
774#endif
775
776#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:53
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:158
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:181
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_ready(GhosttySnapshotDecoder decoder, GhosttyTerminal *terminal)
@ GHOSTTY_SNAPSHOT_DECODER_OPT_RETAIN_CONTINUATION
Definition snapshot.h:95
@ GHOSTTY_SNAPSHOT_DECODER_OPT_KITTY_IMAGE_STORAGE_LIMIT
Definition snapshot.h:146
@ GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_CONTINUATION_BYTES
Definition snapshot.h:74
@ GHOSTTY_SNAPSHOT_DECODER_OPT_COMPRESS_HISTORY
Definition snapshot.h:128
@ GHOSTTY_SNAPSHOT_DECODER_OPT_INVALID
Definition snapshot.h:59
@ GHOSTTY_SNAPSHOT_DECODER_PROGRESS_KIND_IMAGE
Definition snapshot.h:170
@ GHOSTTY_SNAPSHOT_DECODER_PROGRESS_KIND_PAGE
Definition snapshot.h:164
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_IMAGES_ALTERNATE
Definition snapshot.h:360
@ GHOSTTY_SNAPSHOT_DECODER_DATA_COMPRESS_HISTORY
Definition snapshot.h:277
@ GHOSTTY_SNAPSHOT_DECODER_DATA_RETAIN_CONTINUATION
Definition snapshot.h:267
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_IMAGE_STORAGE_LIMIT
Definition snapshot.h:287
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_IMAGES_PRIMARY
Definition snapshot.h:349
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_IMAGE_ID
Definition snapshot.h:309
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_IMAGE_BYTES
Definition snapshot.h:335
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_ROWS
Definition snapshot.h:247
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_PENDING_BYTES_PRIMARY
Definition snapshot.h:376
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_KIND
Definition snapshot.h:298
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_SCREEN
Definition snapshot.h:236
@ GHOSTTY_SNAPSHOT_DECODER_DATA_INVALID
Definition snapshot.h:183
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_PRIMARY
Definition snapshot.h:213
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_IMAGE_FRAME
Definition snapshot.h:321
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_ALTERNATE
Definition snapshot.h:224
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_REMAINING
Definition snapshot.h:258
@ GHOSTTY_SNAPSHOT_DECODER_DATA_KITTY_PENDING_BYTES_ALTERNATE
Definition snapshot.h:388
@ GHOSTTY_SNAPSHOT_DECODER_DATA_SOURCE_OFFSET
Definition snapshot.h:203
@ GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_CONTINUATION_BYTES
Definition snapshot.h:192
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:196