mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:33:27 +00:00
There are relatively few arguments to tty_cmd_* functions now, so tidy them up
by using a struct rather than hiding everything with varargs.
This commit is contained in:
18
tmux.h
18
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 *,
|
||||
|
Reference in New Issue
Block a user