LF OS
Hobby operating system for amd64 with high ambitions
Loading...
Searching...
No Matches
vterm.h File Reference

(475a4fe LLVM update: finally on 18.x!)

#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include "vterm_keycodes.h"
+ Include dependency graph for vterm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  VTermPos
 
struct  VTermRect
 
union  VTermColor
 
struct  VTermStringFragment
 
union  VTermValue
 
struct  VTermGlyphInfo
 
struct  VTermLineInfo
 
struct  VTermStateFields
 
struct  VTermAllocatorFunctions
 
struct  VTermBuilder
 
struct  VTermParserCallbacks
 
struct  VTermStateCallbacks
 
struct  VTermStateFallbacks
 
struct  VTermSelectionCallbacks
 
struct  VTermScreenCellAttrs
 
struct  VTermScreenCell
 
struct  VTermScreenCallbacks
 
struct  VTermColor.rgb
 
struct  VTermColor.indexed
 

Macros

#define VTERM_VERSION_MAJOR   0
 
#define VTERM_VERSION_MINOR   3
 
#define VTERM_VERSION_PATCH   3
 
#define VTERM_CHECK_VERSION    vterm_check_version(VTERM_VERSION_MAJOR, VTERM_VERSION_MINOR)
 
#define VTERM_MAX_CHARS_PER_CELL   6
 
#define VTERM_COLOR_IS_INDEXED(col)    (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_INDEXED)
 
#define VTERM_COLOR_IS_RGB(col)    (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_RGB)
 
#define VTERM_COLOR_IS_DEFAULT_FG(col)    (!!((col)->type & VTERM_COLOR_DEFAULT_FG))
 
#define VTERM_COLOR_IS_DEFAULT_BG(col)    (!!((col)->type & VTERM_COLOR_DEFAULT_BG))
 
#define CSI_ARG_FLAG_MORE   (1U<<31)
 
#define CSI_ARG_MASK   (~(1U<<31))
 
#define CSI_ARG_HAS_MORE(a)   ((a) & CSI_ARG_FLAG_MORE)
 
#define CSI_ARG(a)   ((a) & CSI_ARG_MASK)
 
#define CSI_ARG_MISSING   ((1UL<<31)-1)
 
#define CSI_ARG_IS_MISSING(a)   (CSI_ARG(a) == CSI_ARG_MISSING)
 
#define CSI_ARG_OR(a, def)   (CSI_ARG(a) == CSI_ARG_MISSING ? (def) : CSI_ARG(a))
 
#define CSI_ARG_COUNT(a)   (CSI_ARG(a) == CSI_ARG_MISSING || CSI_ARG(a) == 0 ? 1 : CSI_ARG(a))
 
#define vterm_screen_set_reflow   vterm_screen_enable_reflow
 

Typedefs

typedef struct VTerm VTerm
 
typedef struct VTermState VTermState
 
typedef struct VTermScreen VTermScreen
 
typedef void VTermOutputCallback(const char *s, size_t len, void *user)
 

Enumerations

enum  VTermColorType {
  VTERM_COLOR_RGB = 0x00 , VTERM_COLOR_INDEXED = 0x01 , VTERM_COLOR_TYPE_MASK = 0x01 , VTERM_COLOR_DEFAULT_FG = 0x02 ,
  VTERM_COLOR_DEFAULT_BG = 0x04 , VTERM_COLOR_DEFAULT_MASK = 0x06
}
 
enum  VTermValueType {
  VTERM_VALUETYPE_BOOL = 1 , VTERM_VALUETYPE_INT , VTERM_VALUETYPE_STRING , VTERM_VALUETYPE_COLOR ,
  VTERM_N_VALUETYPES
}
 
enum  VTermAttr {
  VTERM_ATTR_BOLD = 1 , VTERM_ATTR_UNDERLINE , VTERM_ATTR_ITALIC , VTERM_ATTR_BLINK ,
  VTERM_ATTR_REVERSE , VTERM_ATTR_CONCEAL , VTERM_ATTR_STRIKE , VTERM_ATTR_FONT ,
  VTERM_ATTR_FOREGROUND , VTERM_ATTR_BACKGROUND , VTERM_ATTR_SMALL , VTERM_ATTR_BASELINE ,
  VTERM_N_ATTRS
}
 
enum  VTermProp {
  VTERM_PROP_CURSORVISIBLE = 1 , VTERM_PROP_CURSORBLINK , VTERM_PROP_ALTSCREEN , VTERM_PROP_TITLE ,
  VTERM_PROP_ICONNAME , VTERM_PROP_REVERSE , VTERM_PROP_CURSORSHAPE , VTERM_PROP_MOUSE ,
  VTERM_PROP_FOCUSREPORT , VTERM_N_PROPS
}
 
enum  { VTERM_PROP_CURSORSHAPE_BLOCK = 1 , VTERM_PROP_CURSORSHAPE_UNDERLINE , VTERM_PROP_CURSORSHAPE_BAR_LEFT , VTERM_N_PROP_CURSORSHAPES }
 
enum  {
  VTERM_PROP_MOUSE_NONE = 0 , VTERM_PROP_MOUSE_CLICK , VTERM_PROP_MOUSE_DRAG , VTERM_PROP_MOUSE_MOVE ,
  VTERM_N_PROP_MOUSES
}
 
enum  VTermSelectionMask {
  VTERM_SELECTION_CLIPBOARD = (1<<0) , VTERM_SELECTION_PRIMARY = (1<<1) , VTERM_SELECTION_SECONDARY = (1<<2) , VTERM_SELECTION_SELECT = (1<<3) ,
  VTERM_SELECTION_CUT0 = (1<<4)
}
 
enum  { VTERM_UNDERLINE_OFF , VTERM_UNDERLINE_SINGLE , VTERM_UNDERLINE_DOUBLE , VTERM_UNDERLINE_CURLY }
 
enum  { VTERM_BASELINE_NORMAL , VTERM_BASELINE_RAISE , VTERM_BASELINE_LOWER }
 
enum  VTermDamageSize {
  VTERM_DAMAGE_CELL , VTERM_DAMAGE_ROW , VTERM_DAMAGE_SCREEN , VTERM_DAMAGE_SCROLL ,
  VTERM_N_DAMAGES
}
 
