diff options
author | 2019-05-10 14:12:47 +0000 | |
---|---|---|
committer | 2019-05-10 14:12:47 +0000 | |
commit | 3f2ec672c59fb2e452be58d8aa239f9f220947a6 (patch) | |
tree | 56e61d1553982474d457b5efa0176692d680b0b4 /usr.bin/tmux/tmux.h | |
parent | Implement DNS block lists. If unwind is queried for a domain (diff) | |
download | wireguard-openbsd-3f2ec672c59fb2e452be58d8aa239f9f220947a6.tar.xz wireguard-openbsd-3f2ec672c59fb2e452be58d8aa239f9f220947a6.zip |
Add a function to draw a simple menu onto a screen.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r-- | usr.bin/tmux/tmux.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 05b75f6ecff..74bf710149b 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.893 2019/05/09 14:09:32 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.894 2019/05/10 14:12:47 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -748,6 +748,21 @@ struct screen_redraw_ctx { #define screen_hsize(s) ((s)->grid->hsize) #define screen_hlimit(s) ((s)->grid->hlimit) +/* Menu item. */ +struct menu_item { + char *name; + char *command; + key_code key; +}; + +/* Menu. */ +struct menu { + char *title; + struct menu_item *items; + u_int count; + u_int width; +}; + /* * Window mode. Windows can be in several modes and this is used to call the * right function to handle input and output. @@ -1687,7 +1702,7 @@ char *paste_make_sample(struct paste_buffer *); #define FORMAT_PANE 0x80000000U #define FORMAT_WINDOW 0x40000000U struct format_tree; -const char *format_skip(const char *s, const char *end); +const char *format_skip(const char *, const char *); int format_true(const char *); struct format_tree *format_create(struct client *, struct cmdq_item *, int, int); @@ -2200,6 +2215,7 @@ void screen_write_fast_copy(struct screen_write_ctx *, struct screen *, u_int, u_int, u_int, u_int); void screen_write_hline(struct screen_write_ctx *, u_int, int, int); void screen_write_vline(struct screen_write_ctx *, u_int, int, int); +void screen_write_menu(struct screen_write_ctx *, struct menu *, 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); |