mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
New input parser based on http://vt100.net/emu/dec_ansi_parser.
This commit is contained in:
51
tmux.h
51
tmux.h
@ -719,43 +719,36 @@ struct screen_write_ctx {
|
||||
#define screen_hsize(s) ((s)->grid->hsize)
|
||||
#define screen_hlimit(s) ((s)->grid->hlimit)
|
||||
|
||||
/* Input parser sequence argument. */
|
||||
struct input_arg {
|
||||
u_char data[64];
|
||||
size_t used;
|
||||
};
|
||||
|
||||
/* Input parser context. */
|
||||
struct input_ctx {
|
||||
struct window_pane *wp;
|
||||
struct window_pane *wp;
|
||||
struct screen_write_ctx ctx;
|
||||
|
||||
u_char *buf;
|
||||
size_t len;
|
||||
size_t off;
|
||||
size_t was;
|
||||
struct grid_cell cell;
|
||||
|
||||
struct grid_cell cell;
|
||||
struct grid_cell old_cell;
|
||||
u_int old_cx;
|
||||
u_int old_cy;
|
||||
|
||||
struct grid_cell saved_cell;
|
||||
u_int saved_cx;
|
||||
u_int saved_cy;
|
||||
u_char interm_buf[4];
|
||||
size_t interm_len;
|
||||
|
||||
#define MAXSTRINGLEN 1024
|
||||
u_char *string_buf;
|
||||
size_t string_len;
|
||||
int string_type;
|
||||
#define STRING_SYSTEM 0
|
||||
#define STRING_APPLICATION 1
|
||||
#define STRING_NAME 2
|
||||
u_char param_buf[64];
|
||||
size_t param_len;
|
||||
|
||||
struct utf8_data utf8data;
|
||||
u_char input_buf[256];
|
||||
size_t input_len;
|
||||
|
||||
u_char intermediate;
|
||||
void *(*state)(u_char, struct input_ctx *);
|
||||
int param_list[24]; /* -1 not present */
|
||||
u_int param_list_len;
|
||||
|
||||
u_char private;
|
||||
ARRAY_DECL(, struct input_arg) args;
|
||||
struct utf8_data utf8data;
|
||||
|
||||
int ch;
|
||||
int flags;
|
||||
#define INPUT_DISCARD 0x1
|
||||
|
||||
const struct input_state *state;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1825,6 +1818,10 @@ int window_pane_spawn(struct window_pane *, const char *,
|
||||
const char *, const char *, struct environ *,
|
||||
struct termios *, char **);
|
||||
void window_pane_resize(struct window_pane *, u_int, u_int);
|
||||
void window_pane_alternate_on(
|
||||
struct window_pane *, struct grid_cell *);
|
||||
void window_pane_alternate_off(
|
||||
struct window_pane *, struct grid_cell *);
|
||||
int window_pane_set_mode(
|
||||
struct window_pane *, const struct window_mode *);
|
||||
void window_pane_reset_mode(struct window_pane *);
|
||||
|
Reference in New Issue
Block a user