enum  VTermAttrMask {
  VTERM_ATTR_BOLD_MASK = 1 << 0 , VTERM_ATTR_UNDERLINE_MASK = 1 << 1 , VTERM_ATTR_ITALIC_MASK = 1 << 2 , VTERM_ATTR_BLINK_MASK = 1 << 3 ,
  VTERM_ATTR_REVERSE_MASK = 1 << 4 , VTERM_ATTR_STRIKE_MASK = 1 << 5 , VTERM_ATTR_FONT_MASK = 1 << 6 , VTERM_ATTR_FOREGROUND_MASK = 1 << 7 ,
  VTERM_ATTR_BACKGROUND_MASK = 1 << 8 , VTERM_ATTR_CONCEAL_MASK = 1 << 9 , VTERM_ATTR_SMALL_MASK = 1 << 10 , VTERM_ATTR_BASELINE_MASK = 1 << 11 ,
  VTERM_ALL_ATTRS_MASK = (1 << 12) - 1
}
 

Functions

static int vterm_pos_cmp (VTermPos a, VTermPos b)
 
static int vterm_rect_contains (VTermRect r, VTermPos p)
 
static void vterm_rect_move (VTermRect *rect, int row_delta, int col_delta)
 
static void vterm_color_rgb (VTermColor *col, uint8_t red, uint8_t green, uint8_t blue)
 
static void vterm_color_indexed (VTermColor *col, uint8_t idx)
 
int vterm_color_is_equal (const VTermColor *a, const VTermColor *b)
 
void vterm_check_version (int major, int minor)
 
VTermvterm_build (const struct VTermBuilder *builder)
 
VTermvterm_new (int rows, int cols)
 
VTermvterm_new_with_allocator (int rows, int cols, VTermAllocatorFunctions *funcs, void *allocdata)
 
void vterm_free (VTerm *vt)
 
void vterm_get_size (const VTerm *vt, int *rowsp, int *colsp)
 
void vterm_set_size (VTerm *vt, int rows, int cols)
 
int vterm_get_utf8 (const VTerm *vt)
 
void vterm_set_utf8 (VTerm *vt, int is_utf8)
 
size_t vterm_input_write (VTerm *vt, const char *bytes, size_t len)
 
void vterm_output_set_callback (VTerm *vt, VTermOutputCallback *func, void *user)
 
size_t vterm_output_get_buffer_size (const VTerm *vt)
 
size_t vterm_output_get_buffer_current (const VTerm *vt)
 
size_t vterm_output_get_buffer_remaining (const VTerm *vt)
 
size_t vterm_output_read (VTerm *vt, char *buffer, size_t len)
 
void vterm_keyboard_unichar (VTerm *vt, uint32_t c, VTermModifier mod)
 
void vterm_keyboard_key (VTerm *vt, VTermKey key, VTermModifier mod)
 
void vterm_keyboard_start_paste (VTerm *vt)
 
void vterm_keyboard_end_paste (VTerm *vt)
 
void vterm_mouse_move (VTerm *vt, int row, int col, VTermModifier mod)
 
void vterm_mouse_button (VTerm *vt, int button, bool pressed, VTermModifier mod)
 
void vterm_parser_set_callbacks (VTerm *vt, const VTermParserCallbacks *callbacks, void *user)
 
void * vterm_parser_get_cbdata (VTerm *vt)
 
void vterm_parser_set_emit_nul (VTerm *vt, bool emit)
 
VTermStatevterm_obtain_state (VTerm *vt)
 
void vterm_state_set_callbacks (VTermState *state, const VTermStateCallbacks *callbacks, void *user)
 
void * vterm_state_get_cbdata (VTermState *state)
 
void vterm_state_set_unrecognised_fallbacks (VTermState *state, const VTermStateFallbacks *fallbacks, void *user)
 
void * vterm_state_get_unrecognised_fbdata (VTermState *state)
 
void vterm_state_reset (VTermState *state, int hard)
 
void vterm_state_get_cursorpos (const VTermState *state, VTermPos *cursorpos)
 
void vterm_state_get_default_colors (const VTermState *state, VTermColor *default_fg, VTermColor *default_bg)
 
void vterm_state_get_palette_color (const VTermState *state, int index, VTermColor *col)
 
void vterm_state_set_default_colors (VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg)
 
void vterm_state_set_palette_color (VTermState *state, int index, const VTermColor *col)
 
void vterm_state_set_bold_highbright (VTermState *state, int bold_is_highbright)
 
int vterm_state_get_penattr (const VTermState *state, VTermAttr attr, VTermValue *val)
 
int vterm_state_set_termprop (VTermState *state, VTermProp prop, VTermValue *val)
 
void vterm_state_focus_in (VTermState *state)
 
void vterm_state_focus_out (VTermState *state)
 
const VTermLineInfovterm_state_get_lineinfo (const VTermState *state, int row)
 
void vterm_state_convert_color_to_rgb (const VTermState *state, VTermColor *col)
 
void vterm_state_set_selection_callbacks (VTermState *state, const VTermSelectionCallbacks *callbacks, void *user, char *buffer, size_t buflen)
 
void vterm_state_send_selection (VTermState *state, VTermSelectionMask mask, VTermStringFragment frag)
 
VTermScreenvterm_obtain_screen (VTerm *vt)
 
void vterm_screen_set_callbacks (VTermScreen *screen, const VTermScreenCallbacks *callbacks, void *user)
 
void * vterm_screen_get_cbdata (VTermScreen *screen)
 
void vterm_screen_set_unrecognised_fallbacks (VTermScreen *screen, const VTermStateFallbacks *fallbacks, void *user)
 
void * vterm_screen_get_unrecognised_fbdata (VTermScreen *screen)
 
void vterm_screen_enable_reflow (VTermScreen *screen, bool reflow)
 
void vterm_screen_enable_altscreen (VTermScreen *screen, int altscreen)
 
void vterm_screen_flush_damage (VTermScreen *screen)
 
void vterm_screen_set_damage_merge (VTermScreen *screen, VTermDamageSize size)
 
void vterm_screen_reset (VTermScreen *screen, int hard)
 
size_t vterm_screen_get_chars (const VTermScreen *screen, uint32_t *chars, size_t len, const VTermRect rect)
 
size_t vterm_screen_get_text (const VTermScreen *screen, char *str, size_t len, const VTermRect rect)
 
int vterm_screen_get_attrs_extent (const VTermScreen *screen, VTermRect *extent, VTermPos pos, VTermAttrMask attrs)
 
