Mercurial > vim
annotate src/libvterm/src/vterm_internal.h @ 23274:10bbff53d3d1 v8.2.2183
patch 8.2.2183: Vim9: value of 'edcompatible' and 'gdefault' are used
Commit: https://github.com/vim/vim/commit/60f63100b9bc1d24b7b80c81f43cf2fc3da95987
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Dec 21 20:32:43 2020 +0100
patch 8.2.2183: Vim9: value of 'edcompatible' and 'gdefault' are used
Problem: Vim9: value of 'edcompatible' and 'gdefault' are used.
Solution: Ignore these deprecated options in Vim9 script. (closes https://github.com/vim/vim/issues/7508)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 21 Dec 2020 20:45:05 +0100 |
parents | a4652d7ec99f |
children | f93337ae0612 |
rev | line source |
---|---|
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 #ifndef __VTERM_INTERNAL_H__ |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 #define __VTERM_INTERNAL_H__ |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 #include "vterm.h" |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 #include <stdarg.h> |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
13507
8bdcc8faeb32
patch 8.0.1627: compiler warning for visibility attribute not supported
Christian Brabandt <cb@256bit.org>
parents:
13448
diff
changeset
|
8 #if defined(__GNUC__) && !defined(__MINGW32__) |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 # define INTERNAL __attribute__((visibility("internal"))) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 # define UNUSED __attribute__((unused)) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 #else |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 # define INTERNAL |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 # define UNUSED |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 #endif |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 #ifdef DEBUG |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 # define DEBUG_LOG(s) fprintf(stderr, s) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 # define DEBUG_LOG1(s, a) fprintf(stderr, s, a) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 # define DEBUG_LOG2(s, a, b) fprintf(stderr, s, a, b) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 # define DEBUG_LOG3(s, a, b, c) fprintf(stderr, s, a, b, c) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 #else |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 # define DEBUG_LOG(s) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 # define DEBUG_LOG1(s, a) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 # define DEBUG_LOG2(s, a, b) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 # define DEBUG_LOG3(s, a, b, c) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 #endif |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 #define ESC_S "\x1b" |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
30 #define INTERMED_MAX 16 |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
31 |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
32 #define CSI_ARGS_MAX 16 |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
33 #define CSI_LEADER_MAX 16 |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
34 |
20480
d0bf39eb2b07
patch 8.2.0794: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20460
diff
changeset
|
35 #define BUFIDX_PRIMARY 0 |
d0bf39eb2b07
patch 8.2.0794: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20460
diff
changeset
|
36 #define BUFIDX_ALTSCREEN 1 |
d0bf39eb2b07
patch 8.2.0794: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20460
diff
changeset
|
37 |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 typedef struct VTermEncoding VTermEncoding; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 typedef struct { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 VTermEncoding *enc; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 |
13770
2449b6ce1456
patch 8.0.1757: unnecessary changes in libvterm
Christian Brabandt <cb@256bit.org>
parents:
13531
diff
changeset
|
43 // This size should be increased if required by other stateful encodings |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 char data[4*sizeof(uint32_t)]; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 } VTermEncodingInstance; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 struct VTermPen |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 VTermColor fg; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 VTermColor bg; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 unsigned int bold:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 unsigned int underline:2; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 unsigned int italic:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 unsigned int blink:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 unsigned int reverse:1; |
20496
747a270eb1db
patch 8.2.0802: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20488
diff
changeset
|
56 unsigned int conceal:1; |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 unsigned int strike:1; |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
58 unsigned int font:4; /* To store 0-9 */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 }; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 struct VTermState |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 VTerm *vt; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 const VTermStateCallbacks *callbacks; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 void *cbdata; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 |
20496
747a270eb1db
patch 8.2.0802: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20488
diff
changeset
|
68 const VTermStateFallbacks *fallbacks; |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 void *fbdata; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 int rows; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 int cols; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
74 /* Current cursor position */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 VTermPos pos; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
77 int at_phantom; /* True if we're on the "81st" phantom column to defer a wraparound */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 int scrollregion_top; |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
80 int scrollregion_bottom; /* -1 means unbounded */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 #define SCROLLREGION_BOTTOM(state) ((state)->scrollregion_bottom > -1 ? (state)->scrollregion_bottom : (state)->rows) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 int scrollregion_left; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 #define SCROLLREGION_LEFT(state) ((state)->mode.leftrightmargin ? (state)->scrollregion_left : 0) |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
84 int scrollregion_right; /* -1 means unbounded */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 #define SCROLLREGION_RIGHT(state) ((state)->mode.leftrightmargin && (state)->scrollregion_right > -1 ? (state)->scrollregion_right : (state)->cols) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
87 /* Bitvector of tab stops */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 unsigned char *tabstops; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 |
20480
d0bf39eb2b07
patch 8.2.0794: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20460
diff
changeset
|
90 /* Primary and Altscreen; lineinfos[1] is lazily allocated as needed */ |
d0bf39eb2b07
patch 8.2.0794: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20460
diff
changeset
|
91 VTermLineInfo *lineinfos[2]; |
d0bf39eb2b07
patch 8.2.0794: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20460
diff
changeset
|
92 |
d0bf39eb2b07
patch 8.2.0794: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20460
diff
changeset
|
93 /* lineinfo will == lineinfos[0] or lineinfos[1], depending on altscreen */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 VTermLineInfo *lineinfo; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 #define ROWWIDTH(state,row) ((state)->lineinfo[(row)].doublewidth ? ((state)->cols / 2) : (state)->cols) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 #define THISROWWIDTH(state) ROWWIDTH(state, (state)->pos.row) |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
98 /* Mouse state */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 int mouse_col, mouse_row; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 int mouse_buttons; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 int mouse_flags; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 enum { MOUSE_X10, MOUSE_UTF8, MOUSE_SGR, MOUSE_RXVT } mouse_protocol; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
105 /* Last glyph output, for Unicode recombining purposes */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 uint32_t *combine_chars; |
13770
2449b6ce1456
patch 8.0.1757: unnecessary changes in libvterm
Christian Brabandt <cb@256bit.org>
parents:
13531
diff
changeset
|
107 size_t combine_chars_size; // Number of ELEMENTS in the above |
2449b6ce1456
patch 8.0.1757: unnecessary changes in libvterm
Christian Brabandt <cb@256bit.org>
parents:
13531
diff
changeset
|
108 int combine_width; // The width of the glyph above |
2449b6ce1456
patch 8.0.1757: unnecessary changes in libvterm
Christian Brabandt <cb@256bit.org>
parents:
13531
diff
changeset
|
109 VTermPos combine_pos; // Position before movement |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 struct { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 unsigned int keypad:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 unsigned int cursor:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 unsigned int autowrap:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 unsigned int insert:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 unsigned int newline:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 unsigned int cursor_visible:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 unsigned int cursor_blink:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 unsigned int cursor_shape:2; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 unsigned int alt_screen:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 unsigned int origin:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 unsigned int screen:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 unsigned int leftrightmargin:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 unsigned int bracketpaste:1; |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
125 unsigned int report_focus:1; |
18279
e8d1f3209dcd
patch 8.1.2134: modifier keys are not always recognized
Bram Moolenaar <Bram@vim.org>
parents:
18064
diff
changeset
|
126 unsigned int modify_other_keys:1; |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
127 } mode; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
128 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
129 VTermEncodingInstance encoding[4], encoding_utf8; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
130 int gl_set, gr_set, gsingle_set; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
131 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
132 struct VTermPen pen; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
133 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
134 VTermColor default_fg; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
135 VTermColor default_bg; |
13770
2449b6ce1456
patch 8.0.1757: unnecessary changes in libvterm
Christian Brabandt <cb@256bit.org>
parents:
13531
diff
changeset
|
136 VTermColor colors[16]; // Store the 8 ANSI and the 8 ANSI high-brights only |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
137 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
138 int bold_is_highbright; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
139 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
140 unsigned int protected_cell : 1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
141 |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
142 /* Saved state under DEC mode 1048/1049 */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
143 struct { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
144 VTermPos pos; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 struct VTermPen pen; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 struct { |
12080
93024e778745
patch 8.0.0920: cursor wrong after switching altscreen in terminal
Christian Brabandt <cb@256bit.org>
parents:
11621
diff
changeset
|
148 unsigned int cursor_visible:1; |
93024e778745
patch 8.0.0920: cursor wrong after switching altscreen in terminal
Christian Brabandt <cb@256bit.org>
parents:
11621
diff
changeset
|
149 unsigned int cursor_blink:1; |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 unsigned int cursor_shape:2; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 } mode; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
152 } saved; |
20488
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
153 |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
154 /* Temporary state for DECRQSS parsing */ |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
155 union { |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
156 char decrqss[4]; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
157 } tmp; |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
158 }; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
159 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
160 struct VTerm |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
161 { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
162 VTermAllocatorFunctions *allocator; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
163 void *allocdata; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
164 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
165 int rows; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
166 int cols; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
167 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
168 struct { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
169 unsigned int utf8:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
170 unsigned int ctrl8bit:1; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
171 } mode; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
172 |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
173 struct { |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
174 enum VTermParserState { |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
175 NORMAL, |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
176 CSI_LEADER, |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
177 CSI_ARGS, |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
178 CSI_INTERMED, |
20498
55a373a243c0
patch 8.2.0803: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20496
diff
changeset
|
179 DCS_COMMAND, |
55a373a243c0
patch 8.2.0803: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20496
diff
changeset
|
180 /* below here are the "string states" */ |
20488
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
181 OSC_COMMAND, |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
182 OSC, |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
183 DCS, |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
184 } state; |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
185 |
20488
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
186 unsigned int in_esc : 1; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
187 |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
188 int intermedlen; |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
189 char intermed[INTERMED_MAX]; |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
190 |
20488
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
191 union { |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
192 struct { |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
193 int leaderlen; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
194 char leader[CSI_LEADER_MAX]; |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
195 |
20488
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
196 int argi; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
197 long args[CSI_ARGS_MAX]; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
198 } csi; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
199 struct { |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
200 int command; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
201 } osc; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
202 struct { |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
203 int commandlen; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
204 char command[CSI_LEADER_MAX]; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
205 } dcs; |
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
206 } v; |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
207 |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
208 const VTermParserCallbacks *callbacks; |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
209 void *cbdata; |
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
210 |
20488
1d595fada804
patch 8.2.0798: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20480
diff
changeset
|
211 int string_initial; |
13531
9f857e6310b6
patch 8.0.1639: libvterm code lags behind master
Christian Brabandt <cb@256bit.org>
parents:
13507
diff
changeset
|
212 } parser; |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
213 |
20518
a4652d7ec99f
patch 8.2.0813: libvterm code is slightly different from upstream
Bram Moolenaar <Bram@vim.org>
parents:
20500
diff
changeset
|
214 /* len == malloc()ed size; cur == number of valid bytes */ |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
215 |
20460
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
216 VTermOutputCallback *outfunc; |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
217 void *outdata; |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
218 |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
219 char *outbuffer; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
220 size_t outbuffer_len; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
221 size_t outbuffer_cur; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
222 |
20458
ffadba5f898c
patch 8.2.0783: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
18279
diff
changeset
|
223 char *tmpbuffer; |
ffadba5f898c
patch 8.2.0783: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
18279
diff
changeset
|
224 size_t tmpbuffer_len; |
ffadba5f898c
patch 8.2.0783: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
18279
diff
changeset
|
225 |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
226 VTermState *state; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
227 VTermScreen *screen; |
18064
8b4f9be5db73
patch 8.1.2027: MS-Windows: problem with ambiwidth characters
Bram Moolenaar <Bram@vim.org>
parents:
17777
diff
changeset
|
228 |
8b4f9be5db73
patch 8.1.2027: MS-Windows: problem with ambiwidth characters
Bram Moolenaar <Bram@vim.org>
parents:
17777
diff
changeset
|
229 int in_backspace; |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
230 }; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
231 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
232 struct VTermEncoding { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
233 void (*init) (VTermEncoding *enc, void *data); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
234 void (*decode)(VTermEncoding *enc, void *data, |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
235 uint32_t cp[], int *cpi, int cplen, |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
236 const char bytes[], size_t *pos, size_t len); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
237 }; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
238 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
239 typedef enum { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
240 ENC_UTF8, |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
241 ENC_SINGLE_94 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
242 } VTermEncodingType; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
243 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
244 void *vterm_allocator_malloc(VTerm *vt, size_t size); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
245 void vterm_allocator_free(VTerm *vt, void *ptr); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
246 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
247 void vterm_push_output_bytes(VTerm *vt, const char *bytes, size_t len); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
248 void vterm_push_output_vsprintf(VTerm *vt, const char *format, va_list args); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
249 void vterm_push_output_sprintf(VTerm *vt, const char *format, ...); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
250 void vterm_push_output_sprintf_ctrl(VTerm *vt, unsigned char ctrl, const char *fmt, ...); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
251 void vterm_push_output_sprintf_dcs(VTerm *vt, const char *fmt, ...); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
252 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
253 void vterm_state_free(VTermState *state); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
254 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
255 void vterm_state_newpen(VTermState *state); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
256 void vterm_state_resetpen(VTermState *state); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
257 void vterm_state_setpen(VTermState *state, const long args[], int argcount); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
258 int vterm_state_getpen(VTermState *state, long args[], int argcount); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
259 void vterm_state_savepen(VTermState *state, int save); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
260 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
261 enum { |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
262 C1_SS3 = 0x8f, |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
263 C1_DCS = 0x90, |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
264 C1_CSI = 0x9b, |
13318
5e47c4bdf3a6
patch 8.0.1533: libterm doesn't support requesting fg and bg color
Christian Brabandt <cb@256bit.org>
parents:
12080
diff
changeset
|
265 C1_ST = 0x9c, |
13770
2449b6ce1456
patch 8.0.1757: unnecessary changes in libvterm
Christian Brabandt <cb@256bit.org>
parents:
13531
diff
changeset
|
266 C1_OSC = 0x9d, |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
267 }; |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
268 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
269 void vterm_state_push_output_sprintf_CSI(VTermState *vts, const char *format, ...); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
270 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
271 void vterm_screen_free(VTermScreen *screen); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
272 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
273 VTermEncoding *vterm_lookup_encoding(VTermEncodingType type, char designation); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
274 |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
275 int vterm_unicode_width(uint32_t codepoint); |
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
276 int vterm_unicode_is_combining(uint32_t codepoint); |
18064
8b4f9be5db73
patch 8.1.2027: MS-Windows: problem with ambiwidth characters
Bram Moolenaar <Bram@vim.org>
parents:
17777
diff
changeset
|
277 int vterm_unicode_is_ambiguous(uint32_t codepoint); |
8b4f9be5db73
patch 8.1.2027: MS-Windows: problem with ambiwidth characters
Bram Moolenaar <Bram@vim.org>
parents:
17777
diff
changeset
|
278 int vterm_get_special_pty_type(void); |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
279 |
20460
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
280 #if (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500) \ |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
281 || defined(_ISOC99_SOURCE) || defined(_BSD_SOURCE) |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
282 # undef VSNPRINTF |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
283 # define VSNPRINTF vsnprintf |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
284 # undef SNPRINTF |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
285 #else |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
286 # ifdef VSNPRINTF |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
287 // Use a provided vsnprintf() function. |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
288 int VSNPRINTF(char *str, size_t str_m, const char *fmt, va_list ap); |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
289 # endif |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
290 # ifdef SNPRINTF |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
291 // Use a provided snprintf() function. |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
292 int SNPRINTF(char *str, size_t str_m, const char *fmt, ...); |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
293 # endif |
11621
b8299e742f41
patch 8.0.0693: no terminal emulator support
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
294 #endif |
20460
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
295 #ifndef SNPRINTF |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
296 # define SNPRINTF snprintf |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
297 #endif |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
298 |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
299 |
c15dd3da4f47
patch 8.2.0784: libvterm code lags behind the upstream version
Bram Moolenaar <Bram@vim.org>
parents:
20458
diff
changeset
|
300 #endif |