diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:22:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:22:03 +0000 |
commit | ffccd5b2b05243e7976db80f90f453dccfae9886 (patch) | |
tree | 39a43152d27f7390d8f7a6fb276fa6887f87c6e8 /lib/tty/color.h | |
parent | Initial commit. (diff) | |
download | mc-ffccd5b2b05243e7976db80f90f453dccfae9886.tar.xz mc-ffccd5b2b05243e7976db80f90f453dccfae9886.zip |
Adding upstream version 3:4.8.30.upstream/3%4.8.30
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/tty/color.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/tty/color.h b/lib/tty/color.h new file mode 100644 index 0000000..583cce3 --- /dev/null +++ b/lib/tty/color.h @@ -0,0 +1,54 @@ +/** \file color.h + * \brief Header: color setup + * + * PLEASE FORGOT ABOUT tty/color.h! + * Use skin engine for getting needed color pairs. + * + * edit/syntax.c may use this file directly, I'm agree. :) + * + */ + +#ifndef MC__COLOR_H +#define MC__COLOR_H + +#include "lib/global.h" /* glib.h */ + +#ifdef HAVE_SLANG +#include "color-slang.h" +#else +#include "tty-ncurses.h" +#endif + +/*** typedefs(not structures) and defined constants **********************************************/ + +/*** enums ***************************************************************************************/ + +/*** structures declarations (and typedefs of structures)*****************************************/ + +/*** global variables defined in .c file *********************************************************/ + +/*** declarations of public functions ************************************************************/ + +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); + +void tty_color_free_all_tmp (void); +void tty_color_free_all_non_tmp (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); + +extern gboolean tty_use_256colors (GError ** error); +extern gboolean tty_use_truecolors (GError ** error); + +/*** inline functions ****************************************************************************/ + +#endif /* MC__COLOR_H */ |