NeoMutt  2022-04-29-249-gaae397
Teaching an old dog new tricks
DOXYGEN
debug.h
Go to the documentation of this file.
1
23#ifndef MUTT_COLOR_DEBUG_H
24#define MUTT_COLOR_DEBUG_H
25
26#include "config.h"
27#include <stdbool.h>
28#include "mutt/lib.h"
29#include "color.h"
30
31struct AttrColor;
32struct AttrColorList;
33struct CursesColor;
34struct RegexColor;
35struct RegexColorList;
36
37const char *color_debug_log_color_attrs(int fg, int bg, int attrs);
38const char *color_debug_log_name(char *buf, int buflen, int color);
39const char *color_debug_log_attrs_list(int attrs);
40
41#ifdef USE_DEBUG_COLOR
42
43const char *color_debug_log_attrs(int attrs);
44const char *color_debug_log_color(int fg, int bg);
45void attr_color_dump (struct AttrColor *ac, const char *prefix);
46void attr_color_list_dump (struct AttrColorList *acl, const char *title);
47
48void curses_color_dump (struct CursesColor *cc, const char *prefix);
49void curses_colors_dump (void);
50
51void merged_colors_dump (void);
52
53void quoted_color_dump (struct AttrColor *ac, int q_level, const char *prefix);
54void quoted_color_list_dump(void);
55
56void regex_color_dump (struct RegexColor *rcol, const char *prefix);
57void regex_color_list_dump (const char *name, struct RegexColorList *rcl);
58void regex_colors_dump_all (void);
59
60void simple_color_dump (enum ColorId cid, const char *prefix);
61void simple_colors_dump (bool force);
62
63int color_debug(enum LogLevel level, const char *format, ...);
64
65#else
66
67static inline const char *color_debug_log_attrs(int attrs) { return ""; }
68static inline const char *color_debug_log_color(int fg, int bg) { return ""; }
69
70static inline void attr_color_dump (struct AttrColor *ac, const char *prefix) {}
71static inline void attr_color_list_dump (struct AttrColorList *acl, const char *title) {}
72
73static inline void curses_color_dump (struct CursesColor *cc, const char *prefix) {}
74static inline void curses_colors_dump (void) {}
75
76static inline void merged_colors_dump (void) {}
77
78static inline void quoted_color_dump (struct AttrColor *ac, int q_level, const char *prefix) {}
79static inline void quoted_color_list_dump(void) {}
80
81static inline void regex_color_dump (struct RegexColor *rcol, const char *prefix) {}
82static inline void regex_color_list_dump (const char *name, struct RegexColorList *rcl) {}
83static inline void regex_colors_dump_all (void) {}
84
85static inline void simple_color_dump (enum ColorId cid, const char *prefix) {}
86static inline void simple_colors_dump (bool force) {}
87
88static inline int color_debug(enum LogLevel level, const char *format, ...) { return 0; }
89
90#endif
91
92#endif /* MUTT_COLOR_DEBUG_H */
Color and attribute parsing.
ColorId
List of all colored objects.
Definition: color.h:35
static void curses_color_dump(struct CursesColor *cc, const char *prefix)
Definition: debug.h:73
static void regex_color_dump(struct RegexColor *rcol, const char *prefix)
Definition: debug.h:81
const char * color_debug_log_attrs_list(int attrs)
Get a string to represent some attributes in the log.
Definition: debug.c:150
const char * color_debug_log_name(char *buf, int buflen, int color)
Get a string to represent a colour name.
Definition: debug.c:181
static int color_debug(enum LogLevel level, const char *format,...)
Definition: debug.h:88
const char * color_debug_log_color_attrs(int fg, int bg, int attrs)
Get a colourful string to represent a colour in the log.
Definition: debug.c:67
static const char * color_debug_log_attrs(int attrs)
Definition: debug.h:67
static void curses_colors_dump(void)
Definition: debug.h:74
static void simple_colors_dump(bool force)
Definition: debug.h:86
static void merged_colors_dump(void)
Definition: debug.h:76
static void simple_color_dump(enum ColorId cid, const char *prefix)
Definition: debug.h:85
static void attr_color_list_dump(struct AttrColorList *acl, const char *title)
Definition: debug.h:71
static void regex_colors_dump_all(void)
Definition: debug.h:83
static const char * color_debug_log_color(int fg, int bg)
Definition: debug.h:68
static void attr_color_dump(struct AttrColor *ac, const char *prefix)
Definition: debug.h:70
static void regex_color_list_dump(const char *name, struct RegexColorList *rcl)
Definition: debug.h:82
static void quoted_color_list_dump(void)
Definition: debug.h:79
static void quoted_color_dump(struct AttrColor *ac, int q_level, const char *prefix)
Definition: debug.h:78
LogLevel
Names for the Logging Levels.
Definition: logging.h:35
Convenience wrapper for the library headers.
A curses colour and its attributes.
Definition: attr.h:35
Colour in the ncurses palette.
Definition: curses2.h:38
A regular expression and a color to highlight a line.
Definition: regex4.h:37