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

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

#include "vterm_internal.h"
#include <stdio.h>
#include <string.h>
#include "rect.h"
#include "utf8.h"
+ Include dependency graph for screen.c:

Go to the source code of this file.

Data Structures

struct  ScreenPen
 
struct  ScreenCell
 
struct  VTermScreen
 

Macros

#define UNICODE_SPACE   0x20
 
#define UNICODE_LINEFEED   0x0a
 
#define REFLOW   (screen->reflow)
 
#define PUT(c)
 

Functions

static void clearcell (const VTermScreen *screen, ScreenCell *cell)
 
static ScreenCellgetcell (const VTermScreen *screen, int row, int col)
 
static ScreenCellalloc_buffer (VTermScreen *screen, int rows, int cols)
 
static void damagerect (VTermScreen *screen, VTermRect rect)
 
static void damagescreen (VTermScreen *screen)
 
static int putglyph (VTermGlyphInfo *info, VTermPos pos, void *user)
 
static void sb_pushline_from_row (VTermScreen *screen, int row)
 
static int moverect_internal (VTermRect dest, VTermRect src, void *user)
 
static int moverect_user (VTermRect dest, VTermRect src, void *user)
 
static int erase_internal (VTermRect rect, int selective, void *user)
 
static int erase_user (VTermRect rect, int selective, void *user)
 
static int erase (VTermRect rect, int selective, void *user)
 
static int scrollrect (VTermRect rect, int downward, int rightward, void *user)
 
static int movecursor (VTermPos pos, VTermPos oldpos, int visible, void *user)
 
static int setpenattr (VTermAttr attr, VTermValue *val, void *user)
 
static int settermprop (VTermProp prop, VTermValue *val, void *user)
 
static int bell (void *user)
 
static int line_popcount (ScreenCell *buffer, int row, int rows, int cols)
 
static void resize_buffer (VTermScreen *screen, int bufidx, int new_rows, int new_cols, bool active, VTermStateFields *statefields)
 
static int resize (int new_rows, int new_cols, VTermStateFields *fields, void *user)
 
static int setlineinfo (int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)
 
static int sb_clear (void *user)
 
static VTermScreenscreen_new (VTerm *vt)
 
INTERNAL void vterm_screen_free (VTermScreen *screen)
 
void vterm_screen_reset (VTermScreen *screen, int hard)
 
static size_t _get_chars (const VTermScreen *screen, const int utf8, void *buffer, size_t len, const VTermRect rect)
 
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_cell (const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell)
 
int vterm_screen_is_eol (const VTermScreen *screen, VTermPos pos)
 
VTermScreenvterm_obtain_screen (VTerm *vt)
 
void vterm_screen_enable_reflow (VTermScreen *screen, bool reflow)
 
void vterm_screen_set_reflow (VTermScreen *screen, bool reflow)
 
void vterm_screen_enable_altscreen (VTermScreen *screen, int altscreen)
 
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_flush_damage (VTermScreen *screen)
 
void vterm_screen_set_damage_merge (VTermScreen *screen, VTermDamageSize size)
 
static int attrs_differ (VTermAttrMask attrs, ScreenCell *a, ScreenCell *b)
 
int vterm_screen_get_attrs_extent (const VTermScreen *screen, VTermRect *extent, VTermPos pos, VTermAttrMask attrs)
 
void vterm_screen_convert_color_to_rgb (const VTermScreen *screen, VTermColor *col)
 
static void reset_default_colours (VTermScreen *screen, ScreenCell *buffer)
 
void vterm_screen_set_default_colors (VTermScreen *screen, const VTermColor *default_fg, const VTermColor *default_bg)
 

Variables

static VTermStateCallbacks state_cbs
 

Data Structure Documentation

◆ ScreenPen

struct ScreenPen

Definition at line 15 of file screen.c.

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

◆ ScreenCell

struct ScreenCell

Definition at line 38 of file screen.c.

