summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-03-24 09:58:00 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-03-24 09:58:00 +0000
commit047a733e6947034ce62a51ab1301d5cfb3bd0abe (patch)
tree877a049ef2934bc136505a98ed24a2e8e2dedb7f /usr.bin/tmux/tmux.h
parente6e3e05e33040b1ac0ab0fd4e1a39aa94323411d (diff)
Add resize-pane -Z to temporary zoom the active pane to occupy the full
window or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z by default. The pane is unzoomed on pretty much any excuse whatsoever. We considered making this a new layout but the requirements are quite different from layouts so decided it is better as a special case. Each current layout cell is saved, a temporary one-cell layout generated and all except the active pane set to NULL. Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and Thiago Padilha for testing an earlier version.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r--usr.bin/tmux/tmux.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index fe115090eff..194ca9d1804 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.397 2013/03/24 09:54:10 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.398 2013/03/24 09:57:59 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -929,7 +929,9 @@ struct window_pane {
u_int id;
struct window *window;
+
struct layout_cell *layout_cell;
+ struct layout_cell *saved_layout_cell;
u_int sx;
u_int sy;
@@ -994,6 +996,7 @@ struct window {
int lastlayout;
struct layout_cell *layout_root;
+ struct layout_cell *saved_layout_root;
u_int sx;
u_int sy;
@@ -1003,6 +1006,7 @@ struct window {
#define WINDOW_ACTIVITY 0x2
#define WINDOW_REDRAW 0x4
#define WINDOW_SILENCE 0x8
+#define WINDOW_ZOOMED 0x10
struct options options;
@@ -1929,6 +1933,7 @@ void server_push_stdout(struct client *);
void server_push_stderr(struct client *);
int server_set_stdin_callback(struct client *, void (*)(struct client *,
int, void *), void *, char **);
+void server_unzoom_window(struct window *);
/* status.c */
int status_out_cmp(struct status_out *, struct status_out *);
@@ -2132,6 +2137,8 @@ struct window_pane *window_find_string(struct window *, const char *);
void window_set_active_pane(struct window *, struct window_pane *);
struct window_pane *window_add_pane(struct window *, u_int);
void window_resize(struct window *, u_int, u_int);
+int window_zoom(struct window_pane *);
+int window_unzoom(struct window *);
void window_remove_pane(struct window *, struct window_pane *);
struct window_pane *window_pane_at_index(struct window *, u_int);
struct window_pane *window_pane_next_by_number(struct window *,
@@ -2188,7 +2195,7 @@ void layout_fix_panes(struct window *, u_int, u_int);
u_int layout_resize_check(struct layout_cell *, enum layout_type);
void layout_resize_adjust(
struct layout_cell *, enum layout_type, int);
-void layout_init(struct window *);
+void layout_init(struct window *, struct window_pane *);
void layout_free(struct window *);
void layout_resize(struct window *, u_int, u_int);
void layout_resize_pane(struct window_pane *, enum layout_type,