diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-05-10 22:10:38 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-05-10 22:10:38 +0100 |
commit | aa13bd401633122ceb7ced7745025140725ebe06 (patch) | |
tree | 646127a40039a0bf625c605e079e7d43a5de0c4c /tmux.h | |
parent | c5f6ea5c0dedfcc8f3245247a0f1298c2fca2fcb (diff) | |
parent | d62fd78655b305f4db9b41ff3b5a35b909674d74 (diff) | |
download | rtmux-aa13bd401633122ceb7ced7745025140725ebe06.tar.gz rtmux-aa13bd401633122ceb7ced7745025140725ebe06.tar.bz2 rtmux-aa13bd401633122ceb7ced7745025140725ebe06.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -750,20 +750,20 @@ struct screen_redraw_ctx { #define screen_hsize(s) ((s)->grid->hsize) #define screen_hlimit(s) ((s)->grid->hlimit) -/* Menu item. */ +/* Menu. */ struct menu_item { - char *name; - char *command; - key_code key; + char *name; + char *command; + key_code key; }; - -/* Menu. */ struct menu { char *title; struct menu_item *items; u_int count; u_int width; }; +typedef void (*menu_choice_cb)(struct menu *, u_int, key_code, void *); +#define MENU_NOMOUSE 0x1 /* * Window mode. Windows can be in several modes and this is used to call the @@ -2554,6 +2554,16 @@ void printflike(1, 2) log_debug(const char *, ...); __dead void printflike(1, 2) fatal(const char *, ...); __dead void printflike(1, 2) fatalx(const char *, ...); +/* menu.c */ +struct menu *menu_create_from_items(struct menu_item *, u_int, + struct client *, struct cmd_find_state *, const char *); +struct menu *menu_create_from_string(const char *, struct client *, + struct cmd_find_state *, const char *); +void menu_free(struct menu *); +int menu_display(struct menu *, int, struct cmdq_item *, u_int, + u_int, struct client *, struct cmd_find_state *, + menu_choice_cb, void *); + /* style.c */ int style_parse(struct style *,const struct grid_cell *, const char *); |