summaryrefslogtreecommitdiffstats
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-22 16:45:31 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-22 16:45:31 +0000
commit6a309c53a8ae3142d132fe1c12e55bed9b62e4d5 (patch)
treeb6d8d6e8e79a4cafcf033a633a7d16122ace32ee /tmux.h
parent5bd72ec62990d96c3af87858e263bff7a1c0f220 (diff)
There are relatively few arguments to tty_cmd_* functions now, so tidy them up
by using a struct rather than hiding everything with varargs.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/tmux.h b/tmux.h
index 3e532f75..2062dfff 100644
--- a/tmux.h
+++ b/tmux.h
@@ -292,6 +292,16 @@ enum tty_cmd {
TTY_REVERSEINDEX,
};
+struct tty_ctx {
+ struct window_pane *wp;
+
+ const struct grid_cell *cell;
+ const struct grid_utf8 *utf8;
+
+ u_int num;
+ void *ptr;
+};
+
/* Message codes. */
enum hdrtype {
MSG_COMMAND,
@@ -1048,8 +1058,7 @@ void tty_redraw_region(struct tty *, struct window_pane *);
int tty_open(struct tty *, char **);
void tty_close(struct tty *, int);
void tty_free(struct tty *, int);
-void tty_vwrite(
- struct tty *, struct window_pane *, enum tty_cmd, va_list);
+void tty_write(struct tty *, enum tty_cmd, struct tty_ctx *);
/* tty-term.c */
extern struct tty_terms tty_terms;
@@ -1072,7 +1081,10 @@ void tty_keys_free(struct tty *);
int tty_keys_next(struct tty *, int *, u_char *);
/* tty-write.c */
-void tty_write_cmd(struct window_pane *, enum tty_cmd, ...);
+void tty_write0(struct window_pane *, enum tty_cmd);
+void tty_writenum(struct window_pane *, enum tty_cmd, u_int);
+void tty_writeptr(struct window_pane *, enum tty_cmd, void *);
+void tty_write_cmd(enum tty_cmd, struct tty_ctx *);
/* options-cmd.c */
void set_option_string(struct cmd_ctx *,