Files
neovim/src/nvim/tui/input.h
Rui Abreu Ferreira 685ca180f7 win: Terminal UI #6315
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
2017-05-03 12:48:24 +02:00

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