int vterm_screen_get_cell (const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell)
 
int vterm_screen_is_eol (const VTermScreen *screen, VTermPos pos)
 
void vterm_screen_convert_color_to_rgb (const VTermScreen *screen, VTermColor *col)
 
void vterm_screen_set_default_colors (VTermScreen *screen, const VTermColor *default_fg, const VTermColor *default_bg)
 
VTermValueType vterm_get_attr_type (VTermAttr attr)
 
VTermValueType vterm_get_prop_type (VTermProp prop)
 
void vterm_scroll_rect (VTermRect rect, int downward, int rightward, int(*moverect)(VTermRect src, VTermRect dest, void *user), int(*eraserect)(VTermRect rect, int selective, void *user), void *user)
 
void vterm_copy_cells (VTermRect dest, VTermRect src, void(*copycell)(VTermPos dest, VTermPos src, void *user), void *user)
 

Data Structure Documentation

◆ VTermPos

struct VTermPos

Definition at line 30 of file vterm.h.

+ Collaboration diagram for VTermPos:
Data Fields
int col
int row

◆ VTermRect

struct VTermRect

Definition at line 43 of file vterm.h.

+ Collaboration diagram for VTermRect:
Data Fields
int end_col
int end_row
int start_col
int start_row

◆ VTermColor

union VTermColor

Tagged union storing either an RGB color or an index into a colour palette. In order to convert indexed colours to RGB, you may use the vterm_state_convert_color_to_rgb() or vterm_screen_convert_color_to_rgb() functions which lookup the RGB colour from the palette maintained by a VTermState or VTermScreen instance.

Definition at line 142 of file vterm.h.

+ Collaboration diagram for VTermColor:
Data Fields
struct VTermColor.indexed indexed

If VTERM_COLOR_IS_INDEXED(type) is true, this member holds the index into the colour palette.

struct VTermColor.rgb rgb

Valid if VTERM_COLOR_IS_RGB(type) is true. Holds the RGB colour values.

uint8_t type

Tag indicating which union member is actually valid. This variable coincides with the type member of the rgb and the indexed struct in memory. Please use the VTERM_COLOR_IS_* test macros to check whether a particular type flag is set.

◆ VTermStringFragment

struct VTermStringFragment

Definition at line 220 of file vterm.h.

+ Collaboration diagram for VTermStringFragment:
Data Fields
bool final: 1
bool initial: 1
size_t len: 30
const char * str

◆ VTermValue

union VTermValue

Definition at line 227 of file vterm.h.

+ Collaboration diagram for VTermValue:
Data Fields
int boolean
VTermColor color
int number
VTermStringFragment string

◆ VTermGlyphInfo

struct VTermGlyphInfo

Definition at line 292 of file vterm.h.

+ Collaboration diagram for VTermGlyphInfo:
Data Fields
const uint32_t * chars
unsigned int dhl:2
unsigned int dwl:1
unsigned int protected_cell:1
int width

◆ VTermLineInfo

struct VTermLineInfo

Definition at line 300 of file vterm.h.

+ Collaboration diagram for VTermLineInfo:
Data Fields
unsigned int continuation:1
unsigned int doubleheight:2
unsigned int doublewidth:1

◆ VTermStateFields

struct VTermStateFields

Definition at line 311 of file vterm.h.

+ Collaboration diagram for VTermStateFields:
Data Fields
VTermLineInfo * lineinfos[2]
VTermPos pos

◆ VTermBuilder

struct VTermBuilder

Definition at line 325 of file vterm.h.

+ Collaboration diagram for VTermBuilder:
Data Fields
const VTermAllocatorFunctions * allocator
void * allocdata
int cols
size_t outbuffer_len
int rows
size_t tmpbuffer_len
int ver

◆ VTermScreenCellAttrs

struct VTermScreenCellAttrs

Definition at line 499 of file vterm.h.

+ Collaboration diagram for VTermScreenCellAttrs:
Data Fields
unsigned int baseline: 2
unsigned int blink: 1
unsigned int bold: 1
unsigned int conceal: 1
unsigned int dhl: 2
unsigned int dwl: 1
unsigned int font: 4
unsigned int italic: 1
unsigned int reverse: 1
unsigned int small: 1
unsigned int strike: 1
unsigned int underline: 2

◆ VTermScreenCell

struct VTermScreenCell

Definition at line 527 of file vterm.h.

+ Collaboration diagram for VTermScreenCell:
Data Fields
VTermScreenCellAttrs attrs
VTermColor bg
uint32_t chars[VTERM_MAX_CHARS_PER_CELL]
VTermColor fg
char width

◆ VTermColor.rgb

struct VTermColor.rgb

Valid if VTERM_COLOR_IS_RGB(type) is true. Holds the RGB colour values.

Definition at line 154 of file vterm.h.

+ Collaboration diagram for VTermColor.rgb:
Data Fields
uint8_t blue
uint8_t green
uint8_t red

The actual 8-bit red, green, blue colour values.

uint8_t type

Same as the top-level type member stored in VTermColor.

◆ VTermColor.indexed

struct VTermColor.indexed

If VTERM_COLOR_IS_INDEXED(type) is true, this member holds the index into the colour palette.

Definition at line 170 of file vterm.h.

+ Collaboration diagram for VTermColor.indexed:
Data Fields
uint8_t idx

Index into the colour map.

uint8_t type

Same as the top-level type member stored in VTermColor.

Macro Definition Documentation

◆ CSI_ARG

#define CSI_ARG (   a)    ((a) & CSI_ARG_MASK)

Definition at line 393 of file vterm.h.

◆ CSI_ARG_COUNT

#define CSI_ARG_COUNT (   a)    (CSI_ARG(a) == CSI_ARG_MISSING || CSI_ARG(a) == 0 ? 1 : CSI_ARG(a))

Definition at line 400 of file vterm.h.

◆ CSI_ARG_FLAG_MORE

#define CSI_ARG_FLAG_MORE   (1U<<31)

Definition at line 389 of file vterm.h.

◆ CSI_ARG_HAS_MORE

#define CSI_ARG_HAS_MORE (   a)    ((a) & CSI_ARG_FLAG_MORE)

Definition at line 392 of file vterm.h.

◆ CSI_ARG_IS_MISSING

#define CSI_ARG_IS_MISSING (   a)    (CSI_ARG(a) == CSI_ARG_MISSING)

