libghostty
Loading...
Searching...
No Matches
snapshot.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <ghostty/vt/allocator.h>
#include <ghostty/vt/io.h>
#include <ghostty/vt/terminal.h>
#include <ghostty/vt/types.h>

Go to the source code of this file.

Enumerations

enum  GhosttySnapshotDecoderOption { GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_CONTINUATION_BYTES = 0 , GHOSTTY_SNAPSHOT_DECODER_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE }
enum  GhosttySnapshotDecoderData {
  GHOSTTY_SNAPSHOT_DECODER_DATA_INVALID = 0 , GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_CONTINUATION_BYTES = 1 , GHOSTTY_SNAPSHOT_DECODER_DATA_SOURCE_OFFSET = 2 , GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_PRIMARY = 3 ,
  GHOSTTY_SNAPSHOT_DECODER_DATA_HISTORY_ROWS_ALTERNATE = 4 , GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_SCREEN = 5 , GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_ROWS = 6 , GHOSTTY_SNAPSHOT_DECODER_DATA_PROGRESS_REMAINING = 7 ,
  GHOSTTY_SNAPSHOT_DECODER_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE
}

Functions

GHOSTTY_API GhosttyResult ghostty_snapshot_encode (GhosttyTerminal terminal, GhosttyWriter writer)
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_encode_alloc (GhosttyTerminal terminal, const GhosttyAllocator *allocator, uint8_t **out_ptr, size_t *out_len)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_new (const GhosttyAllocator *allocator, GhosttySnapshotDecoder *decoder, GhosttyReader reader)
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_decoder_set (GhosttySnapshotDecoder decoder, GhosttySnapshotDecoderOption option, const void *value)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_ready (GhosttySnapshotDecoder decoder, GhosttyTerminal *terminal)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_next (GhosttySnapshotDecoder decoder)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_decode (GhosttySnapshotDecoder decoder, GhosttyTerminal *terminal)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_get (GhosttySnapshotDecoder decoder, GhosttySnapshotDecoderData data, void *out)
GHOSTTY_API GhosttyResult ghostty_snapshot_decoder_get_multi (GhosttySnapshotDecoder decoder, size_t count, const GhosttySnapshotDecoderData *keys, void **values, size_t *out_written)

Detailed Description

Encode and restore complete terminal snapshots.

Definition in file snapshot.h.