libghostty-vt 0.0.0
Loading...
Searching...
No Matches
formatter.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <ghostty/vt/allocator.h>
#include <ghostty/vt/io.h>
#include <ghostty/vt/selection.h>
#include <ghostty/vt/types.h>
#include <ghostty/vt/terminal.h>

Go to the source code of this file.

Macros

#define GHOSTTY_FORMATTER_EXTRA_PALETTE   (1u << 0)
#define GHOSTTY_FORMATTER_EXTRA_MODES   (1u << 1)
#define GHOSTTY_FORMATTER_EXTRA_SCROLLING_REGION   (1u << 2)
#define GHOSTTY_FORMATTER_EXTRA_TABSTOPS   (1u << 3)
#define GHOSTTY_FORMATTER_EXTRA_PWD   (1u << 4)
#define GHOSTTY_FORMATTER_EXTRA_KEYBOARD   (1u << 5)
#define GHOSTTY_FORMATTER_EXTRA_CURSOR   (1u << 6)
#define GHOSTTY_FORMATTER_EXTRA_STYLE   (1u << 7)
#define GHOSTTY_FORMATTER_EXTRA_HYPERLINK   (1u << 8)
#define GHOSTTY_FORMATTER_EXTRA_PROTECTION   (1u << 9)
#define GHOSTTY_FORMATTER_EXTRA_KITTY_KEYBOARD   (1u << 10)
#define GHOSTTY_FORMATTER_EXTRA_CHARSETS   (1u << 11)
#define GHOSTTY_FORMATTER_EXTRAS_NONE   0u
#define GHOSTTY_FORMATTER_EXTRAS_ALL   0xFFFu
#define GHOSTTY_FORMATTER_EXTRAS_DEFAULT

Typedefs

typedef uint32_t GhosttyFormatterExtras

Enumerations

enum  GhosttyFormatterOption {
  GHOSTTY_FORMATTER_OPT_INVALID = 0 , GHOSTTY_FORMATTER_OPT_EMIT = 1 , GHOSTTY_FORMATTER_OPT_UNWRAP = 2 , GHOSTTY_FORMATTER_OPT_TRIM = 3 ,
  GHOSTTY_FORMATTER_OPT_SELECTION = 4 , GHOSTTY_FORMATTER_OPT_EXTRAS = 5 , GHOSTTY_FORMATTER_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE
}

Functions

GHOSTTY_API GhosttyResult ghostty_formatter_terminal_new (const GhosttyAllocator *allocator, GhosttyFormatter *formatter, GhosttyTerminal terminal)
GHOSTTY_API GhosttyResult ghostty_formatter_set (GhosttyFormatter formatter, GhosttyFormatterOption option, const void *value)
GHOSTTY_API GhosttyResult ghostty_formatter_get (GhosttyFormatter formatter, GhosttyFormatterOption option, void *out)
GHOSTTY_API GhosttyResult ghostty_formatter_format (GhosttyFormatter formatter, GhosttyWriter writer)
GHOSTTY_API GhosttyResult ghostty_formatter_format_buf (GhosttyFormatter formatter, uint8_t *buf, size_t buf_len, size_t *out_written)
GHOSTTY_API GhosttyResult ghostty_formatter_format_alloc (GhosttyFormatter formatter, const GhosttyAllocator *allocator, uint8_t **out_ptr, size_t *out_len)
GHOSTTY_API void ghostty_formatter_free (GhosttyFormatter formatter)

Detailed Description

Format terminal content as plain text, VT sequences, or HTML.

Definition in file formatter.h.