aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-29 19:15:32 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-29 19:15:32 +0000
commita8f4cb55afdd3aaaac95e14fd117425a375aa358 (patch)
tree8cc3dc9dd7c698e9f19eaf31f17ca1d49a6aa3e6 /terminal.h
parentterminal: move fore/background colors from grid to terminal (diff)
terminal: move cursor from grid to terminal
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/terminal.h b/terminal.h
index ac1625ab..8e93d209 100644
--- a/terminal.h
+++ b/terminal.h
@@ -37,6 +37,12 @@ struct scroll_region {
int end;
};
+struct cursor {
+ int row;
+ int col;
+ int linear;
+};
+
enum damage_type {DAMAGE_UPDATE, DAMAGE_ERASE, DAMAGE_SCROLL, DAMAGE_SCROLL_REVERSE};
struct damage {
enum damage_type type;
@@ -56,20 +62,11 @@ struct damage {
};
struct grid {
- int linear_cursor;
- struct {
- int row;
- int col;
- } cursor;
bool print_needs_wrap;
struct cell *cells;
struct cell *normal_grid;
struct cell *alt_grid;
- struct {
- int row;
- int col;
- } alt_saved_cursor;
tll(struct damage) damage;
tll(struct damage) scroll_damage;
@@ -151,6 +148,10 @@ struct terminal {
struct rgba foreground;
struct rgba background;
+
+ struct cursor cursor;
+ struct cursor saved_cursor;
+ struct cursor alt_saved_cursor;
};
void term_damage_all(struct terminal *term);