LF OS
Hobby operating system for amd64 with high ambitions
|
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 |
Typedefs | |
typedef struct VTerm | VTerm |
typedef struct VTermState | VTermState |
typedef struct VTermScreen | VTermScreen |
typedef void | VTermOutputCallback(const char *s, size_t len, void *user) |
struct VTermPos |
struct VTermRect |
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.
Data Fields | ||
---|---|---|
struct VTermColor.indexed | indexed |
If |
struct VTermColor.rgb | rgb |
Valid if |
uint8_t | type |
Tag indicating which union member is actually valid. This variable coincides with the |
struct VTermStringFragment |
union VTermValue |
Data Fields | ||
---|---|---|
int | boolean | |
VTermColor | color | |
int | number | |
VTermStringFragment | string |
struct VTermGlyphInfo |
struct VTermLineInfo |
struct VTermStateFields |
struct VTermBuilder |
Data Fields | ||
---|---|---|
const VTermAllocatorFunctions * | allocator | |
void * | allocdata | |
int | cols | |
size_t | outbuffer_len | |
int | rows | |
size_t | tmpbuffer_len | |
int | ver |
struct VTermScreenCellAttrs |
struct VTermScreenCell |
Data Fields | ||
---|---|---|
VTermScreenCellAttrs | attrs | |
VTermColor | bg | |
uint32_t | chars[VTERM_MAX_CHARS_PER_CELL] | |
VTermColor | fg | |
char | width |
struct VTermColor.rgb |
Valid if VTERM_COLOR_IS_RGB(type)
is true. Holds the RGB colour values.
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 |
struct VTermColor.indexed |
If VTERM_COLOR_IS_INDEXED(type)
is true, this member holds the index into the colour palette.
Data Fields | ||
---|---|---|
uint8_t | idx |
Index into the colour map. |
uint8_t | type |
Same as the top-level |
#define CSI_ARG | ( | a | ) | ((a) & CSI_ARG_MASK) |
#define CSI_ARG_COUNT | ( | a | ) | (CSI_ARG(a) == CSI_ARG_MISSING || CSI_ARG(a) == 0 ? 1 : CSI_ARG(a)) |
#define CSI_ARG_HAS_MORE | ( | a | ) | ((a) & CSI_ARG_FLAG_MORE) |
#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 VTERM_CHECK_VERSION vterm_check_version(VTERM_VERSION_MAJOR, VTERM_VERSION_MINOR) |
#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.
#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.
#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.
#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.
#define vterm_screen_set_reflow vterm_screen_enable_reflow |
typedef void VTermOutputCallback(const char *s, size_t len, void *user) |
typedef struct VTermScreen VTermScreen |
typedef struct VTermState VTermState |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
enum VTermAttr |
enum VTermAttrMask |
enum VTermColorType |
Bit-field describing the content of the tagged union VTermColor
.
enum VTermDamageSize |
enum VTermProp |
enum VTermSelectionMask |
enum VTermValueType |
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().
void vterm_check_version | ( | int | major, |
int | minor | ||
) |
Definition at line 415 of file vterm.c.
References VTERM_VERSION_MAJOR, and VTERM_VERSION_MINOR.
|
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.
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.
|
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.
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.
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().
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.
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.
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.
int vterm_get_utf8 | ( | const VTerm * | vt | ) |
Definition at line 128 of file vterm.c.
References VTerm::mode, and vt.
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.
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().
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().
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().
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().
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.
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.
VTerm * vterm_new | ( | int | rows, |
int | cols | ||
) |
Definition at line 30 of file vterm.c.
References cols, rows, and vterm_build().
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().
VTermScreen * vterm_obtain_screen | ( | VTerm * | vt | ) |
Definition at line 1021 of file screen.c.
References VTerm::screen, screen, screen_new(), and vt.
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().
Definition at line 241 of file vterm.c.
References VTerm::outbuffer_cur, and vt.
Definition at line 246 of file vterm.c.
References VTerm::outbuffer_cur, VTerm::outbuffer_len, and vt.
Definition at line 236 of file vterm.c.
References VTerm::outbuffer_len, and vt.
Definition at line 251 of file vterm.c.
References memcpy(), memmove(), VTerm::outbuffer, VTerm::outbuffer_cur, and vt.
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.
void * vterm_parser_get_cbdata | ( | VTerm * | vt | ) |
Definition at line 394 of file parser.c.
References VTerm::parser, and vt.
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.
Definition at line 399 of file parser.c.
References VTerm::parser, and vt.
Definition at line 38 of file vterm.h.
References VTermPos::col, and VTermPos::row.
Definition at line 51 of file vterm.h.
References VTermPos::col, VTermRect::end_col, VTermRect::end_row, VTermPos::row, VTermRect::start_col, and VTermRect::start_row.
|
inlinestatic |
Definition at line 58 of file vterm.h.
References VTermRect::end_col, VTermRect::end_row, VTermRect::start_col, and VTermRect::start_row.
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().
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().
void vterm_screen_enable_reflow | ( | VTermScreen * | screen, |
bool | reflow | ||
) |
Definition at line 1032 of file screen.c.
References VTermScreen::reflow, and screen.
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().
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.
void * vterm_screen_get_cbdata | ( | VTermScreen * | screen | ) |
Definition at line 1059 of file screen.c.
References VTermScreen::cbdata, and screen.
int vterm_screen_get_cell | ( | const VTermScreen * | screen, |
VTermPos | pos, | ||
VTermScreenCell * | cell | ||
) |
Definition at line 971 of file screen.c.
References VTermScreenCell::attrs, VTermScreenCellAttrs::baseline, ScreenPen::baseline, VTermScreenCell::bg, ScreenPen::bg, VTermScreenCellAttrs::blink, ScreenPen::blink, VTermScreenCellAttrs::bold, ScreenPen::bold, VTermScreenCell::chars, ScreenCell::chars, VTermPos::col, VTermScreen::cols, VTermScreenCellAttrs::conceal, ScreenPen::conceal, VTermScreenCellAttrs::dhl, ScreenPen::dhl, VTermScreenCellAttrs::dwl, ScreenPen::dwl, VTermScreenCell::fg, ScreenPen::fg, VTermScreenCellAttrs::font, ScreenPen::font, getcell(), VTermScreen::global_reverse, VTermScreenCellAttrs::italic, ScreenPen::italic, ScreenCell::pen, VTermScreenCellAttrs::reverse, ScreenPen::reverse, VTermPos::row, screen, VTermScreenCellAttrs::small, ScreenPen::small, VTermScreenCellAttrs::strike, ScreenPen::strike, VTermScreenCellAttrs::underline, ScreenPen::underline, VTERM_MAX_CHARS_PER_CELL, and VTermScreenCell::width.
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.
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.
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().
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.
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().
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.
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().
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().
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().
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.
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.
void vterm_set_utf8 | ( | VTerm * | vt, |
int | is_utf8 | ||
) |
Definition at line 133 of file vterm.c.
References VTerm::mode, and vt.
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.
state | is the VTermState instance from which the colour palette should be extracted. |
col | is 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.
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().
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().
void * vterm_state_get_cbdata | ( | VTermState * | state | ) |
Definition at line 2159 of file state.c.
References VTermState::cbdata, and state.
void vterm_state_get_cursorpos | ( | const VTermState * | state, |
VTermPos * | cursorpos | ||
) |
Definition at line 2139 of file state.c.
References VTermState::pos, and state.
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.
const VTermLineInfo * vterm_state_get_lineinfo | ( | const VTermState * | state, |
int | row | ||
) |
Definition at line 2251 of file state.c.
References VTermState::lineinfo, and state.
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.
int vterm_state_get_penattr | ( | const VTermState * | state, |
VTermAttr | attr, | ||
VTermValue * | val | ||
) |
Definition at line 551 of file pen.c.
References VTermPen::baseline, VTermPen::bg, VTermPen::blink, VTermPen::bold, VTermValue::boolean, VTermValue::color, VTermPen::conceal, VTermPen::fg, VTermPen::font, VTermPen::italic, VTermValue::number, VTermState::pen, VTermPen::reverse, VTermPen::small, state, VTermPen::strike, VTermPen::underline, 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, and VTERM_N_ATTRS.
void * vterm_state_get_unrecognised_fbdata | ( | VTermState * | state | ) |
Definition at line 2176 of file state.c.
References VTermState::fbdata, and state.
void vterm_state_reset | ( | VTermState * | state, |
int | hard | ||
) |
Definition at line 2072 of file state.c.
References VTermState::at_phantom, VTermState::callbacks, VTermState::cbdata, clear_col_tabstop(), VTermPos::col, VTermState::cols, VTermEncodingInstance::data, DHL_OFF, DWL_OFF, VTermEncodingInstance::enc, ENC_SINGLE_94, ENC_UTF8, VTermState::encoding, erase(), FORCE, VTermState::gl_set, VTermState::gr_set, VTermState::gsingle_set, VTermEncoding::init, VTermStateCallbacks::initpen, VTermState::mode, VTerm::mode, VTermState::mouse_flags, VTermState::pos, VTermState::protected_cell, VTermPos::row, VTermState::rows, VTermState::scrollregion_bottom, VTermState::scrollregion_left, VTermState::scrollregion_right, VTermState::scrollregion_top, set_col_tabstop(), set_lineinfo(), settermprop_bool(), settermprop_int(), state, VTermState::vt, vterm_lookup_encoding(), VTERM_PROP_CURSORBLINK, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_BLOCK, VTERM_PROP_CURSORVISIBLE, and vterm_state_resetpen().
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().
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.
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.
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.
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.
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().
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.
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.