1 #ifndef _IPXE_ANSICOL_H
2 #define _IPXE_ANSICOL_H
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13 #include <curses.h> /* For COLOR_RED etc. */
15 /** Default colour (usually white foreground, black background) */
16 #define COLOUR_DEFAULT 9
17 #define COLOR_DEFAULT COLOUR_DEFAULT
21 * The magic basic colour is automatically remapped to the colour
22 * stored in @c ansicol_magic. This is used to allow the UI
23 * background to automatically become transparent when a background
26 #define ANSICOL_MAGIC 15
28 /** RGB value for "not defined" */
29 #define ANSICOL_NO_RGB 0x01000000
32 * @defgroup ansicolpairs ANSI colour pairs
36 /** Default colour pair */
37 #define CPAIR_DEFAULT 0
40 #define CPAIR_NORMAL 1
42 /** Highlighted text */
43 #define CPAIR_SELECT 2
45 /** Unselectable text (e.g. continuation ellipses, menu separators) */
46 #define CPAIR_SEPARATOR 3
57 /** PXE selected menu entry */
62 /** An ANSI colour pair definition */
64 /** Foreground colour index */
66 /** Background colour index */
68 } __attribute__ (( packed ));
71 extern void ansicol_set_pair ( unsigned int cpair );
72 extern int ansicol_define_pair ( unsigned int cpair, unsigned int foreground,
73 unsigned int background );
76 extern int ansicol_define ( unsigned int colour, unsigned int ansi,
78 extern void ansicol_reset_magic ( void );
79 extern void ansicol_set_magic_transparent ( void );
81 /* Function provided by ansicol.c but overridden by ansicoldef.c, if present */
82 extern void ansicol_set ( unsigned int colour, unsigned int which );
84 #endif /* _IPXE_ANSICOL_H */