Data Structures | Macros | Functions
tui.c File Reference
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <limits.h>
#include <uv.h>
#include <unibilium.h>
#include "nvim/lib/kvec.h"
#include "nvim/ascii.h"
#include "nvim/vim.h"
#include "nvim/log.h"
#include "nvim/ui.h"
#include "nvim/highlight.h"
#include "nvim/map.h"
#include "nvim/main.h"
#include "nvim/memory.h"
#include "nvim/option.h"
#include "nvim/api/vim.h"
#include "nvim/api/private/helpers.h"
#include "nvim/event/loop.h"
#include "nvim/event/signal.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/os/tty.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/ui_bridge.h"
#include "nvim/ugrid.h"
#include "nvim/tui/input.h"
#include "nvim/tui/tui.h"
#include "nvim/tui/terminfo.h"
#include "nvim/cursor_shape.h"
#include "nvim/macros.h"

Data Structures

struct  Rect
 
struct  TUIData
 

Macros

#define CNORM_COMMAND_MAX_SIZE   32
 
#define OUTBUF_SIZE   0xffff
 
#define TOO_MANY_EVENTS   1000000
 
#define STARTS_WITH(str, prefix)
 
#define TMUX_WRAP(is_tmux, seq)
 
#define LINUXSET0C   "\x1b[?0c"
 
#define LINUXSET1C   "\x1b[?1c"
 
#define UNIBI_SET_NUM_VAR(var, num)   (var).i = (num);
 
#define UNIBI_OUT(fn)
 
#define XTERM_SETAF_256_COLON   "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38:5:%p1%d%;m"
 
#define XTERM_SETAB_256_COLON   "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48:5:%p1%d%;m"
 
#define XTERM_SETAF_256   "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m"
 
#define XTERM_SETAB_256   "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m"
 
#define XTERM_SETAF_16   "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e39%;m"
 
#define XTERM_SETAB_16   "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e39%;m"
 

Functions

UItui_start (void)
 
CursorShape tui_cursor_decode_shape (const char *shape_str)
 

Macro Definition Documentation

#define CNORM_COMMAND_MAX_SIZE   32
#define LINUXSET0C   "\x1b[?0c"
#define LINUXSET1C   "\x1b[?1c"
#define OUTBUF_SIZE   0xffff
#define STARTS_WITH (   str,
  prefix 
)
Value:
(strlen(str) >= (sizeof(prefix) - 1) \
&& 0 == memcmp((str), (prefix), sizeof(prefix) - 1))
#define TMUX_WRAP (   is_tmux,
  seq 
)
Value:
((is_tmux) \
? "\x1bPtmux;\x1b" seq "\x1b\\" : seq)
#define TOO_MANY_EVENTS   1000000
#define UNIBI_OUT (   fn)
Value:
do { \
TUIData *data = ui->data; \
const char *str = NULL; \
if (unibi_index >= 0) { \
str = fn(data->ut, (unsigned)unibi_index); \
} \
if (str) { \
unibi_var_t vars[26 + 26]; \
size_t orig_pos = data->bufpos; \
memset(&vars, 0, sizeof(vars)); \
data->cork = true; \
retry: \
unibi_format(vars, vars + 26, str, data->params, out, ui, NULL, NULL); \
if (data->overflow) { \
data->bufpos = orig_pos; \
flush_buf(ui); \
goto retry; \
} \
data->cork = false; \
} \
} while (0)
if(len)
Definition: encode.c:222
return NULL
Definition: eval.c:23643
memset(lp, 0, sizeof(lval_T))
#define UNIBI_SET_NUM_VAR (   var,
  num 
)    (var).i = (num);
#define XTERM_SETAB_16   "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e39%;m"
#define XTERM_SETAB_256   "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m"
#define XTERM_SETAB_256_COLON   "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48:5:%p1%d%;m"
#define XTERM_SETAF_16   "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e39%;m"
#define XTERM_SETAF_256   "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m"
#define XTERM_SETAF_256_COLON   "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38:5:%p1%d%;m"

Function Documentation

CursorShape tui_cursor_decode_shape ( const char *  shape_str)
UI* tui_start ( void  )