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 <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
119
127typedef enum GHOSTTY_ENUM_TYPED {
142
162
163 GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
165
172typedef enum GHOSTTY_ENUM_TYPED {
175
184
195
205
216
227
237
246
255
256 GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
258
285 GhosttyWriter writer);
286
311 GhosttyTerminal terminal,
312 uint8_t* buf,
313 size_t buf_len,
314 size_t* out_written);
315
337 GhosttyTerminal terminal,
338 const GhosttyAllocator* allocator,
339 uint8_t** out_ptr,
340 size_t* out_len);
341
365 const GhosttyAllocator* allocator,
366 GhosttySnapshotDecoder* decoder,
367 GhosttyReader reader);
368
386 const GhosttyAllocator* allocator,
387 GhosttySnapshotDecoder* decoder,
388 const uint8_t* ptr,
389 size_t len);
390
403
421 const void* value);
422
460 GhosttyTerminal* terminal);
461
486 GhosttySnapshotDecoder decoder);
487
517 GhosttyTerminal* terminal);
518
536 void* out);
537
558 size_t count,
559 const GhosttySnapshotDecoderData* keys,
560 void** values,
561 size_t* out_written);
562
564
565#ifdef __cplusplus
566}
567#endif
568
569#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:127
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:126
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_new(const GhosttyAllocator *allocator, GhosttySnapshotDecoder *decoder, GhosttyReader reader)
GhosttySnapshotDecoderData
Definition snapshot.h:172
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_ready(GhosttySnapshotDecoder decoder, GhosttyTerminal *terminal)
@ GHOSTTY_SNAPSHOT_DECODER_OPT_RETAIN_CONTINUATION
Definition snapshot.h:161
@ GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_CONTINUATION_BYTES
Definition snapshot.h:141
@ GHOSTTY_SNAPSHOT_DECODER_DATA_RETAIN_CONTINUATION
Definition snapshot.h:254
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_ROWS
Definition snapshot.h:236
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_SCREEN
Definition snapshot.h:226
@ GHOSTTY_SNAPSHOT_DECODER_DATA_INVALID
Definition snapshot.h:174
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_PRIMARY
Definition snapshot.h:204
@ GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_ALTERNATE
Definition snapshot.h:215
@ GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_REMAINING
Definition snapshot.h:245
@ GHOSTTY_SNAPSHOT_DECODER_DATA_SOURCE_OFFSET
Definition snapshot.h:194
@ GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_CONTINUATION_BYTES
Definition snapshot.h:183
struct GhosttyTerminalImpl * GhosttyTerminal
Definition types.h:119
GhosttyResult
Definition types.h:88
#define GHOSTTY_ENUM_TYPED
Definition types.h:81