=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.906 retrieving revision 1.907 diff -u -r1.906 -r1.907 --- src/usr.bin/tmux/tmux.h 2019/05/26 17:34:45 1.906 +++ src/usr.bin/tmux/tmux.h 2019/05/28 07:18:42 1.907 @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.906 2019/05/26 17:34:45 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.907 2019/05/28 07:18:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -752,12 +752,12 @@ /* Menu. */ struct menu_item { - char *name; - char *command; + const char *name; key_code key; + const char *command; }; struct menu { - char *title; + const char *title; struct menu_item *items; u_int count; u_int width; @@ -2467,8 +2467,8 @@ void mode_tree_down(struct mode_tree_data *, int); struct mode_tree_data *mode_tree_start(struct window_pane *, struct args *, mode_tree_build_cb, mode_tree_draw_cb, mode_tree_search_cb, - mode_tree_menu_cb, void *, const char *, const char **, u_int, - struct screen **); + mode_tree_menu_cb, void *, const struct menu_item *, const char **, + u_int, struct screen **); void mode_tree_zoom(struct mode_tree_data *, struct args *); void mode_tree_build(struct mode_tree_data *); void mode_tree_free(struct mode_tree_data *); @@ -2600,8 +2600,14 @@ __dead void printflike(1, 2) fatalx(const char *, ...); /* menu.c */ -struct menu *menu_create(const char *, struct cmdq_item *, struct client *, - struct cmd_find_state *, const char *); +struct menu *menu_create(const char *); +void menu_add_items(struct menu *, const struct menu_item *, + struct cmdq_item *, struct client *, + struct cmd_find_state *); +void menu_add_item(struct menu *, const struct menu_item *, + struct cmdq_item *, struct client *, + struct cmd_find_state *); + void menu_free(struct menu *); int menu_display(struct menu *, int, struct cmdq_item *, u_int, u_int, struct client *, struct cmd_find_state *,