summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-11-02 22:00:43 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-11-02 22:00:43 +0000
commitd234cbd7cc7f8be48c2a354b178b0864e9d977e7 (patch)
tree3188fe399cf9c1960bb28f506131aa2a84622eab /usr.bin/tmux/tmux.h
parentf568348413f21ed85b72756035d630767e7d81ab (diff)
Make the mode draw function use the parent screen directly rather than
its own to avoid copying twice.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r--usr.bin/tmux/tmux.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 05928bfc80f..ecbd644b1d1 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.810 2017/11/02 21:29:17 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.811 2017/11/02 22:00:42 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2225,17 +2225,20 @@ 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_draw_cb)(void *, void *, struct screen_write_ctx *,
+ u_int, u_int);
+typedef int (*mode_tree_search_cb)(void *, void *, const char *);
+typedef void (*mode_tree_each_cb)(void *, void *, struct client *, key_code);
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 *,
- struct client *, key_code), struct client *, key_code, int);
+void mode_tree_each_tagged(struct mode_tree_data *, mode_tree_each_cb,
+ struct client *, 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 *, struct args *,
- void (*)(void *, u_int, uint64_t *, const char *),
- struct screen *(*)(void *, void *, u_int, u_int),
- int (*)(void *, void *, const char *), void *, const char **,
- u_int, struct screen **);
+ mode_tree_build_cb, mode_tree_draw_cb, mode_tree_search_cb,
+ 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);