+ Collaboration diagram for ScreenCell:
Data Fields
uint32_t chars[VTERM_MAX_CHARS_PER_CELL]
ScreenPen pen

◆ VTermScreen

struct VTermScreen

Definition at line 44 of file screen.c.

+ Collaboration diagram for VTermScreen:
Data Fields
ScreenCell * buffer
ScreenCell * buffers[2]
const VTermScreenCallbacks * callbacks
void * cbdata
int cols
VTermDamageSize damage_merge
VTermRect damaged
unsigned int global_reverse: 1
ScreenPen pen
int pending_scroll_downward
int pending_scroll_rightward
VTermRect pending_scrollrect
unsigned int reflow: 1
int rows
VTermScreenCell * sb_buffer
VTermState * state
VTerm * vt

Macro Definition Documentation

◆ PUT

#define PUT (   c)
Value:
if(utf8) { \
size_t thislen = utf8_seqlen(c); \
if(buffer && outpos + thislen <= len) \
outpos += fill_utf8((c), (char *)buffer + outpos); \
else \
outpos += thislen; \
} \
else { \
if(buffer && outpos + 1 <= len) \
((uint32_t*)buffer)[outpos++] = (c); \
else \
outpos++; \
}
unsigned int uint32_t
Definition arch.h:11
static int fill_utf8(long codepoint, char *str)
Definition utf8.h:16
static unsigned int utf8_seqlen(long codepoint)
Definition utf8.h:5

◆ REFLOW

#define REFLOW   (screen->reflow)

Definition at line 505 of file screen.c.

◆ UNICODE_LINEFEED

#define UNICODE_LINEFEED   0x0a

Definition at line 10 of file screen.c.

◆ UNICODE_SPACE

#define UNICODE_SPACE   0x20

Definition at line 9 of file screen.c.

Function Documentation

◆ _get_chars()

static size_t _get_chars ( const VTermScreen screen,
const int  utf8,
void *  buffer,
size_t  len,
const VTermRect  rect 
)
static

Definition at line 910 of file screen.c.

References ScreenCell::chars, VTermRect::end_col, VTermRect::end_row, getcell(), PUT, screen, VTermRect::start_col, VTermRect::start_row, UNICODE_LINEFEED, UNICODE_SPACE, and VTERM_MAX_CHARS_PER_CELL.

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

◆ alloc_buffer()

static ScreenCell * alloc_buffer ( VTermScreen screen,
int  rows,
int  cols 
)
static

Definition at line 91 of file screen.c.

References clearcell(), cols, rows, screen, VTermScreen::vt, and vterm_allocator_malloc().

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

◆ attrs_differ()

static int attrs_differ ( VTermAttrMask  attrs,
ScreenCell a,
ScreenCell b 
)
static

Definition at line 1097 of file screen.c.

References ScreenPen::baseline, ScreenPen::bg, ScreenPen::blink, ScreenPen::bold, ScreenPen::conceal, ScreenPen::fg, ScreenPen::font, ScreenPen::italic, ScreenCell::pen, ScreenPen::reverse, ScreenPen::small, ScreenPen::strike, ScreenPen::underline, VTERM_ATTR_BACKGROUND_MASK, VTERM_ATTR_BASELINE_MASK, VTERM_ATTR_BLINK_MASK, VTERM_ATTR_BOLD_MASK, VTERM_ATTR_CONCEAL_MASK, VTERM_ATTR_FONT_MASK, VTERM_ATTR_FOREGROUND_MASK, VTERM_ATTR_ITALIC_MASK, VTERM_ATTR_REVERSE_MASK, VTERM_ATTR_SMALL_MASK, VTERM_ATTR_STRIKE_MASK, VTERM_ATTR_UNDERLINE_MASK, and vterm_color_is_equal().

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

◆ bell()

static int bell ( void *  user)
static

◆ clearcell()

