diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2011-04-06 22:16:33 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2011-04-06 22:16:33 +0000 |
commit | 536fc24653d51daf8f0015e68dd4191a9a989205 (patch) | |
tree | bf2c81cf3f126bd8f26e395d0a8305460d2844ea /tmux.h | |
parent | 95832241aa6b1af0bc3bc09fad33462f807e59a3 (diff) | |
download | rtmux-536fc24653d51daf8f0015e68dd4191a9a989205.tar.gz rtmux-536fc24653d51daf8f0015e68dd4191a9a989205.tar.bz2 rtmux-536fc24653d51daf8f0015e68dd4191a9a989205.zip |
PatchSet 870
Date: 2011/03/27 21:27:26
Author: nicm
Branch: HEAD
Tag: (none)
Log:
Give each pane created in a tmux server a unique id (starting from 0),
put it in the TMUX_PANE environment variable and accept it as a
target. Suggested by and with testing and tweaks from Ben Boeckel.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.612 2011-03-19 23:30:37 tcunha Exp $ */ +/* $Id: tmux.h,v 1.613 2011-04-06 22:16:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -775,6 +775,8 @@ struct window_mode { /* Child window structure. */ struct window_pane { + u_int id; + struct window *window; struct layout_cell *layout_cell; @@ -817,8 +819,10 @@ struct window_pane { void *modedata; TAILQ_ENTRY(window_pane) entry; + RB_ENTRY(window_pane) tree_entry; }; TAILQ_HEAD(window_panes, window_pane); +RB_HEAD(window_pane_tree, window_pane); /* Window structure. */ struct window { @@ -1821,8 +1825,11 @@ int screen_check_selection(struct screen *, u_int, u_int); /* window.c */ extern struct windows windows; +extern struct window_pane_tree all_window_panes; int winlink_cmp(struct winlink *, struct winlink *); RB_PROTOTYPE(winlinks, winlink, entry, winlink_cmp); +int window_pane_cmp(struct window_pane *, struct window_pane *); +RB_PROTOTYPE(window_pane_tree, window_pane, tree_entry, window_pane_cmp); struct winlink *winlink_find_by_index(struct winlinks *, int); struct winlink *winlink_find_by_window(struct winlinks *, struct window *); int winlink_next_index(struct winlinks *, int); @@ -1857,6 +1864,7 @@ struct window_pane *window_pane_previous_by_number(struct window *, u_int window_pane_index(struct window *, struct window_pane *); u_int window_count_panes(struct window *); void window_destroy_panes(struct window *); +struct window_pane *window_pane_find_by_id(u_int); struct window_pane *window_pane_create(struct window *, u_int, u_int, u_int); void window_pane_destroy(struct window_pane *); int window_pane_spawn(struct window_pane *, const char *, |