Definition at line 398 of file vterm.h.

◆ CSI_ARG_MASK

#define CSI_ARG_MASK   (~(1U<<31))

Definition at line 390 of file vterm.h.

◆ CSI_ARG_MISSING

#define CSI_ARG_MISSING   ((1UL<<31)-1)

Definition at line 396 of file vterm.h.

◆ CSI_ARG_OR

#define CSI_ARG_OR (   a,
  def 
)    (CSI_ARG(a) == CSI_ARG_MISSING ? (def) : CSI_ARG(a))

Definition at line 399 of file vterm.h.

◆ VTERM_CHECK_VERSION

#define VTERM_CHECK_VERSION    vterm_check_version(VTERM_VERSION_MAJOR, VTERM_VERSION_MINOR)

Definition at line 18 of file vterm.h.

◆ VTERM_COLOR_IS_DEFAULT_BG

#define VTERM_COLOR_IS_DEFAULT_BG (   col)     (!!((col)->type & VTERM_COLOR_DEFAULT_BG))

Returns true if the VTERM_COLOR_DEFAULT_BG type flag is set, indicating that the given VTermColor instance corresponds to the default background color.

Definition at line 132 of file vterm.h.

◆ VTERM_COLOR_IS_DEFAULT_FG

#define VTERM_COLOR_IS_DEFAULT_FG (   col)     (!!((col)->type & VTERM_COLOR_DEFAULT_FG))

Returns true if the VTERM_COLOR_DEFAULT_FG type flag is set, indicating that the given VTermColor instance corresponds to the default foreground color.

Definition at line 124 of file vterm.h.

◆ VTERM_COLOR_IS_INDEXED

#define VTERM_COLOR_IS_INDEXED (   col)     (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_INDEXED)

Returns true if the VTERM_COLOR_RGB type flag is set, indicating that the given VTermColor instance is an indexed colour.

Definition at line 109 of file vterm.h.

◆ VTERM_COLOR_IS_RGB

#define VTERM_COLOR_IS_RGB (   col)     (((col)->type & VTERM_COLOR_TYPE_MASK) == VTERM_COLOR_RGB)

Returns true if the VTERM_COLOR_INDEXED type flag is set, indicating that the given VTermColor instance is an rgb colour.

Definition at line 116 of file vterm.h.

◆ VTERM_MAX_CHARS_PER_CELL

#define VTERM_MAX_CHARS_PER_CELL   6

Definition at line 24 of file vterm.h.

◆ vterm_screen_set_reflow

#define vterm_screen_set_reflow   vterm_screen_enable_reflow

Definition at line 557 of file vterm.h.

◆ VTERM_VERSION_MAJOR

#define VTERM_VERSION_MAJOR   0

Definition at line 14 of file vterm.h.

◆ VTERM_VERSION_MINOR

#define VTERM_VERSION_MINOR   3

Definition at line 15 of file vterm.h.

◆ VTERM_VERSION_PATCH

#define VTERM_VERSION_PATCH   3

Definition at line 16 of file vterm.h.

Typedef Documentation

◆ VTerm

typedef struct VTerm VTerm

Definition at line 26 of file vterm.h.

◆ VTermOutputCallback

typedef void VTermOutputCallback(const char *s, size_t len, void *user)

Definition at line 356 of file vterm.h.

◆ VTermScreen

typedef struct VTermScreen VTermScreen

Definition at line 28 of file vterm.h.

◆ VTermState

typedef struct VTermState VTermState

Definition at line 27 of file vterm.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
VTERM_PROP_CURSORSHAPE_BLOCK 
VTERM_PROP_CURSORSHAPE_UNDERLINE 
VTERM_PROP_CURSORSHAPE_BAR_LEFT 
VTERM_N_PROP_CURSORSHAPES 

Definition at line 267 of file vterm.h.

◆ anonymous enum

anonymous enum
Enumerator
VTERM_PROP_MOUSE_NONE 
VTERM_PROP_MOUSE_CLICK 
VTERM_PROP_MOUSE_DRAG 
VTERM_PROP_MOUSE_MOVE 
VTERM_N_PROP_MOUSES 

Definition at line 275 of file vterm.h.

◆ anonymous enum

anonymous enum
Enumerator
VTERM_UNDERLINE_OFF 
VTERM_UNDERLINE_SINGLE 
VTERM_UNDERLINE_DOUBLE 
VTERM_UNDERLINE_CURLY 

Definition at line 514 of file vterm.h.

◆ anonymous enum

anonymous enum
Enumerator
VTERM_BASELINE_NORMAL 
VTERM_BASELINE_RAISE 
VTERM_BASELINE_LOWER 

Definition at line 521 of file vterm.h.

◆ VTermAttr

enum VTermAttr
Enumerator
VTERM_ATTR_BOLD 
VTERM_ATTR_UNDERLINE 
VTERM_ATTR_ITALIC 
VTERM_ATTR_BLINK 
VTERM_ATTR_REVERSE 
VTERM_ATTR_CONCEAL 
VTERM_ATTR_STRIKE 
VTERM_ATTR_FONT 
VTERM_ATTR_FOREGROUND 
VTERM_ATTR_BACKGROUND 
VTERM_ATTR_SMALL 
VTERM_ATTR_BASELINE 
VTERM_N_ATTRS 

Definition at line 234 of file vterm.h.

◆ VTermAttrMask

Enumerator
VTERM_ATTR_BOLD_MASK 
VTERM_ATTR_UNDERLINE_MASK 
VTERM_ATTR_ITALIC_MASK 
VTERM_ATTR_BLINK_MASK 
VTERM_ATTR_REVERSE_MASK 
VTERM_ATTR_STRIKE_MASK 
VTERM_ATTR_FONT_MASK 
VTERM_ATTR_FOREGROUND_MASK 
VTERM_ATTR_BACKGROUND_MASK 
VTERM_ATTR_CONCEAL_MASK 
VTERM_ATTR_SMALL_MASK 
VTERM_ATTR_BASELINE_MASK 
VTERM_ALL_ATTRS_MASK 

Definition at line 579 of file vterm.h.

◆ VTermColorType

Bit-field describing the content of the tagged union VTermColor.

Enumerator
VTERM_COLOR_RGB 

If the lower bit of type is not set, the colour is 24-bit RGB.

VTERM_COLOR_INDEXED 

The colour is an index into a palette of 256 colours.

VTERM_COLOR_TYPE_MASK 

