From 56dec05d29098b151421625c68525c2c3961e574 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Fri, 3 Oct 2014 14:44:41 +0200 Subject: terminal/screen: add color converter Terminals use pseudo color-codes mixed with 8bit and 24bit colors. Provide a color-converter so external renderers only have to deal with ARGB32 colors. This requires a color-palette as input as there's no fixed mapping. We provide a default, but maybe we wanna support external palettes in the future. --- src/libsystemd-terminal/term.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsystemd-terminal/term.h') diff --git a/src/libsystemd-terminal/term.h b/src/libsystemd-terminal/term.h index 5228ce0601..8efd48b263 100644 --- a/src/libsystemd-terminal/term.h +++ b/src/libsystemd-terminal/term.h @@ -97,6 +97,8 @@ struct term_attr { unsigned int hidden : 1; /* hidden */ }; +void term_attr_to_argb32(const term_attr *attr, uint32_t *fg, uint32_t *bg, const uint8_t *palette); + /* * UTF-8 */ -- cgit v1.2.3-54-g00ecf