static void clearcell ( const VTermScreen screen,
ScreenCell cell 
)
inlinestatic

Definition at line 76 of file screen.c.

References ScreenCell::chars, ScreenCell::pen, VTermScreen::pen, and screen.

+ Here is the caller graph for this function:

◆ damagerect()

static void damagerect ( VTermScreen screen,
VTermRect  rect 
)
static

Definition at line 104 of file screen.c.

References VTermScreen::callbacks, VTermScreen::cbdata, VTermScreenCallbacks::damage, VTermScreen::damage_merge, VTermScreen::damaged, DEBUG_LOG, VTermRect::end_col, VTermRect::end_row, rect_expand(), screen, VTermRect::start_col, VTermRect::start_row, VTERM_DAMAGE_CELL, VTERM_DAMAGE_ROW, VTERM_DAMAGE_SCREEN, VTERM_DAMAGE_SCROLL, and vterm_screen_flush_damage().

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

◆ damagescreen()

static void damagescreen ( VTermScreen screen)
static

Definition at line 161 of file screen.c.

References VTermScreen::cols, damagerect(), VTermScreen::rows, screen, and VTermRect::start_row.

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

◆ erase()

static int erase ( VTermRect  rect,
int  selective,
void *  user 
)
static

Definition at line 306 of file screen.c.

References erase_internal(), and erase_user().

+ Here is the call graph for this function:

◆ erase_internal()

static int erase_internal ( VTermRect  rect,
int  selective,
void *  user 
)
static

Definition at line 270 of file screen.c.

References ScreenPen::bg, ScreenCell::chars, ScreenPen::dhl, ScreenPen::dwl, VTermRect::end_col, VTermRect::end_row, ScreenPen::fg, getcell(), info, ScreenCell::pen, VTermScreen::pen, ScreenPen::protected_cell, VTermState::rows, screen, VTermRect::start_col, VTermRect::start_row, VTermScreen::state, and vterm_state_get_lineinfo().

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

◆ erase_user()

static int erase_user ( VTermRect  rect,
int  selective,
void *  user 
)
static

Definition at line 297 of file screen.c.

References damagerect(), and screen.

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

◆ getcell()

static ScreenCell * getcell ( const VTermScreen screen,
int  row,
int  col 
)
inlinestatic

Definition at line 82 of file screen.c.

References VTermScreen::buffer, VTermScreen::cols, VTermScreen::rows, and screen.

+ Here is the caller graph for this function:

◆ line_popcount()

static int line_popcount ( ScreenCell buffer,
int  row,
int  rows,
int  cols 
)
static

Definition at line 497 of file screen.c.

References cols.

+ Here is the caller graph for this function:

◆ movecursor()

static int movecursor ( VTermPos  pos,
VTermPos  oldpos,
int  visible,
void *  user 
)
static

◆ moverect_internal()

static int moverect_internal ( VTermRect  dest,
VTermRect  src,
void *  user 
)
static

Definition at line 217 of file screen.c.

References VTermScreen::buffer, VTermScreen::buffers, BUFIDX_PRIMARY, VTermScreen::callbacks, cols, VTermScreen::cols, VTermRect::end_col, VTermRect::end_row, getcell(), memmove(), VTermScreenCallbacks::sb_pushline, sb_pushline_from_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:

◆ moverect_user()

static int moverect_user ( VTermRect  dest,
VTermRect  src,
void *  user 
)
static

Definition at line 252 of file screen.c.

References VTermScreen::callbacks, VTermScreen::cbdata, VTermScreen::damage_merge, damagerect(), VTermScreenCallbacks::moverect, screen, VTERM_DAMAGE_SCROLL, and vterm_screen_flush_damage().

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

◆ putglyph()

static int putglyph ( VTermGlyphInfo info,
VTermPos  pos,
void *  user 
)
static

Definition at line 173 of file screen.c.

References ScreenCell::chars, VTermPos::col, damagerect(), ScreenPen::dhl, ScreenPen::dwl, getcell(), info, ScreenCell::pen, VTermScreen::pen, ScreenPen::protected_cell, VTermPos::row, screen, VTermRect::start_row, and VTERM_MAX_CHARS_PER_CELL.

+ Here is the call graph for this function:

◆ reset_default_colours()

static void reset_default_colours ( VTermScreen screen,
ScreenCell buffer 
)
static

Definition at line 1160 of file screen.c.

References ScreenPen::bg, VTermScreen::cols, ScreenPen::fg, ScreenCell::pen, VTermScreen::pen, VTermScreen::rows, screen, VTERM_COLOR_IS_DEFAULT_BG, and VTERM_COLOR_IS_DEFAULT_FG.

+ Here is the caller graph for this function:

◆ resize()

static int resize ( int  new_rows,
int  new_cols,
VTermStateFields fields,
void *  user 
)
static

Definition at line 746 of file screen.c.

References VTermScreen::buffer, VTermScreen::buffers, BUFIDX_ALTSCREEN, BUFIDX_PRIMARY, VTermScreen::callbacks, VTermScreen::cbdata, VTermScreen::cols, damagescreen(), VTermStateFields::lineinfos, VTermScreenCallbacks::resize, resize_buffer(), VTermScreen::rows, VTermScreen::sb_buffer, screen, VTermScreen::vt, vterm_allocator_free(), and vterm_allocator_malloc().

+ Here is the call graph for this function:

◆ resize_buffer()

static void resize_buffer ( VTermScreen screen,
int  bufidx,
int  new_rows,
int  new_cols,
bool  active,
VTermStateFields statefields 
)
static

Definition at line 507 of file screen.c.

References VTermScreenCell::attrs, VTermScreenCellAttrs::baseline, ScreenPen::baseline, VTermScreenCell::bg, ScreenPen::bg, VTermScreenCellAttrs::blink, ScreenPen::blink, VTermScreenCellAttrs::bold, ScreenPen::bold, VTermScreen::buffers, BUFIDX_PRIMARY, VTermScreen::callbacks, VTermScreen::cbdata, VTermScreenCell::chars, ScreenCell::chars, clearcell(), VTermPos::col, VTermScreen::cols, VTermScreenCellAttrs::conceal, ScreenPen::conceal, VTermLineInfo::continuation, VTermScreenCell::fg, ScreenPen::fg, VTermScreenCellAttrs::font, ScreenPen::font, VTermScreen::global_reverse, VTermScreenCellAttrs::italic, ScreenPen::italic, line_popcount(), VTermStateFields::lineinfos, memmove(), ScreenCell::pen, VTermStateFields::pos, REFLOW, VTermScreenCellAttrs::reverse, ScreenPen::reverse, VTermPos::row, VTermScreen::rows, VTermScreen::sb_buffer, VTermScreenCallbacks::sb_popline, VTermScreenCallbacks::sb_pushline, sb_pushline_from_row(), screen, VTermScreenCellAttrs::small, ScreenPen::small, VTermScreenCellAttrs::strike, ScreenPen::strike, VTermScreenCellAttrs::underline, ScreenPen::underline, VTermScreen::vt, vterm_allocator_free(), vterm_allocator_malloc(), VTERM_MAX_CHARS_PER_CELL, width, and VTermScreenCell::width.

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

◆ sb_clear()

static int sb_clear ( void *  user)
static

◆ sb_pushline_from_row()

static void sb_pushline_from_row ( VTermScreen screen,
int  row 
)
static

Definition at line 208 of file screen.c.

References VTermScreen::callbacks, VTermScreen::cbdata, VTermPos::col, VTermScreen::cols, VTermPos::row, VTermScreen::sb_buffer, VTermScreenCallbacks::sb_pushline, screen, and vterm_screen_get_cell().

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

◆ screen_new()

static VTermScreen * screen_new ( VTerm vt)
static

