2009-02-05 21:28:18 +03:00
|
|
|
/** \file color.h
|
|
|
|
* \brief Header: color setup
|
2009-09-04 18:22:49 +04:00
|
|
|
*
|
|
|
|
* 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. :)
|
|
|
|
*
|
2009-02-05 21:28:18 +03:00
|
|
|
*/
|
|
|
|
|
2010-11-08 13:21:45 +03:00
|
|
|
#ifndef MC__COLOR_H
|
|
|
|
#define MC__COLOR_H
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2010-11-08 13:21:45 +03:00
|
|
|
#include "lib/global.h" /* glib.h */
|
2009-05-14 19:18:03 +04:00
|
|
|
|
2001-09-03 08:32:16 +04:00
|
|
|
#ifdef HAVE_SLANG
|
2010-11-08 13:21:45 +03:00
|
|
|
#include "color-slang.h"
|
1998-02-27 07:54:42 +03:00
|
|
|
#else
|
2010-11-08 13:21:45 +03:00
|
|
|
#include "tty-ncurses.h"
|
1998-02-27 07:54:42 +03:00
|
|
|
#endif
|
|
|
|
|
2010-11-08 13:21:45 +03:00
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
|
|
|
|
#define ALLOC_COLOR_PAIR_INDEX 1
|
|
|
|
|
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
|
2009-07-08 22:37:01 +04:00
|
|
|
void tty_init_colors (gboolean disable, gboolean force);
|
2009-05-14 19:18:03 +04:00
|
|
|
void tty_colors_done (void);
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2009-05-14 19:18:03 +04:00
|
|
|
gboolean tty_use_colors (void);
|
2021-05-16 13:56:44 +03:00
|
|
|
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);
|
2009-09-10 16:14:18 +04:00
|
|
|
|
2009-09-14 17:43:03 +04:00
|
|
|
void tty_color_free_all_tmp (void);
|
|
|
|
void tty_color_free_all_non_tmp (void);
|
2009-09-10 16:14:18 +04:00
|
|
|
|
2009-05-14 19:18:03 +04:00
|
|
|
void tty_setcolor (int color);
|
|
|
|
void tty_lowlevel_setcolor (int color);
|
2009-06-02 08:55:07 +04:00
|
|
|
void tty_set_normal_attrs (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2021-05-16 13:56:44 +03:00
|
|
|
void tty_color_set_defaults (const char *fgcolor, const char *bgcolor, const char *attrs);
|
2009-09-10 16:14:18 +04:00
|
|
|
|
2021-05-16 13:56:44 +03:00
|
|
|
extern gboolean tty_use_256colors (GError ** error);
|
|
|
|
extern gboolean tty_use_truecolors (GError ** error);
|
2011-01-11 17:10:27 +03:00
|
|
|
|
2010-11-08 13:21:45 +03:00
|
|
|
/*** inline functions ****************************************************************************/
|
2021-05-16 13:56:44 +03:00
|
|
|
|
|
|
|
#endif /* MC__COLOR_H */
|