aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h68
1 files changed, 56 insertions, 12 deletions
diff --git a/tmux.h b/tmux.h
index 9bf9f933..b7220b88 100644
--- a/tmux.h
+++ b/tmux.h
@@ -80,6 +80,10 @@ struct winlink;
/* Maximum size of data to hold from a pane. */
#define READ_SIZE 4096
+/* Default pixel cell sizes. */
+#define DEFAULT_XPIXEL 16
+#define DEFAULT_YPIXEL 32
+
/* Attribute to make GCC check printf-like arguments. */
#define printflike(a, b) __attribute__ ((format (printf, a, b)))
@@ -682,6 +686,13 @@ struct style_range {
};
TAILQ_HEAD(style_ranges, style_range);
+/* Style default. */
+enum style_default_type {
+ STYLE_DEFAULT_BASE,
+ STYLE_DEFAULT_PUSH,
+ STYLE_DEFAULT_POP
+};
+
/* Style option. */
struct style {
struct grid_cell gc;
@@ -692,6 +703,8 @@ struct style {
enum style_range_type range_type;
u_int range_argument;
+
+ enum style_default_type default_type;
};
/* Virtual screen. */
@@ -699,6 +712,7 @@ struct screen_sel;
struct screen_titles;
struct screen {
char *title;
+ char *path;
struct screen_titles *titles;
struct grid *grid; /* grid data */
@@ -845,6 +859,7 @@ struct window_pane {
#define PANE_STATUSDRAWN 0x400
#define PANE_EMPTY 0x800
#define PANE_STYLECHANGED 0x1000
+#define PANE_RESIZED 0x2000
int argc;
char **argv;
@@ -897,6 +912,7 @@ RB_HEAD(window_pane_tree, window_pane);
/* Window structure. */
struct window {
u_int id;
+ void *latest;
char *name;
struct event name_event;
@@ -918,12 +934,15 @@ struct window {
u_int sx;
u_int sy;
+ u_int xpixel;
+ u_int ypixel;
int flags;
#define WINDOW_BELL 0x1
#define WINDOW_ACTIVITY 0x2
#define WINDOW_SILENCE 0x4
#define WINDOW_ZOOMED 0x8
+#define WINDOW_WASZOOMED 0x10
#define WINDOW_ALERTFLAGS (WINDOW_BELL|WINDOW_ACTIVITY|WINDOW_SILENCE)
int alerts_queued;
@@ -961,6 +980,7 @@ TAILQ_HEAD(winlink_stack, winlink);
#define WINDOW_SIZE_LARGEST 0
#define WINDOW_SIZE_SMALLEST 1
#define WINDOW_SIZE_MANUAL 2
+#define WINDOW_SIZE_LATEST 3
/* Pane border status option. */
#define PANE_STATUS_OFF 0
@@ -1136,6 +1156,8 @@ struct tty {
u_int sx;
u_int sy;
+ u_int xpixel;
+ u_int ypixel;
u_int cx;
u_int cy;
@@ -1191,6 +1213,7 @@ struct tty {
TTY_VT220,
TTY_VT320,
TTY_VT420,
+ TTY_VT520,
TTY_UNKNOWN
} term_type;
@@ -1207,7 +1230,14 @@ struct tty {
struct tty_key *key_tree;
};
#define TTY_TYPES \
- { "VT100", "VT101", "VT102", "VT220", "VT320", "VT420", "Unknown" }
+ { "VT100", \
+ "VT101", \
+ "VT102", \
+ "VT220", \
+ "VT320", \
+ "VT420", \
+ "VT520", \
+ "Unknown" }
/* TTY command context. */
struct tty_ctx {
@@ -1216,8 +1246,8 @@ struct tty_ctx {
const struct grid_cell *cell;
int wrapped;
- u_int num;
- void *ptr;
+ u_int num;
+ void *ptr;
/*
* Cursor and region position before the screen was updated - this is
@@ -1661,6 +1691,7 @@ struct spawn_context {
struct session *s;
struct winlink *wl;
+ struct client *c;
struct window_pane *wp0;
struct layout_cell *lc;
@@ -1683,6 +1714,12 @@ struct spawn_context {
#define SPAWN_EMPTY 0x40
};
+/* Mode tree sort order. */
+struct mode_tree_sort_criteria {
+ u_int field;
+ int reversed;
+};
+
/* tmux.c */
extern struct options *global_options;
extern struct options *global_s_options;
@@ -1769,6 +1806,8 @@ void format_defaults_pane(struct format_tree *,
void format_defaults_paste_buffer(struct format_tree *,
struct paste_buffer *);
void format_lost_client(struct client *);
+char *format_grid_word(struct grid *, u_int, u_int);
+char *format_grid_line(struct grid *, u_int);
/* format-draw.c */
void format_draw(struct screen_write_ctx *,
@@ -1898,7 +1937,7 @@ void tty_putc(struct tty *, u_char);
void tty_putn(struct tty *, const void *, size_t, u_int);
int tty_init(struct tty *, struct client *, int, char *);
void tty_resize(struct tty *);
-void tty_set_size(struct tty *, u_int, u_int);
+void tty_set_size(struct tty *, u_int, u_int, u_int, u_int);
void tty_start_tty(struct tty *);
void tty_stop_tty(struct tty *);
void tty_set_title(struct tty *, const char *);
@@ -2177,9 +2216,10 @@ void status_prompt_load_history(void);
void status_prompt_save_history(void);
/* resize.c */
-void resize_window(struct window *, u_int, u_int);
-void default_window_size(struct session *, struct window *, u_int *,
- u_int *, int);
+void resize_window(struct window *, u_int, u_int, int, int);
+void default_window_size(struct client *, struct session *, struct window *,
+ u_int *, u_int *, u_int *, u_int *, int);
+void recalculate_size(struct window *);
void recalculate_sizes(void);
/* input.c */
@@ -2330,6 +2370,7 @@ void screen_reset_tabs(struct screen *);
void screen_set_cursor_style(struct screen *, u_int);
void screen_set_cursor_colour(struct screen *, const char *);
void screen_set_title(struct screen *, const char *);
+void screen_set_path(struct screen *, const char *);
void screen_push_title(struct screen *);
void screen_pop_title(struct screen *);
void screen_resize(struct screen *, u_int, u_int, int);
@@ -2369,7 +2410,7 @@ void winlink_stack_remove(struct winlink_stack *, struct winlink *);
struct window *window_find_by_id_str(const char *);
struct window *window_find_by_id(u_int);
void window_update_activity(struct window *);
-struct window *window_create(u_int, u_int);
+struct window *window_create(u_int, u_int, u_int, u_int);
void window_pane_set_event(struct window_pane *);
struct window_pane *window_get_active_at(struct window *, u_int, u_int);
struct window_pane *window_find_string(struct window *, const char *);
@@ -2380,9 +2421,12 @@ void window_redraw_active_switch(struct window *,
struct window_pane *);
struct window_pane *window_add_pane(struct window *, struct window_pane *,
u_int, int);
-void window_resize(struct window *, u_int, u_int);
+void window_resize(struct window *, u_int, u_int, int, int);
+void window_pane_send_resize(struct window_pane *, int);
int window_zoom(struct window_pane *);
int window_unzoom(struct window *);
+int window_push_zoom(struct window *, int);
+int window_pop_zoom(struct window *);
void window_lost_pane(struct window *, struct window_pane *);
void window_remove_pane(struct window *, struct window_pane *);
struct window_pane *window_pane_at_index(struct window *, u_int);
@@ -2472,7 +2516,8 @@ u_int layout_set_next(struct window *);
u_int layout_set_previous(struct window *);
/* mode-tree.c */
-typedef void (*mode_tree_build_cb)(void *, u_int, uint64_t *, const char *);
+typedef void (*mode_tree_build_cb)(void *, struct mode_tree_sort_criteria *,
+ uint64_t *, const char *);
typedef void (*mode_tree_draw_cb)(void *, void *, struct screen_write_ctx *,
u_int, u_int);
typedef int (*mode_tree_search_cb)(void *, void *, const char *);
@@ -2604,6 +2649,7 @@ struct utf8_data *utf8_fromcstr(const char *);
char *utf8_tocstr(struct utf8_data *);
u_int utf8_cstrwidth(const char *);
char *utf8_padcstr(const char *, u_int);
+char *utf8_rpadcstr(const char *, u_int);
int utf8_cstrhas(const char *, const struct utf8_data *);
/* osdep-*.c */
@@ -2641,8 +2687,6 @@ int style_parse(struct style *,const struct grid_cell *,
const char *style_tostring(struct style *);
void style_apply(struct grid_cell *, struct options *,
const char *);
-void style_apply_update(struct grid_cell *, struct options *,
- const char *);
int style_equal(struct style *, struct style *);
void style_set(struct style *, const struct grid_cell *);
void style_copy(struct style *, struct style *);