Definition at line 853 of file screen.c.

References alloc_buffer(), VTermScreen::buffer, VTermScreen::buffers, BUFIDX_PRIMARY, VTermScreen::callbacks, VTermScreen::cbdata, cols, VTermScreen::cols, VTermScreen::damage_merge, VTermScreen::damaged, VTermScreen::global_reverse, VTermScreen::pending_scrollrect, VTermScreen::reflow, rows, VTermScreen::rows, VTermScreen::sb_buffer, screen, VTermRect::start_row, VTermScreen::state, state, state_cbs, vt, VTermScreen::vt, vterm_allocator_malloc(), VTERM_DAMAGE_CELL, vterm_get_size(), vterm_obtain_state(), and vterm_state_set_callbacks().

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

◆ scrollrect()

static int scrollrect ( VTermRect  rect,
int  downward,
int  rightward,
void *  user 
)
static

◆ setlineinfo()

static int setlineinfo ( int  row,
const VTermLineInfo newinfo,
const VTermLineInfo oldinfo,
void *  user 
)
static

Definition at line 799 of file screen.c.

References VTermScreen::cols, damagerect(), ScreenPen::dhl, VTermLineInfo::doubleheight, VTermLineInfo::doublewidth, ScreenPen::dwl, VTermRect::end_col, erase_internal(), getcell(), ScreenCell::pen, screen, VTermRect::start_col, and VTermRect::start_row.

+ Here is the call graph for this function:

◆ setpenattr()

◆ settermprop()

static int settermprop ( VTermProp  prop,
VTermValue val,
void *  user 
)
static

Definition at line 455 of file screen.c.

References VTermValue::boolean, VTermScreen::buffer, VTermScreen::buffers, BUFIDX_ALTSCREEN, BUFIDX_PRIMARY, VTermScreen::callbacks, VTermScreen::cbdata, damagescreen(), VTermScreen::global_reverse, screen, VTermScreenCallbacks::settermprop, VTERM_PROP_ALTSCREEN, and VTERM_PROP_REVERSE.

+ 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_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_free()

INTERNAL void vterm_screen_free ( VTermScreen screen)

Definition at line 891 of file screen.c.

References VTermScreen::buffers, BUFIDX_ALTSCREEN, BUFIDX_PRIMARY, VTermScreen::sb_buffer, screen, VTermScreen::vt, and vterm_allocator_free().

+ 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_reflow()

void vterm_screen_set_reflow ( VTermScreen screen,
bool  reflow 
)

Definition at line 1038 of file screen.c.

References screen, and vterm_screen_enable_reflow().

+ Here is the call 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:

Variable Documentation

◆ state_cbs

VTermStateCallbacks state_cbs
static
Initial value:
= {
.putglyph = &putglyph,
.movecursor = &movecursor,
.scrollrect = &scrollrect,
.erase = &erase,
.setpenattr = &setpenattr,
.settermprop = &settermprop,
.bell = &bell,
.resize = &resize,
.setlineinfo = &setlineinfo,
.sb_clear = &sb_clear,
}
static int scrollrect(VTermRect rect, int downward, int rightward, void *user)
Definition screen.c:312
static int sb_clear(void *user)
Definition screen.c:830
static int erase(VTermRect rect, int selective, void *user)
Definition screen.c:306
static int movecursor(VTermPos pos, VTermPos oldpos, int visible, void *user)
Definition screen.c:396
static int setlineinfo(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)
Definition screen.c:799
static int bell(void *user)
Definition screen.c:485
static int settermprop(VTermProp prop, VTermValue *val, void *user)
Definition screen.c:455
static int putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)
Definition screen.c:173
static int resize(int new_rows, int new_cols, VTermStateFields *fields, void *user)
Definition screen.c:746
static int setpenattr(VTermAttr attr, VTermValue *val, void *user)
Definition screen.c:406

Definition at line 840 of file screen.c.