aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-16 14:44:42 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-16 14:44:42 +0000
commitc5b60253a7098e164b48b560461792ccc5b2d94f (patch)
tree7e698b61c7735caebf8051b3f56ad79ad61f844b /terminal.h
parentwip: vt parsing: initial csi/osc dispatching (diff)
vt: cell now tracks attributes (bold, italic, underline etc)
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/terminal.h b/terminal.h
index 08e97824..d5f9ef34 100644
--- a/terminal.h
+++ b/terminal.h
@@ -4,11 +4,22 @@
#include <stdbool.h>
#include <stddef.h>
-struct cell {
- char c[5];
+struct attributes {
+ bool bold;
+ bool italic;
+ bool underline;
+ bool strikethrough;
+ bool blink;
+ bool conceal;
+ bool reverse;
uint32_t foreground;
uint32_t background;
+};
+
+struct cell {
bool dirty;
+ char c[5];
+ struct attributes attrs;
};
struct grid {
@@ -52,16 +63,8 @@ struct vt {
size_t idx;
size_t left;
} utf8;
- bool bold;
+ struct attributes attrs;
bool dim;
- bool italic;
- bool underline;
- bool strikethrough;
- bool blink;
- bool conceal;
- bool reverse;
- uint32_t foreground;
- uint32_t background;
};
struct terminal {