diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-07-03 07:59:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-07-03 07:59:56 +0000 |
| commit | e5ed387426cb7d50d6d24dc0a3fbf95334314d40 (patch) | |
| tree | 075e84e1f06a7120f1abb1292ba144b81cac894d /terminal.h | |
| parent | csi: implement SGR 21, double underlines (diff) | |
| parent | csi: redraw margins after restoring the palette (diff) | |
Merge branch 'color-stack'
Closes #856
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -393,6 +393,19 @@ struct url { }; typedef tll(struct url) url_list_t; + +struct colors { + uint32_t fg; + uint32_t bg; + uint32_t table[256]; + uint16_t alpha; + uint32_t cursor_fg; /* Text color */ + uint32_t cursor_bg; /* cursor color */ + uint32_t selection_fg; + uint32_t selection_bg; + bool use_custom_selection; +}; + struct terminal { struct fdm *fdm; struct reaper *reaper; @@ -563,15 +576,13 @@ struct terminal { int cell_width; /* pixels per cell, x-wise */ int cell_height; /* pixels per cell, y-wise */ + struct colors colors; + struct { - uint32_t fg; - uint32_t bg; - uint32_t table[256]; - uint16_t alpha; - uint32_t selection_fg; - uint32_t selection_bg; - bool use_custom_selection; - } colors; + struct colors *stack; + size_t idx; + size_t size; + } color_stack; enum cursor_style cursor_style; struct { @@ -580,10 +591,6 @@ struct terminal { int fd; enum { CURSOR_BLINK_ON, CURSOR_BLINK_OFF } state; } cursor_blink; - struct { - uint32_t text; - uint32_t cursor; - } cursor_color; struct { enum selection_kind kind; |