Mask that can be used to extract the RGB/Indexed bit.

VTERM_COLOR_DEFAULT_FG 

If set, indicates that this colour should be the default foreground color, i.e. there was no SGR request for another colour. When rendering this colour it is possible to ignore "idx" and just use a colour that is not in the palette.

VTERM_COLOR_DEFAULT_BG 

If set, indicates that this colour should be the default background color, i.e. there was no SGR request for another colour. A common option when rendering this colour is to not render a background at all, for example by rendering the window transparently at this spot.

VTERM_COLOR_DEFAULT_MASK 

Mask that can be used to extract the default foreground/background bit.

Definition at line 67 of file vterm.h.

◆ VTermDamageSize

Enumerator
VTERM_DAMAGE_CELL 
VTERM_DAMAGE_ROW 
VTERM_DAMAGE_SCREEN 
VTERM_DAMAGE_SCROLL 
VTERM_N_DAMAGES 

Definition at line 561 of file vterm.h.

◆ VTermProp

enum VTermProp
Enumerator
VTERM_PROP_CURSORVISIBLE 
VTERM_PROP_CURSORBLINK 
VTERM_PROP_ALTSCREEN 
VTERM_PROP_TITLE 
VTERM_PROP_ICONNAME 
VTERM_PROP_REVERSE 
VTERM_PROP_CURSORSHAPE 
VTERM_PROP_MOUSE 
VTERM_PROP_FOCUSREPORT 
VTERM_N_PROPS 

Definition at line 252 of file vterm.h.

◆ VTermSelectionMask

Enumerator
VTERM_SELECTION_CLIPBOARD 
VTERM_SELECTION_PRIMARY 
VTERM_SELECTION_SECONDARY 
VTERM_SELECTION_SELECT 
VTERM_SELECTION_CUT0 

Definition at line 284 of file vterm.h.

◆ VTermValueType

Enumerator
VTERM_VALUETYPE_BOOL 
VTERM_VALUETYPE_INT 
VTERM_VALUETYPE_STRING 
VTERM_VALUETYPE_COLOR 
VTERM_N_VALUETYPES 

Definition at line 210 of file vterm.h.

Function Documentation

◆ vterm_build()

VTerm * vterm_build ( const struct VTermBuilder builder)

Definition at line 51 of file vterm.c.

References VTermBuilder::allocator, VTerm::allocator, VTermBuilder::allocdata, VTerm::allocdata, VTermBuilder::cols, VTerm::cols, DEFAULT, default_allocator, VTerm::outbuffer, VTerm::outbuffer_cur, VTermBuilder::outbuffer_len, VTerm::outbuffer_len, VTerm::outdata, VTerm::outfunc, VTerm::parser, VTermBuilder::rows, VTerm::rows, VTerm::state, VTerm::tmpbuffer, VTermBuilder::tmpbuffer_len, VTerm::tmpbuffer_len, vt, and vterm_allocator_malloc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_check_version()

void vterm_check_version ( int  major,
int  minor 
)

Definition at line 415 of file vterm.c.

References VTERM_VERSION_MAJOR, and VTERM_VERSION_MINOR.

◆ vterm_color_indexed()

static void vterm_color_indexed ( VTermColor col,
uint8_t  idx 
)
inlinestatic

Construct a new VTermColor instance representing an indexed color with the given index.

Definition at line 199 of file vterm.h.

References VTermColor::indexed, VTermColor::type, and VTERM_COLOR_INDEXED.

+ Here is the caller graph for this function:

◆ vterm_color_is_equal()

int vterm_color_is_equal ( const VTermColor a,
const VTermColor b 
)

Compares two colours. Returns true if the colors are equal, false otherwise.

Definition at line 211 of file pen.c.

References VTermColor::indexed, VTermColor::rgb, VTermColor::type, VTERM_COLOR_IS_INDEXED, and VTERM_COLOR_IS_RGB.

+ Here is the caller graph for this function:

◆ vterm_color_rgb()

