diff options
author | nicm <nicm> | 2015-05-08 16:18:04 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-05-08 16:18:04 +0000 |
commit | c4a4bd6ac5748939c7c17beba9e14bee5929c552 (patch) | |
tree | 015353e19d24a55e9da47a7acf3a8faee09a832f /tmux.h | |
parent | 879de25583a5a0bce57bd816ced96e0caf62c436 (diff) | |
download | rtmux-c4a4bd6ac5748939c7c17beba9e14bee5929c552.tar.gz rtmux-c4a4bd6ac5748939c7c17beba9e14bee5929c552.tar.bz2 rtmux-c4a4bd6ac5748939c7c17beba9e14bee5929c552.zip |
Move input parser structs into input.c (removing fairly useless
saved_cursor_[xy] formats as a side-effect).
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 54 |
1 files changed, 4 insertions, 50 deletions
@@ -785,55 +785,6 @@ struct screen_write_ctx { #define screen_hsize(s) ((s)->grid->hsize) #define screen_hlimit(s) ((s)->grid->hlimit) -/* Input parser cell. */ -struct input_cell { - struct grid_cell cell; - int set; - int g0set; /* 1 if ACS */ - int g1set; /* 1 if ACS */ -}; - -/* Input parser context. */ -struct input_ctx { - struct window_pane *wp; - struct screen_write_ctx ctx; - - struct input_cell cell; - - struct input_cell old_cell; - u_int old_cx; - u_int old_cy; - - u_char interm_buf[4]; - size_t interm_len; - - u_char param_buf[64]; - size_t param_len; - -#define INPUT_BUF_START 32 -#define INPUT_BUF_LIMIT 1048576 - u_char *input_buf; - size_t input_len; - size_t input_space; - - int param_list[24]; /* -1 not present */ - u_int param_list_len; - - struct utf8_data utf8data; - - int ch; - int flags; -#define INPUT_DISCARD 0x1 - - const struct input_state *state; - - /* - * All input received since we were last in the ground state. Sent to - * control clients on connection. - */ - struct evbuffer *since_ground; -}; - /* * Window mode. Windows can be in several modes and this is used to call the * right function to handle input and output. @@ -881,6 +832,7 @@ struct window_choose_mode_item { }; /* Child window structure. */ +struct input_ctx; struct window_pane { u_int id; u_int active_point; @@ -920,7 +872,7 @@ struct window_pane { int fd; struct bufferevent *event; - struct input_ctx ictx; + struct input_ctx *ictx; struct grid_cell colgc; @@ -1983,6 +1935,8 @@ void recalculate_sizes(void); /* input.c */ void input_init(struct window_pane *); void input_free(struct window_pane *); +void input_reset(struct window_pane *); +struct evbuffer *input_pending(struct window_pane *); void input_parse(struct window_pane *); /* input-key.c */ |