LF OS
Hobby operating system for amd64 with high ambitions
|
#include "vterm_internal.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | DEFAULT(v, def) ((v) ? (v) : (def)) |
Variables | |
static VTermAllocatorFunctions | default_allocator |
|
static |
|
static |
Definition at line 103 of file vterm.c.
References VTerm::allocator, VTerm::allocdata, VTermAllocatorFunctions::free, and vt.
Definition at line 98 of file vterm.c.
References VTerm::allocator, VTerm::allocdata, VTermAllocatorFunctions::malloc, size, and vt.
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.
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.
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().
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.
Definition at line 144 of file vterm.c.
References memcpy(), VTerm::outbuffer, VTerm::outbuffer_cur, VTerm::outbuffer_len, VTerm::outdata, VTerm::outfunc, and vt.
INTERNAL void vterm_push_output_sprintf_ctrl | ( | VTerm * | vt, |
unsigned char | ctrl, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 174 of file vterm.c.
References ESC_S, VTerm::mode, VTerm::tmpbuffer, VTerm::tmpbuffer_len, va_end, va_start, vt, and vterm_push_output_bytes().
INTERNAL void vterm_push_output_sprintf_str | ( | VTerm * | vt, |
unsigned char | ctrl, | ||
bool | term, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 200 of file vterm.c.
References ESC_S, VTerm::mode, VTerm::tmpbuffer, VTerm::tmpbuffer_len, va_end, va_start, vt, and vterm_push_output_bytes().
Definition at line 158 of file vterm.c.
References format, VTerm::tmpbuffer, VTerm::tmpbuffer_len, vt, and vterm_push_output_bytes().
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.
|
static |