diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-03-07 22:02:42 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-03-07 22:02:42 +0000 |
commit | 349aeb806ab02797e1d28be22802e73f75b77c1d (patch) | |
tree | 4c0441cbe888d2d8902c19d66da6acef6bf95e39 /tmux.h | |
parent | a1009e7bd3c4acd7dc4157e317013f066d1deca8 (diff) | |
parent | f98c66ece81953c777cd332c6bd29d707b1685e5 (diff) | |
download | rtmux-349aeb806ab02797e1d28be22802e73f75b77c1d.tar.gz rtmux-349aeb806ab02797e1d28be22802e73f75b77c1d.tar.bz2 rtmux-349aeb806ab02797e1d28be22802e73f75b77c1d.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 32 |
1 files changed, 21 insertions, 11 deletions
@@ -695,25 +695,37 @@ struct screen_write_ctx { * Window mode. Windows can be in several modes and this is used to call the * right function to handle input and output. */ +struct window_mode_entry; struct window_mode { const char *name; - struct screen *(*init)(struct window_pane *, struct cmd_find_state *, - struct args *); - void (*free)(struct window_pane *); - void (*resize)(struct window_pane *, u_int, u_int); - void (*key)(struct window_pane *, struct client *, + struct screen *(*init)(struct window_mode_entry *, + struct cmd_find_state *, struct args *); + void (*free)(struct window_mode_entry *); + void (*resize)(struct window_mode_entry *, u_int, u_int); + void (*key)(struct window_mode_entry *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *); - const char *(*key_table)(struct window_pane *); - void (*command)(struct window_pane *, struct client *, + const char *(*key_table)(struct window_mode_entry *); + void (*command)(struct window_mode_entry *, struct client *, struct session *, struct winlink *, struct args *, struct mouse_event *); - void (*formats)(struct window_pane *, struct format_tree *); + void (*formats)(struct window_mode_entry *, + struct format_tree *); }; #define WINDOW_MODE_TIMEOUT 180 +/* Active window mode. */ +struct window_mode_entry { + struct window_pane *wp; + + const struct window_mode *mode; + void *data; + + u_int prefix; +}; + /* Child window structure. */ struct window_pane { u_int id; @@ -782,11 +794,9 @@ struct window_pane { struct grid *saved_grid; struct grid_cell saved_cell; - const struct window_mode *mode; - void *modedata; + struct window_mode_entry *mode; struct event modetimer; time_t modelast; - u_int modeprefix; char *searchstr; TAILQ_ENTRY(window_pane) entry; |