=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.774 retrieving revision 1.775 diff -c -r1.774 -r1.775 *** src/usr.bin/tmux/tmux.h 2017/05/29 20:42:53 1.774 --- src/usr.bin/tmux/tmux.h 2017/05/30 21:44:59 1.775 *************** *** 1,4 **** ! /* $OpenBSD: tmux.h,v 1.774 2017/05/29 20:42:53 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.h,v 1.775 2017/05/30 21:44:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 40,51 **** struct args; struct client; struct cmdq_item; struct cmdq_list; struct environ; struct format_job_tree; struct input_ctx; ! struct mode_key_cmdstr; struct mouse_event; struct options; struct options_entry; --- 40,52 ---- struct args; struct client; + struct cmd_find_state; struct cmdq_item; struct cmdq_list; struct environ; struct format_job_tree; struct input_ctx; ! struct mode_tree_data; struct mouse_event; struct options; struct options_entry; *************** *** 693,699 **** struct window_mode { const char *name; ! struct screen *(*init)(struct window_pane *); void (*free)(struct window_pane *); void (*resize)(struct window_pane *, u_int, u_int); void (*key)(struct window_pane *, struct client *, --- 694,701 ---- struct window_mode { const char *name; ! struct screen *(*init)(struct window_pane *, struct cmd_find_state *, ! struct args *); void (*free)(struct window_pane *); void (*resize)(struct window_pane *, u_int, u_int); void (*key)(struct window_pane *, struct client *, *************** *** 1518,1523 **** --- 1520,1526 ---- #define FORMAT_PANE 0x80000000U #define FORMAT_WINDOW 0x40000000U struct format_tree; + int format_true(const char *); struct format_tree *format_create(struct client *, struct cmdq_item *, int, int); void format_free(struct format_tree *); *************** *** 1717,1722 **** --- 1720,1726 ---- key_code tty_keys_next(struct tty *); /* arguments.c */ + void args_set(struct args *, u_char, const char *); struct args *args_parse(const char *, int, char **); void args_free(struct args *); char *args_print(struct args *); *************** *** 1997,2002 **** --- 2001,2010 ---- u_char); void screen_write_copy(struct screen_write_ctx *, struct screen *, u_int, u_int, u_int, u_int, bitstr_t *, const struct grid_cell *); + void screen_write_line(struct screen_write_ctx *, u_int, int, int); + void screen_write_box(struct screen_write_ctx *, u_int, u_int); + void screen_write_preview(struct screen_write_ctx *, struct screen *, u_int, + u_int); void screen_write_backspace(struct screen_write_ctx *); void screen_write_mode_set(struct screen_write_ctx *, int); void screen_write_mode_clear(struct screen_write_ctx *, int); *************** *** 2119,2133 **** void window_pane_reset_palette(struct window_pane *); int window_pane_get_palette(const struct window_pane *, int); int window_pane_set_mode(struct window_pane *, ! const struct window_mode *); void window_pane_reset_mode(struct window_pane *); void window_pane_key(struct window_pane *, struct client *, struct session *, key_code, struct mouse_event *); int window_pane_outside(struct window_pane *); int window_pane_visible(struct window_pane *); u_int window_pane_search(struct window_pane *, const char *); ! char *window_pane_search_old(struct window_pane *, const char *, ! u_int *); const char *window_printable_flags(struct winlink *); struct window_pane *window_pane_find_up(struct window_pane *); struct window_pane *window_pane_find_down(struct window_pane *); --- 2127,2141 ---- void window_pane_reset_palette(struct window_pane *); int window_pane_get_palette(const struct window_pane *, int); int window_pane_set_mode(struct window_pane *, ! const struct window_mode *, struct cmd_find_state *, ! struct args *); void window_pane_reset_mode(struct window_pane *); void window_pane_key(struct window_pane *, struct client *, struct session *, key_code, struct mouse_event *); int window_pane_outside(struct window_pane *); int window_pane_visible(struct window_pane *); u_int window_pane_search(struct window_pane *, const char *); ! const char *window_printable_flags(struct winlink *); struct window_pane *window_pane_find_up(struct window_pane *); struct window_pane *window_pane_find_down(struct window_pane *); *************** *** 2176,2185 **** --- 2184,2226 ---- u_int layout_set_next(struct window *); u_int layout_set_previous(struct window *); + /* mode-tree.c */ + u_int mode_tree_count_tagged(struct mode_tree_data *); + void *mode_tree_get_current(struct mode_tree_data *); + void mode_tree_each_tagged(struct mode_tree_data *, void (*)(void *, void *, + key_code), key_code, int); + void mode_tree_up(struct mode_tree_data *, int); + void mode_tree_down(struct mode_tree_data *, int); + struct mode_tree_data *mode_tree_start(struct window_pane *, + void (*)(void *, u_int, uint64_t *), struct screen *(*)(void *, + void *, u_int, u_int), void *, const char **, u_int, + struct screen **); + void mode_tree_build(struct mode_tree_data *); + void mode_tree_free(struct mode_tree_data *); + void mode_tree_resize(struct mode_tree_data *, u_int, u_int); + struct mode_tree_item *mode_tree_add(struct mode_tree_data *, + struct mode_tree_item *, void *, uint64_t, const char *, + const char *, int); + void mode_tree_remove(struct mode_tree_data *, struct mode_tree_item *); + void mode_tree_draw(struct mode_tree_data *); + int mode_tree_key(struct mode_tree_data *, key_code *, + struct mouse_event *); + void mode_tree_run_command(struct client *, struct cmd_find_state *, + const char *, const char *); + + /* window-buffer.c */ + extern const struct window_mode window_buffer_mode; + + /* window-tree.c */ + extern const struct window_mode window_tree_mode; + /* window-clock.c */ extern const struct window_mode window_clock_mode; extern const char window_clock_table[14][5][5]; + /* window-client.c */ + extern const struct window_mode window_client_mode; + /* window-copy.c */ extern const struct window_mode window_copy_mode; void window_copy_init_from_pane(struct window_pane *, int); *************** *** 2189,2212 **** void window_copy_pageup(struct window_pane *, int); void window_copy_start_drag(struct client *, struct mouse_event *); int window_copy_scroll_position(struct window_pane *); - - /* window-choose.c */ - 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 *)); - struct window_choose_data *window_choose_data_create (int, - struct client *, struct session *); - void window_choose_data_run(struct window_choose_data *); - struct window_choose_data *window_choose_add_window(struct window_pane *, - struct client *, struct session *, struct winlink *, - const char *, const char *, u_int); - struct window_choose_data *window_choose_add_session(struct window_pane *, - struct client *, struct session *, const char *, - const char *, u_int); - void window_choose_expand_all(struct window_pane *); - void window_choose_set_current(struct window_pane *, u_int); /* names.c */ void check_window_name(struct window *); --- 2230,2235 ----