Manual pages: mcmcdiffmceditmcview

root/lib/tty/color-internal.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 
   2 /** \file color-internal.h
   3  *  \brief Header: Internal stuff of color setup
   4  */
   5 
   6 #ifndef MC__COLOR_INTERNAL_H
   7 #define MC__COLOR_INTERNAL_H
   8 
   9 #include <sys/types.h>  // size_t
  10 
  11 #include "lib/global.h"
  12 
  13 #ifdef HAVE_SLANG
  14 #include "tty-slang.h"
  15 #else
  16 #include "tty-ncurses.h"
  17 #endif
  18 
  19 /*** typedefs(not structures) and defined constants **********************************************/
  20 
  21 #define FLAG_TRUECOLOR   (1 << 24)
  22 #define COLORS_TRUECOLOR (1 << 24)
  23 
  24 /*** enums ***************************************************************************************/
  25 
  26 /*** structures declarations (and typedefs of structures)*****************************************/
  27 
  28 /* Screen library specific color pair */
  29 typedef struct
  30 {
  31     int fg;
  32     int bg;
  33     int attr;
  34     size_t pair_index;
  35     gboolean is_temp;
  36 } tty_color_lib_pair_t;
  37 
  38 /*** global variables defined in .c file *********************************************************/
  39 
  40 extern gboolean use_colors;
  41 extern gboolean mc_tty_color_disable;
  42 extern gboolean need_convert_256color;
  43 
  44 /*** declarations of public functions ************************************************************/
  45 
  46 const char *tty_color_get_name_by_index (int idx);
  47 int tty_color_get_index_by_name (const char *color_name);
  48 int tty_attr_get_bits (const char *attrs);
  49 int convert_256color_to_truecolor (int color);
  50 
  51 void tty_color_init_lib (gboolean disable, gboolean force);
  52 void tty_color_deinit_lib (void);
  53 
  54 void tty_color_try_alloc_lib_pair (tty_color_lib_pair_t *mc_color_pair);
  55 
  56 /*** inline functions ****************************************************************************/
  57 
  58 #endif

/* [previous][next][first][last][top][bottom][index][help]  */