NeoMutt  2021-10-29-220-g2b1eec
Teaching an old dog new tricks
DOXYGEN
quoted.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_COLOR_QUOTED_H
24 #define MUTT_COLOR_QUOTED_H
25 
26 #include "config.h"
27 #include <stdbool.h>
28 #include <stdint.h>
29 #include "core/lib.h"
30 #include "color.h"
31 
32 struct Buffer;
33 
35 #define COLOR_QUOTES_MAX 10
36 
37 extern int QuotedColors[];
38 extern int NumQuotedColors;
39 
65 struct QuoteStyle
66 {
67  int quote_n;
68  int color;
69  char *prefix;
70  size_t prefix_len;
71  struct QuoteStyle *prev, *next;
72  struct QuoteStyle *up, *down;
73 };
74 
75 void quoted_colors_clear(void);
76 int quoted_colors_get(int q);
77 void quoted_colors_init(void);
78 int quoted_colors_num_used(void);
79 
80 bool quoted_colors_parse_color (enum ColorId cid, uint32_t fg, uint32_t bg, int attrs, int q_level, int *rc, struct Buffer *err);
81 
82 struct QuoteStyle *qstyle_classify (struct QuoteStyle **quote_list, const char *qptr, size_t length, bool *force_redraw, int *q_level);
83 void qstyle_free_tree(struct QuoteStyle **quote_list);
84 
85 #endif /* MUTT_COLOR_QUOTED_H */
Color and attribute parsing.
ColorId
List of all colored objects.
Definition: color.h:35
Convenience wrapper for the core headers.
struct QuoteStyle * qstyle_classify(struct QuoteStyle **quote_list, const char *qptr, size_t length, bool *force_redraw, int *q_level)
Find a style for a string.
Definition: quoted.c:223
int quoted_colors_num_used(void)
Return the number of used quotes.
Definition: quoted.c:76
int NumQuotedColors
Number of colours for quoted email text.
Definition: quoted.c:39
int QuotedColors[]
Array of colours for quoted email text.
Definition: quoted.c:38
void qstyle_free_tree(struct QuoteStyle **quote_list)
Free an entire tree of QuoteStyle.
Definition: quoted.c:149
void quoted_colors_init(void)
Initialise the quoted-email colours.
Definition: quoted.c:53
int quoted_colors_get(int q)
Return the color of a quote, cycling through the used quotes.
Definition: quoted.c:64
void quoted_colors_clear(void)
Reset the quoted-email colours.
Definition: quoted.c:44
bool quoted_colors_parse_color(enum ColorId cid, uint32_t fg, uint32_t bg, int attrs, int q_level, int *rc, struct Buffer *err)
Parse the 'color quoted' command.
Definition: quoted.c:92
String manipulation buffer.
Definition: buffer.h:34
Style of quoted text.
Definition: quoted.h:66
struct QuoteStyle * next
Different quoting styles at the same level.
Definition: quoted.h:71
struct QuoteStyle * up
Definition: quoted.h:72
size_t prefix_len
Length of the prefix string.
Definition: quoted.h:70
struct QuoteStyle * prev
Definition: quoted.h:71
char * prefix
Prefix string, e.g. "> ".
Definition: quoted.h:69
int color
Curses colour pair.
Definition: quoted.h:68
struct QuoteStyle * down
Parent (less quoted) and child (more quoted) levels.
Definition: quoted.h:72
int quote_n
The quoteN colour index for this level.
Definition: quoted.h:67