static void vterm_color_rgb ( VTermColor col,
uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
inlinestatic

Constructs a new VTermColor instance representing the given RGB values.

Definition at line 186 of file vterm.h.

References VTermColor::rgb, VTermColor::type, and VTERM_COLOR_RGB.

+ Here is the caller graph for this function:

◆ vterm_copy_cells()

void vterm_copy_cells ( VTermRect  dest,
VTermRect  src,
void(*)(VTermPos dest, VTermPos src, void *user)  copycell,
void *  user 
)

Definition at line 374 of file vterm.c.

References VTermPos::col, and VTermPos::row.

◆ vterm_free()

void vterm_free ( VTerm vt)

Definition at line 84 of file vterm.c.

References VTerm::outbuffer, VTerm::screen, VTerm::state, VTerm::tmpbuffer, vt, vterm_allocator_free(), vterm_screen_free(), and vterm_state_free().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_get_attr_type()

VTermValueType vterm_get_attr_type ( VTermAttr  attr)

Definition at line 266 of file vterm.c.

References VTERM_ATTR_BACKGROUND, VTERM_ATTR_BASELINE, VTERM_ATTR_BLINK, VTERM_ATTR_BOLD, VTERM_ATTR_CONCEAL, VTERM_ATTR_FONT, VTERM_ATTR_FOREGROUND, VTERM_ATTR_ITALIC, VTERM_ATTR_REVERSE, VTERM_ATTR_SMALL, VTERM_ATTR_STRIKE, VTERM_ATTR_UNDERLINE, VTERM_N_ATTRS, VTERM_VALUETYPE_BOOL, VTERM_VALUETYPE_COLOR, and VTERM_VALUETYPE_INT.

+ Here is the caller graph for this function:

◆ vterm_get_prop_type()

VTermValueType vterm_get_prop_type ( VTermProp  prop)

Definition at line 287 of file vterm.c.

References VTERM_N_PROPS, VTERM_PROP_ALTSCREEN, VTERM_PROP_CURSORBLINK, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORVISIBLE, VTERM_PROP_FOCUSREPORT, VTERM_PROP_ICONNAME, VTERM_PROP_MOUSE, VTERM_PROP_REVERSE, VTERM_PROP_TITLE, VTERM_VALUETYPE_BOOL, VTERM_VALUETYPE_INT, and VTERM_VALUETYPE_STRING.

+ Here is the caller graph for this function:

◆ vterm_get_size()

void vterm_get_size ( const VTerm vt,
int *  rowsp,
int *  colsp 
)

Definition at line 108 of file vterm.c.

References VTerm::cols, VTerm::rows, and vt.

+ Here is the caller graph for this function:

◆ vterm_get_utf8()

int vterm_get_utf8 ( const VTerm vt)

Definition at line 128 of file vterm.c.

References VTerm::mode, and vt.

◆ vterm_input_write()

size_t vterm_input_write ( VTerm vt,
const char *  bytes,
size_t  len 
)

Definition at line 111 of file parser.c.

References CSI_ARG_FLAG_MORE, CSI_ARG_MISSING, CSI_LEADER_MAX, DEBUG_LOG, do_control(), do_csi(), do_escape(), ENTER_NORMAL_STATE, ENTER_STATE, INTERMED_MAX, is_intermed(), IS_STRING_STATE, VTerm::mode, VTerm::parser, VTerm::state, string_fragment(), and vt.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_keyboard_end_paste()

void vterm_keyboard_end_paste ( VTerm vt)

Definition at line 222 of file keyboard.c.

References C1_CSI, VTermState::mode, VTerm::state, vt, and vterm_push_output_sprintf_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_keyboard_key()

void vterm_keyboard_key ( VTerm vt,
VTermKey  key,
VTermModifier  mod 
)

Definition at line 128 of file keyboard.c.

References C1_CSI, C1_SS3, keycodes_s::csinum, ESC_S, keycodes, keycodes_fn, keycodes_kp, keycodes_s::literal, VTermState::mode, VTerm::state, keycodes_s::type, vt, VTERM_KEY_FUNCTION_0, VTERM_KEY_FUNCTION_MAX, VTERM_KEY_KP_0, VTERM_KEY_NONE, VTERM_MOD_ALT, VTERM_MOD_CTRL, VTERM_MOD_SHIFT, vterm_push_output_sprintf(), and vterm_push_output_sprintf_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_keyboard_start_paste()

void vterm_keyboard_start_paste ( VTerm vt)

Definition at line 216 of file keyboard.c.

References C1_CSI, VTermState::mode, VTerm::state, vt, and vterm_push_output_sprintf_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_keyboard_unichar()

void vterm_keyboard_unichar ( VTerm vt,
uint32_t  c,
VTermModifier  mod 
)

Definition at line 7 of file keyboard.c.

References C1_CSI, ESC_S, fill_utf8(), vt, VTERM_MOD_ALT, VTERM_MOD_CTRL, VTERM_MOD_SHIFT, vterm_push_output_bytes(), vterm_push_output_sprintf(), and vterm_push_output_sprintf_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_mouse_button()

void vterm_mouse_button ( VTerm vt,
int  button,
bool  pressed,
VTermModifier  mod 
)

Definition at line 73 of file mouse.c.

References VTermState::mouse_buttons, VTermState::mouse_col, VTermState::mouse_flags, VTermState::mouse_row, output_mouse(), VTerm::state, state, and vt.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_mouse_move()

void vterm_mouse_move ( VTerm vt,
int  row,
int  col,
VTermModifier  mod 
)

Definition at line 54 of file mouse.c.

References VTermState::mouse_buttons, VTermState::mouse_col, VTermState::mouse_flags, VTermState::mouse_row, MOUSE_WANT_DRAG, MOUSE_WANT_MOVE, output_mouse(), VTerm::state, state, and vt.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_new()

VTerm * vterm_new ( int  rows,
int  cols 
)

Definition at line 30 of file vterm.c.

References cols, rows, and vterm_build().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_new_with_allocator()

VTerm * vterm_new_with_allocator ( int  rows,
int  cols,
VTermAllocatorFunctions funcs,
void *  allocdata 
)

Definition at line 38 of file vterm.c.

References cols, rows, and vterm_build().

+ Here is the call graph for this function:

◆ vterm_obtain_screen()

VTermScreen * vterm_obtain_screen ( VTerm vt)

Definition at line 1021 of file screen.c.

References VTerm::screen, screen, screen_new(), and vt.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_obtain_state()

VTermState * vterm_obtain_state ( VTerm vt)

Definition at line 2059 of file state.c.

References parser_callbacks, VTerm::state, state, vt, vterm_parser_set_callbacks(), and vterm_state_new().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_output_get_buffer_current()

size_t vterm_output_get_buffer_current ( const VTerm vt)

Definition at line 241 of file vterm.c.

References VTerm::outbuffer_cur, and vt.

+ Here is the caller graph for this function:

◆ vterm_output_get_buffer_remaining()

size_t vterm_output_get_buffer_remaining ( const VTerm vt)

Definition at line 246 of file vterm.c.

References VTerm::outbuffer_cur, VTerm::outbuffer_len, and vt.

◆ vterm_output_get_buffer_size()

size_t vterm_output_get_buffer_size ( const VTerm vt)

Definition at line 236 of file vterm.c.

References VTerm::outbuffer_len, and vt.

◆ vterm_output_read()

size_t vterm_output_read ( VTerm vt,
char *  buffer,
size_t  len 
)

Definition at line 251 of file vterm.c.

References memcpy(), memmove(), VTerm::outbuffer, VTerm::outbuffer_cur, and vt.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_output_set_callback()

void vterm_output_set_callback ( VTerm vt,
VTermOutputCallback func,
void *  user 
)

Definition at line 138 of file vterm.c.

References VTerm::outdata, VTerm::outfunc, and vt.

+ Here is the caller graph for this function:

◆ vterm_parser_get_cbdata()

void * vterm_parser_get_cbdata ( VTerm vt)

Definition at line 394 of file parser.c.

References VTerm::parser, and vt.

◆ vterm_parser_set_callbacks()

void vterm_parser_set_callbacks ( VTerm vt,
const VTermParserCallbacks callbacks,
void *  user 
)

Definition at line 388 of file parser.c.

References VTerm::parser, and vt.

+ Here is the caller graph for this function:

◆ vterm_parser_set_emit_nul()

void vterm_parser_set_emit_nul ( VTerm vt,
bool  emit 
)

Definition at line 399 of file parser.c.

References VTerm::parser, and vt.

+ Here is the caller graph for this function:

◆ vterm_pos_cmp()

static int vterm_pos_cmp ( VTermPos  a,
VTermPos  b 
)
inlinestatic

Definition at line 38 of file vterm.h.

References VTermPos::col, and VTermPos::row.

◆ vterm_rect_contains()

static int vterm_rect_contains ( VTermRect  r,
VTermPos  p 
)
inlinestatic

◆ vterm_rect_move()

static void vterm_rect_move ( VTermRect rect,
int  row_delta,
int  col_delta 
)
inlinestatic

Definition at line 58 of file vterm.h.

References VTermRect::end_col, VTermRect::end_row, VTermRect::start_col, and VTermRect::start_row.

+ Here is the caller graph for this function:

◆ vterm_screen_convert_color_to_rgb()

void vterm_screen_convert_color_to_rgb ( const VTermScreen screen,
VTermColor col 
)

Same as vterm_state_convert_color_to_rgb(), but takes a screen instead of a state instance.

Definition at line 1155 of file screen.c.

References screen, VTermScreen::state, and vterm_state_convert_color_to_rgb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_enable_altscreen()

void vterm_screen_enable_altscreen ( VTermScreen screen,
int  altscreen 
)

Definition at line 1043 of file screen.c.

References alloc_buffer(), VTermScreen::buffers, BUFIDX_ALTSCREEN, cols, rows, screen, VTermScreen::vt, and vterm_get_size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_enable_reflow()

void vterm_screen_enable_reflow ( VTermScreen screen,
bool  reflow 
)

Definition at line 1032 of file screen.c.

References VTermScreen::reflow, and screen.

+ Here is the caller graph for this function:

◆ vterm_screen_flush_damage()

void vterm_screen_flush_damage ( VTermScreen screen)

Definition at line 1074 of file screen.c.

References VTermScreen::callbacks, VTermScreen::cbdata, VTermScreenCallbacks::damage, VTermScreen::damaged, erase_user(), moverect_user(), VTermScreen::pending_scroll_downward, VTermScreen::pending_scroll_rightward, VTermScreen::pending_scrollrect, screen, VTermRect::start_row, and vterm_scroll_rect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_get_attrs_extent()

int vterm_screen_get_attrs_extent ( const VTermScreen screen,
VTermRect extent,
VTermPos  pos,
VTermAttrMask  attrs 
)

Definition at line 1127 of file screen.c.

References attrs_differ(), VTermPos::col, VTermScreen::cols, VTermRect::end_col, VTermRect::end_row, getcell(), VTermPos::row, screen, VTermRect::start_col, and VTermRect::start_row.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_get_cbdata()

void * vterm_screen_get_cbdata ( VTermScreen screen)

Definition at line 1059 of file screen.c.

References VTermScreen::cbdata, and screen.

◆ vterm_screen_get_cell()

◆ vterm_screen_get_chars()

size_t vterm_screen_get_chars ( const VTermScreen screen,
uint32_t chars,
size_t  len,
const VTermRect  rect 
)

Definition at line 960 of file screen.c.

References _get_chars(), and screen.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_get_text()

size_t vterm_screen_get_text ( const VTermScreen screen,
char *  str,
size_t  len,
const VTermRect  rect 
)

Definition at line 965 of file screen.c.

References _get_chars(), and screen.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_get_unrecognised_fbdata()

void * vterm_screen_get_unrecognised_fbdata ( VTermScreen screen)

Definition at line 1069 of file screen.c.

References screen, VTermScreen::state, and vterm_state_get_unrecognised_fbdata().

+ Here is the call graph for this function:

◆ vterm_screen_is_eol()

int vterm_screen_is_eol ( const VTermScreen screen,
VTermPos  pos 
)

Definition at line 1009 of file screen.c.

References ScreenCell::chars, VTermPos::col, VTermScreen::cols, getcell(), VTermPos::row, and screen.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_reset()

void vterm_screen_reset ( VTermScreen screen,
int  hard 
)

Definition at line 902 of file screen.c.

References VTermScreen::damaged, VTermScreen::pending_scrollrect, screen, VTermRect::start_row, VTermScreen::state, vterm_screen_flush_damage(), and vterm_state_reset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_set_callbacks()

void vterm_screen_set_callbacks ( VTermScreen screen,
const VTermScreenCallbacks callbacks,
void *  user 
)

Definition at line 1053 of file screen.c.

References VTermScreen::callbacks, VTermScreen::cbdata, and screen.

+ Here is the caller graph for this function:

◆ vterm_screen_set_damage_merge()

void vterm_screen_set_damage_merge ( VTermScreen screen,
VTermDamageSize  size 
)

Definition at line 1091 of file screen.c.

References VTermScreen::damage_merge, screen, size, and vterm_screen_flush_damage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_set_default_colors()

void vterm_screen_set_default_colors ( VTermScreen screen,
const VTermColor default_fg,
const VTermColor default_bg 
)

Similar to vterm_state_set_default_colors(), but also resets colours in the screen buffer(s)

Definition at line 1172 of file screen.c.

References ScreenPen::bg, VTermScreen::buffers, ScreenPen::fg, VTermScreen::pen, reset_default_colours(), screen, VTermScreen::state, VTermColor::type, VTERM_COLOR_DEFAULT_BG, VTERM_COLOR_DEFAULT_FG, VTERM_COLOR_IS_DEFAULT_BG, VTERM_COLOR_IS_DEFAULT_FG, and vterm_state_set_default_colors().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_screen_set_unrecognised_fallbacks()

void vterm_screen_set_unrecognised_fallbacks ( VTermScreen screen,
const VTermStateFallbacks fallbacks,
void *  user 
)

Definition at line 1064 of file screen.c.

References fallbacks, screen, VTermScreen::state, and vterm_state_set_unrecognised_fallbacks().

+ Here is the call graph for this function:

◆ vterm_scroll_rect()

void vterm_scroll_rect ( VTermRect  rect,
int  downward,
int  rightward,
int(*)(VTermRect src, VTermRect dest, void *user)  moverect,
int(*)(VTermRect rect, int selective, void *user)  eraserect,
void *  user 
)

Definition at line 305 of file vterm.c.

References VTermRect::end_col, VTermRect::end_row, moverect(), VTermRect::start_col, and VTermRect::start_row.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_set_size()

void vterm_set_size ( VTerm vt,
int  rows,
int  cols 
)

Definition at line 116 of file vterm.c.

References cols, VTerm::cols, VTerm::parser, rows, VTerm::rows, and vt.

+ Here is the caller graph for this function:

◆ vterm_set_utf8()

void vterm_set_utf8 ( VTerm vt,
int  is_utf8 
)

Definition at line 133 of file vterm.c.

References VTerm::mode, and vt.

+ Here is the caller graph for this function:

◆ vterm_state_convert_color_to_rgb()

void vterm_state_convert_color_to_rgb ( const VTermState state,
VTermColor col 
)

Makes sure that the given color col is indeed an RGB colour. After this function returns, VTERM_COLOR_IS_RGB(col) will return true, while all other flags stored in col->type will have been reset.

Parameters
stateis the VTermState instance from which the colour palette should be extracted.
colis a pointer at the VTermColor instance that should be converted to an RGB colour.

Definition at line 263 of file pen.c.

References VTermColor::indexed, lookup_colour_palette(), state, VTermColor::type, VTERM_COLOR_IS_INDEXED, and VTERM_COLOR_TYPE_MASK.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_state_focus_in()

void vterm_state_focus_in ( VTermState state)

Definition at line 2239 of file state.c.

References C1_CSI, VTermState::mode, state, VTermState::vt, and vterm_push_output_sprintf_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_state_focus_out()

void vterm_state_focus_out ( VTermState state)

Definition at line 2245 of file state.c.

References C1_CSI, VTermState::mode, state, VTermState::vt, and vterm_push_output_sprintf_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_state_get_cbdata()

void * vterm_state_get_cbdata ( VTermState state)

Definition at line 2159 of file state.c.

References VTermState::cbdata, and state.

◆ vterm_state_get_cursorpos()

void vterm_state_get_cursorpos ( const VTermState state,
VTermPos cursorpos 
)

Definition at line 2139 of file state.c.

References VTermState::pos, and state.

+ Here is the caller graph for this function:

◆ vterm_state_get_default_colors()

void vterm_state_get_default_colors ( const VTermState state,
VTermColor default_fg,
VTermColor default_bg 
)

Definition at line 231 of file pen.c.

References VTermState::default_bg, VTermState::default_fg, and state.

+ Here is the caller graph for this function:

◆ vterm_state_get_lineinfo()

const VTermLineInfo * vterm_state_get_lineinfo ( const VTermState state,
int  row 
)

Definition at line 2251 of file state.c.

References VTermState::lineinfo, and state.

+ Here is the caller graph for this function:

◆ vterm_state_get_palette_color()

void vterm_state_get_palette_color ( const VTermState state,
int  index,
VTermColor col 
)

Definition at line 237 of file pen.c.

References lookup_colour_palette(), and state.

+ Here is the call graph for this function:

◆ vterm_state_get_penattr()

◆ vterm_state_get_unrecognised_fbdata()

void * vterm_state_get_unrecognised_fbdata ( VTermState state)

Definition at line 2176 of file state.c.

References VTermState::fbdata, and state.

+ Here is the caller graph for this function:

◆ vterm_state_reset()

◆ vterm_state_send_selection()

void vterm_state_send_selection ( VTermState state,
VTermSelectionMask  mask,
VTermStringFragment  frag 
)

Definition at line 2268 of file state.c.

References base64_one(), C1_OSC, VTermStringFragment::final, VTermStringFragment::initial, VTermStringFragment::len, VTermState::selection, state, VTermStringFragment::str, VTermState::tmp, vt, VTermState::vt, vterm_push_output_bytes(), and vterm_push_output_sprintf_str().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_state_set_bold_highbright()

void vterm_state_set_bold_highbright ( VTermState state,
int  bold_is_highbright 
)

Definition at line 271 of file pen.c.

References VTermState::bold_is_highbright, and state.

+ Here is the caller graph for this function:

◆ vterm_state_set_callbacks()

void vterm_state_set_callbacks ( VTermState state,
const VTermStateCallbacks callbacks,
void *  user 
)

Definition at line 2144 of file state.c.

References VTermState::callbacks, VTermState::cbdata, VTermStateCallbacks::initpen, and state.

+ Here is the caller graph for this function:

◆ vterm_state_set_default_colors()

void vterm_state_set_default_colors ( VTermState state,
const VTermColor default_fg,
const VTermColor default_bg 
)

Definition at line 242 of file pen.c.

References VTermState::default_bg, VTermState::default_fg, state, VTermColor::type, VTERM_COLOR_DEFAULT_BG, and VTERM_COLOR_DEFAULT_FG.

+ Here is the caller graph for this function:

◆ vterm_state_set_palette_color()

void vterm_state_set_palette_color ( VTermState state,
int  index,
const VTermColor col 
)

Definition at line 257 of file pen.c.

References VTermState::colors, and state.

◆ vterm_state_set_selection_callbacks()

void vterm_state_set_selection_callbacks ( VTermState state,
const VTermSelectionCallbacks callbacks,
void *  user,
char *  buffer,
size_t  buflen 
)

Definition at line 2256 of file state.c.

References VTermState::callbacks, VTermState::selection, state, VTermState::vt, and vterm_allocator_malloc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_state_set_termprop()

int vterm_state_set_termprop ( VTermState state,
VTermProp  prop,
VTermValue val 
)

Definition at line 2181 of file state.c.

References VTermValue::boolean, BUFIDX_ALTSCREEN, BUFIDX_PRIMARY, VTermState::callbacks, VTermState::cbdata, VTermState::cols, erase(), VTermState::lineinfo, VTermState::lineinfos, VTermState::mode, VTermState::mouse_flags, MOUSE_WANT_CLICK, MOUSE_WANT_DRAG, MOUSE_WANT_MOVE, VTermValue::number, VTermState::rows, VTermStateCallbacks::settermprop, VTermRect::start_row, state, VTERM_N_PROPS, VTERM_PROP_ALTSCREEN, VTERM_PROP_CURSORBLINK, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORVISIBLE, VTERM_PROP_FOCUSREPORT, VTERM_PROP_ICONNAME, VTERM_PROP_MOUSE, VTERM_PROP_MOUSE_DRAG, VTERM_PROP_MOUSE_MOVE, VTERM_PROP_REVERSE, and VTERM_PROP_TITLE.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vterm_state_set_unrecognised_fallbacks()

void vterm_state_set_unrecognised_fallbacks ( VTermState state,
const VTermStateFallbacks fallbacks,
void *  user 
)

Definition at line 2164 of file state.c.

References VTermState::fallbacks, fallbacks, VTermState::fbdata, and state.

+ Here is the caller graph for this function: