mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
2d6d8a477e
* (tty_try_alloc_color_pair): remove. * (tty_try_alloc_color_pair2): rename to tty_try_alloc_color_pair, change arguments. * (tty_color_set_defaults): changes arguments. * (this_try_alloc_color_pair): likewise. * lib/skin/color.c: related changes. * src/editor/syntax.c: likewise. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
61 lines
1.6 KiB
C
61 lines
1.6 KiB
C
/** \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 **********************************************/
|
|
|
|
typedef struct
|
|
{
|
|
char *fg;
|
|
char *bg;
|
|
char *attrs;
|
|
size_t pair_index;
|
|
} tty_color_pair_t;
|
|
|
|
/*** 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 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_setcolor (int color);
|
|
void tty_lowlevel_setcolor (int color);
|
|
void tty_set_normal_attrs (void);
|
|
|
|
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);
|
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
#endif /* MC__COLOR_H */
|