mirror of
https://github.com/neovim/neovim.git
synced 2026-01-23 21:55:36 +10:00
For CI builds unibilium is provided through msys2 packages, and libtermkey is built from source in third-party from equalsraf/libtermkey. In Windows we cannot read terminal input from the stdin file descriptor, instead use libuv's uv_tty API. It should handle key input and encoding. The UI suspend is not implemented for Windows, because the SIGSTP/SIGCONT do not exist in windows. Currently this is a NOOP. Closes #3902 Closes #6640
34 lines
704 B
C
34 lines
704 B
C
#ifndef NVIM_TUI_INPUT_H
|
|
#define NVIM_TUI_INPUT_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <termkey.h>
|
|
#include "nvim/event/stream.h"
|
|
#include "nvim/event/time.h"
|
|
|
|
typedef struct term_input {
|
|
int in_fd;
|
|
bool paste_enabled;
|
|
bool waiting;
|
|
TermKey *tk;
|
|
#if TERMKEY_VERSION_MAJOR > 0 || TERMKEY_VERSION_MINOR > 18
|
|
TermKey_Terminfo_Getstr_Hook *tk_ti_hook_fn; ///< libtermkey terminfo hook
|
|
#endif
|
|
TimeWatcher timer_handle;
|
|
Loop *loop;
|
|
#ifdef WIN32
|
|
uv_tty_t tty_in;
|
|
#endif
|
|
Stream read_stream;
|
|
RBuffer *key_buffer;
|
|
uv_mutex_t key_buffer_mutex;
|
|
uv_cond_t key_buffer_cond;
|
|
} TermInput;
|
|
|
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
|
# include "tui/input.h.generated.h"
|
|
#endif
|
|
|
|
#endif // NVIM_TUI_INPUT_H
|