color.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /** \file color.h
  2. * \brief Header: color setup
  3. *
  4. * PLEASE FORGOT ABOUT tty/color.h!
  5. * Use skin engine for getting needed color pairs.
  6. *
  7. * edit/syntax.c may use this file directly, I'm agree. :)
  8. *
  9. */
  10. #ifndef MC__COLOR_H
  11. #define MC__COLOR_H
  12. #include "lib/global.h" /* glib.h */
  13. #ifdef HAVE_SLANG
  14. #include "color-slang.h"
  15. #else
  16. #include "tty-ncurses.h"
  17. #endif
  18. /*** typedefs(not structures) and defined constants **********************************************/
  19. #define ALLOC_COLOR_PAIR_INDEX 1
  20. /*** enums ***************************************************************************************/
  21. /*** structures declarations (and typedefs of structures)*****************************************/
  22. /*** global variables defined in .c file *********************************************************/
  23. /*** declarations of public functions ************************************************************/
  24. void tty_init_colors (gboolean disable, gboolean force);
  25. void tty_colors_done (void);
  26. gboolean tty_use_colors (void);
  27. int tty_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs);
  28. int tty_try_alloc_color_pair2 (const char *fg, const char *bg, const char *attrs,
  29. gboolean is_temp_color);
  30. void tty_color_free_all_tmp (void);
  31. void tty_color_free_all_non_tmp (void);
  32. void tty_setcolor (int color);
  33. void tty_lowlevel_setcolor (int color);
  34. void tty_set_normal_attrs (void);
  35. void tty_color_set_defaults (const char *fgcolor, const char *bgcolor, const char *attrs);
  36. extern gboolean tty_use_256colors (GError ** error);
  37. extern gboolean tty_use_truecolors (GError ** error);
  38. /*** inline functions ****************************************************************************/
  39. #endif /* MC__COLOR_H */