diff options
author | Tiago Cunha <tcunha@gmx.com> | 2012-07-04 11:01:00 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2012-07-04 11:01:00 +0000 |
commit | 5761712799beb830ba18e27b3300aaa248ff83d4 (patch) | |
tree | 2722dfb7835ce87e0133bb0ea48324c22875881d /tmux.h | |
parent | 9bb97522d52ffacae77cb2b914284ffe192e13c4 (diff) | |
download | rtmux-5761712799beb830ba18e27b3300aaa248ff83d4.tar.gz rtmux-5761712799beb830ba18e27b3300aaa248ff83d4.tar.bz2 rtmux-5761712799beb830ba18e27b3300aaa248ff83d4.zip |
Sync OpenBSD patchset 1142:
Clean up and simplify the choose mode code, from Thomas Adam.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -842,6 +842,22 @@ struct window_mode { void (*timer)(struct window_pane *); }; +/* Structures for choose mode. */ +struct window_choose_data { + struct client *client; + struct session *session; + struct format_tree *ft; + char *ft_template; + char *raw_format; + char *action; + u_int idx; +}; + +struct window_choose_mode_item { + struct window_choose_data *wcd; + char *name; +}; + /* Child window structure. */ struct window_pane { u_int id; @@ -2117,10 +2133,14 @@ void window_copy_pageup(struct window_pane *); extern const struct window_mode window_choose_mode; void window_choose_vadd( struct window_pane *, int, const char *, va_list); -void printflike3 window_choose_add( - struct window_pane *, int, const char *, ...); +void window_choose_add(struct window_pane *, + struct window_choose_data *); void window_choose_ready(struct window_pane *, - u_int, void (*)(void *, int), void (*)(void *), void *); + u_int, void (*)(struct window_choose_data *), + void (*)(struct window_choose_data *)); +struct window_choose_data *window_choose_data_create( + struct cmd_ctx *); +void window_choose_ctx(struct window_choose_data *); /* names.c */ void queue_window_name(struct window *); |