mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: track cell color source
Each cell now tracks it’s current color source: * default fg/bg * base16 fg/bg (maps to *both* the regular and bright colors) * base256 fg/bg * RGB Note that we don’t have enough bits to separate the regular from the bright colors. These _shouldn’t_ be the same, so we ought to be fine...
This commit is contained in:
parent
37b82efa77
commit
d46af6bd7a
6 changed files with 34 additions and 26 deletions
12
terminal.h
12
terminal.h
|
|
@ -24,6 +24,13 @@
|
|||
#include "shm.h"
|
||||
#include "wayland.h"
|
||||
|
||||
enum color_source {
|
||||
COLOR_DEFAULT,
|
||||
COLOR_BASE16,
|
||||
COLOR_BASE256,
|
||||
COLOR_RGB,
|
||||
};
|
||||
|
||||
/*
|
||||
* Note: we want the cells to be as small as possible. Larger cells
|
||||
* means fewer scrollback lines (or performance drops due to cache
|
||||
|
|
@ -43,12 +50,11 @@ struct attributes {
|
|||
uint32_t fg:24;
|
||||
|
||||
bool clean:1;
|
||||
enum color_source fg_src:2;
|
||||
enum color_source bg_src:2;
|
||||
bool confined:1;
|
||||
bool have_fg:1;
|
||||
bool have_bg:1;
|
||||
bool selected:1;
|
||||
bool url:1;
|
||||
uint32_t reserved:2;
|
||||
uint32_t bg:24;
|
||||
};
|
||||
static_assert(sizeof(struct attributes) == 8, "VT attribute struct too large");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue