diff options
Diffstat (limited to 'lib/tty/color.h')
-rw-r--r-- | lib/tty/color.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/tty/color.h b/lib/tty/color.h index 583cce3..e09516f 100644 --- a/lib/tty/color.h +++ b/lib/tty/color.h @@ -21,6 +21,14 @@ /*** typedefs(not structures) and defined constants **********************************************/ +typedef struct +{ + char *fg; + char *bg; + char *attrs; + size_t pair_index; +} tty_color_pair_t; + /*** enums ***************************************************************************************/ /*** structures declarations (and typedefs of structures)*****************************************/ @@ -33,18 +41,16 @@ void tty_init_colors (gboolean disable, gboolean force); void tty_colors_done (void); gboolean tty_use_colors (void); -int tty_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs); -int tty_try_alloc_color_pair2 (const char *fg, const char *bg, const char *attrs, - gboolean is_temp_color); +int tty_try_alloc_color_pair (const tty_color_pair_t * color, gboolean is_temp); -void tty_color_free_all_tmp (void); -void tty_color_free_all_non_tmp (void); +void tty_color_free_temp (void); +void tty_color_free_all (void); void tty_setcolor (int color); void tty_lowlevel_setcolor (int color); void tty_set_normal_attrs (void); -void tty_color_set_defaults (const char *fgcolor, const char *bgcolor, const char *attrs); +void tty_color_set_defaults (const tty_color_pair_t * color); extern gboolean tty_use_256colors (GError ** error); extern gboolean tty_use_truecolors (GError ** error); |