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 /* HAVE_SLANG */
  18 
  19 /*** typedefs(not structures) and defined constants **********************************************/
  20 
  21 /*** enums ***************************************************************************************/
  22 
  23 /* *INDENT-OFF* */
  24 typedef enum {
  25     SPEC_A_REVERSE              = -100,
  26     SPEC_A_BOLD                 = -101,
  27     SPEC_A_BOLD_REVERSE         = -102,
  28     SPEC_A_UNDERLINE            = -103
  29 } tty_special_color_t;
  30 /* *INDENT-ON* */
  31 
  32 /*** structures declarations (and typedefs of structures)*****************************************/
  33 
  34 /* Screen library specific color pair */
  35 typedef struct
  36 {
  37     int fg;
  38     int bg;
  39     int attr;
  40     size_t pair_index;
  41     gboolean is_temp;
  42 } tty_color_lib_pair_t;
  43 
  44 /*** global variables defined in .c file *********************************************************/
  45 
  46 extern gboolean use_colors;
  47 extern gboolean mc_tty_color_disable;
  48 
  49 /*** declarations of public functions ************************************************************/
  50 
  51 const char *tty_color_get_name_by_index (int idx);
  52 int tty_color_get_index_by_name (const char *color_name);
  53 int tty_attr_get_bits (const char *attrs);
  54 
  55 void tty_color_init_lib (gboolean disable, gboolean force);
  56 void tty_color_deinit_lib (void);
  57 
  58 void tty_color_try_alloc_lib_pair (tty_color_lib_pair_t * mc_color_pair);
  59 
  60 /*** inline functions ****************************************************************************/
  61 
  62 #endif /* MC__COLOR_INTERNAL_H */

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