Neovim Home
src
nvim
tui
input.h
Go to the documentation of this file.
1
#ifndef NVIM_TUI_INPUT_H
2
#define NVIM_TUI_INPUT_H
3
4
#include <stdbool.h>
5
#include <termkey.h>
6
7
#include "
nvim/event/stream.h
"
8
#include "
nvim/event/time.h
"
9
#include "
nvim/tui/tui.h
"
10
11
typedef
enum
{
12
kExtkeysNone
,
13
kExtkeysCSIu
,
14
kExtkeysXterm
,
15
}
ExtkeysType
;
16
17
typedef
struct
term_input
{
18
int
in_fd
;
19
// Phases: -1=all 0=disabled 1=first-chunk 2=continue 3=last-chunk
20
int8_t
paste
;
21
bool
waiting
;
22
bool
ttimeout
;
23
int8_t
waiting_for_bg_response
;
24
int8_t
waiting_for_csiu_response
;
25
ExtkeysType
extkeys_type
;
26
long
ttimeoutlen
;
27
TermKey *
tk
;
28
#if TERMKEY_VERSION_MAJOR > 0 || TERMKEY_VERSION_MINOR > 18
29
TermKey_Terminfo_Getstr_Hook *tk_ti_hook_fn;
30
#endif
31
TimeWatcher
timer_handle
;
32
Loop
*
loop
;
33
Stream
read_stream
;
34
RBuffer
*
key_buffer
;
35
uv_mutex_t
key_buffer_mutex
;
36
uv_cond_t
key_buffer_cond
;
37
TUIData
*
tui_data
;
38
}
TermInput
;
39
40
#ifdef INCLUDE_GENERATED_DECLARATIONS
41
# include "tui/input.h.generated.h"
42
#endif
43
44
#ifdef UNIT_TESTING
45
typedef
enum
{
46
kIncomplete
= -1,
47
kNotApplicable
= 0,
48
kComplete
= 1,
49
}
HandleState
;
50
51
HandleState
ut_handle_background_color(
TermInput
*
input
);
52
#endif
53
54
#endif // NVIM_TUI_INPUT_H
term_input::tui_data
TUIData * tui_data
Definition:
input.h:37
kExtkeysNone
@ kExtkeysNone
Definition:
input.h:12
HandleState
HandleState
Definition:
input.c:28
kExtkeysXterm
@ kExtkeysXterm
Definition:
input.h:14
TermInput
struct term_input TermInput
term_input::ttimeoutlen
long ttimeoutlen
Definition:
input.h:26
time.h
time_watcher
Definition:
time.h:11
term_input::extkeys_type
ExtkeysType extkeys_type
Definition:
input.h:25
term_input::key_buffer_cond
uv_cond_t key_buffer_cond
Definition:
input.h:36
kIncomplete
@ kIncomplete
Definition:
input.c:29
stream
Definition:
stream.h:31
TUIData
Definition:
tui.c:74
input
rex input
Definition:
regexp_nfa.c:5664
rbuffer
Definition:
rbuffer.h:77
term_input::loop
Loop * loop
Definition:
input.h:32
ExtkeysType
ExtkeysType
Definition:
input.h:11
term_input::ttimeout
bool ttimeout
Definition:
input.h:22
stream.h
term_input
Definition:
input.h:17
tui.h
term_input::paste
int8_t paste
Definition:
input.h:20
term_input::in_fd
int in_fd
Definition:
input.h:18
term_input::tk
TermKey * tk
Definition:
input.h:27
term_input::key_buffer
RBuffer * key_buffer
Definition:
input.h:34
term_input::timer_handle
TimeWatcher timer_handle
Definition:
input.h:31
kNotApplicable
@ kNotApplicable
Definition:
input.c:30
term_input::waiting_for_bg_response
int8_t waiting_for_bg_response
Definition:
input.h:23
term_input::waiting
bool waiting
Definition:
input.h:21
term_input::read_stream
Stream read_stream
Definition:
input.h:33
term_input::waiting_for_csiu_response
int8_t waiting_for_csiu_response
Definition:
input.h:24
kComplete
@ kComplete
Definition:
input.c:31
term_input::key_buffer_mutex
uv_mutex_t key_buffer_mutex
Definition:
input.h:35
kExtkeysCSIu
@ kExtkeysCSIu
Definition:
input.h:13
loop
Definition:
loop.h:16