diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2013-03-21 16:09:59 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2013-03-21 16:09:59 +0000 |
commit | 180faf73afe07d35e6002993a70d5fe63549ffce (patch) | |
tree | e1a06d7b7042fd2afeb84507c8795a6a5d53cd3e /tmux.h | |
parent | 8903c1f167839569b7514508b38988aa6486575c (diff) | |
download | rtmux-180faf73afe07d35e6002993a70d5fe63549ffce.tar.gz rtmux-180faf73afe07d35e6002993a70d5fe63549ffce.tar.bz2 rtmux-180faf73afe07d35e6002993a70d5fe63549ffce.zip |
Allow choose commands to be used outside tmux, so long as at least one
client is attached.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 35 |
1 files changed, 21 insertions, 14 deletions
@@ -883,18 +883,24 @@ struct window_mode { /* Structures for choose mode. */ struct window_choose_data { - struct client *client; - struct session *session; /* Session of current client. */ - struct session *tree_session; /* Session of items in tree. */ - struct format_tree *ft; - struct winlink *wl; - char *ft_template; - char *command; + struct client *start_client; + struct session *start_session; + u_int idx; int type; +#define TREE_OTHER 0x0 #define TREE_WINDOW 0x1 #define TREE_SESSION 0x2 + + struct session *tree_session; /* session of items in tree */ + + struct winlink *wl; int pane_id; + + char *ft_template; + struct format_tree *ft; + + char *command; }; struct window_choose_mode_item { @@ -2196,18 +2202,19 @@ extern const struct window_mode window_choose_mode; void window_choose_add(struct window_pane *, struct window_choose_data *); void window_choose_ready(struct window_pane *, - 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 *); + u_int, void (*)(struct window_choose_data *)); +struct window_choose_data *window_choose_data_create (int, + struct client *, struct session *); +void window_choose_data_free(struct window_choose_data *); +void window_choose_data_run(struct window_choose_data *); struct window_choose_data *window_choose_add_window(struct window_pane *, - struct cmd_ctx *, struct session *, struct winlink *, + struct client *, struct session *, struct winlink *, const char *, char *, u_int); struct window_choose_data *window_choose_add_session(struct window_pane *, - struct cmd_ctx *, struct session *, const char *, + struct client *, struct session *, const char *, char *, u_int); struct window_choose_data *window_choose_add_item(struct window_pane *, - struct cmd_ctx *, struct winlink *, const char *, + struct client *, struct winlink *, const char *, char *, u_int); void window_choose_expand_all(struct window_pane *); |