summaryrefslogtreecommitdiffstats
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-22 20:53:38 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-22 20:53:38 +0000
commitddad0be5f773978c09e7c86ad79596ce7af9ec71 (patch)
tree31ca49deb0c7507e96dd2cc470e8ebc12afaed87 /tmux.h
parentbb4bab4c262f3b7b8bc2df8857b417a229c595e1 (diff)
More tty code tidying: move the saved cursor/region position (from before the
screen was updated) out of struct screen and into struct tty_ctx.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/tmux.h b/tmux.h
index 8b64ee36..d8d1c659 100644
--- a/tmux.h
+++ b/tmux.h
@@ -477,15 +477,9 @@ struct screen {
u_int cx; /* cursor x */
u_int cy; /* cursor y */
- u_int old_cx;
- u_int old_cy;
-
u_int rupper; /* scroll region top */
u_int rlower; /* scroll region bottom */
- u_int old_rupper;
- u_int old_rlower;
-
int mode;
bitstr_t *tabs;
@@ -783,8 +777,19 @@ struct tty_ctx {
const struct grid_cell *cell;
const struct grid_utf8 *utf8;
- u_int num;
- void *ptr;
+ u_int num;
+ void *ptr;
+
+ /*
+ * Cursor and region position before the screen was updated - this is
+ * where the command should be applied; the values in the screen have
+ * already been updated.
+ */
+ u_int ocx;
+ u_int ocy;
+
+ u_int orupper;
+ u_int orlower;
};
typedef void tty_cmd_func(struct tty *, struct tty_ctx *);
@@ -1032,10 +1037,10 @@ void tty_detect_utf8(struct tty *);
void tty_set_title(struct tty *, const char *);
void tty_update_mode(struct tty *, int);
void tty_draw_line(struct tty *, struct screen *, u_int, u_int, u_int);
-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_write(void (*)(struct tty *, struct tty_ctx *), struct tty_ctx *);
void tty_cmd_alignmenttest(struct tty *, struct tty_ctx *);
void tty_cmd_cell(struct tty *, struct tty_ctx *);
void tty_cmd_clearendofline(struct tty *, struct tty_ctx *);
@@ -1073,9 +1078,6 @@ void tty_keys_free(struct tty *);
int tty_keys_next(struct tty *, int *, u_char *);
/* tty-write.c */
-void tty_write0(struct window_pane *, tty_cmd_func *);
-void tty_writenum(struct window_pane *, tty_cmd_func *, u_int);
-void tty_writeptr(struct window_pane *, tty_cmd_func *, void *);
void tty_write(tty_cmd_func *, struct tty_ctx *);
/* options-cmd.c */