Retry only for https protocol
[elinks.git] / src / util / color.h
blob52f7353c6c4a39c2bac1864559bb9b6e56502016
1 #ifndef EL__UTIL_COLOR_H
2 #define EL__UTIL_COLOR_H
4 typedef uint32_t color_T;
6 struct color_pair {
7 color_T background;
8 color_T foreground;
9 };
11 #define INIT_COLOR_PAIR(bg, fg) { bg, fg }
13 /** Decode the color string.
14 * The color string can either contain '@#FF0044' style declarations or
15 * color names. */
16 int decode_color(const unsigned char *str, int slen, color_T *color);
18 /** Returns a string containing the color info. If no 'English' name can be
19 * found the hex color (@#rrggbb) is returned in the given buffer. */
20 const unsigned char *get_color_string(color_T color, unsigned char hexcolor[8]);
22 /** Translate rgb color to string in @#rrggbb format.
23 * @a str should be a pointer to an 8 bytes memory space. */
24 void color_to_string(color_T color, unsigned char str[8]);
26 /** @name Fastfind lookup management.
27 * @{ */
28 void init_colors_lookup(void);
29 void free_colors_lookup(void);
30 /** @} */
32 #endif