Macros | Enumerations | Functions
input.c File Reference
#include <assert.h>
#include <string.h>
#include <stdbool.h>
#include <uv.h>
#include "nvim/api/private/defs.h"
#include "nvim/os/input.h"
#include "nvim/event/loop.h"
#include "nvim/event/rstream.h"
#include "nvim/ascii.h"
#include "nvim/vim.h"
#include "nvim/ui.h"
#include "nvim/memory.h"
#include "nvim/keymap.h"
#include "nvim/mbyte.h"
#include "nvim/fileio.h"
#include "nvim/ex_cmds2.h"
#include "nvim/getchar.h"
#include "nvim/main.h"
#include "nvim/misc1.h"
#include "nvim/state.h"
#include "nvim/msgpack_rpc/channel.h"

Macros

#define READ_BUFFER_SIZE   0xfff
 
#define INPUT_BUFFER_SIZE   (READ_BUFFER_SIZE * 4)
 

Enumerations

enum  InbufPollResult { kInputNone, kInputAvail, kInputEof }
 

Functions

void input_init (void)
 
int input_global_fd (void)
 Global TTY (or pipe for "-es") input stream, before UI starts. More...
 
void input_start (int fd)
 
void input_stop (void)
 
int os_inchar (uint8_t *buf, int maxlen, int ms, int tb_change_cnt)
 
bool os_char_avail (void)
 
void os_breakcheck (void)
 
void input_enable_events (void)
 
void input_disable_events (void)
 
bool os_isatty (int fd)
 
size_t input_enqueue (String keys)
 
size_t input_enqueue_mouse (int code, uint8_t modifier, int grid, int row, int col)
 
bool input_blocking (void)
 
void input_done (void)
 
bool input_available (void)
 

Macro Definition Documentation

#define INPUT_BUFFER_SIZE   (READ_BUFFER_SIZE * 4)
#define READ_BUFFER_SIZE   0xfff

Enumeration Type Documentation

Enumerator
kInputNone 
kInputAvail 
kInputEof 

Function Documentation

bool input_available ( void  )
bool input_blocking ( void  )
Returns
true if the main loop is blocked and waiting for input.
void input_disable_events ( void  )
void input_done ( void  )
void input_enable_events ( void  )
size_t input_enqueue ( String  keys)
size_t input_enqueue_mouse ( int  code,
uint8_t  modifier,
int  grid,
int  row,
int  col 
)
int input_global_fd ( void  )

Global TTY (or pipe for "-es") input stream, before UI starts.

void input_init ( void  )
void input_start ( int  fd)
void input_stop ( void  )
void os_breakcheck ( void  )
bool os_char_avail ( void  )
int os_inchar ( uint8_t *  buf,
int  maxlen,
int  ms,
int  tb_change_cnt 
)
bool os_isatty ( int  fd)

Test whether a file descriptor refers to a terminal.

Parameters
fdFile descriptor.
Returns
true if file descriptor refers to a terminal.