diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-22 16:45:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-22 16:45:31 +0000 |
commit | 6a309c53a8ae3142d132fe1c12e55bed9b62e4d5 (patch) | |
tree | b6d8d6e8e79a4cafcf033a633a7d16122ace32ee /tmux.h | |
parent | 5bd72ec62990d96c3af87858e263bff7a1c0f220 (diff) | |
download | rtmux-6a309c53a8ae3142d132fe1c12e55bed9b62e4d5.tar.gz rtmux-6a309c53a8ae3142d132fe1c12e55bed9b62e4d5.tar.bz2 rtmux-6a309c53a8ae3142d132fe1c12e55bed9b62e4d5.zip |
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.h | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -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 *, |