NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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 <stddef.h>
28#include <stdbool.h>
29#include <stdint.h>
30#include "core/lib.h"
31#include "attr.h"
32#include "color.h"
33
34struct Buffer;
35
37#define COLOR_QUOTES_MAX 10
38
39extern struct AttrColor QuotedColors[];
40extern int NumQuotedColors;
41
68{
69 int quote_n;
71 char *prefix;
72 size_t prefix_len;
73 struct QuoteStyle *prev, *next;
74 struct QuoteStyle *up, *down;
75};
76
77void quoted_colors_cleanup(void);
78struct AttrColor * quoted_colors_get(int q);
80
81bool quoted_colors_parse_color (enum ColorId cid, uint32_t fg, uint32_t bg, int attrs, int q_level, int *rc, struct Buffer *err);
82enum CommandResult quoted_colors_parse_uncolor(enum ColorId cid, int q_level, struct Buffer *err);
83
84struct QuoteStyle *qstyle_classify (struct QuoteStyle **quote_list, const char *qptr, size_t length, bool *force_redraw, int *q_level);
85void qstyle_free_tree(struct QuoteStyle **quote_list);
86void qstyle_recolour (struct QuoteStyle *quote_list);
87
88#endif /* MUTT_COLOR_QUOTED_H */
Colour and attributes.
Color and attribute parsing.
ColorId
List of all colored objects.
Definition: color.h:38
CommandResult
Error codes for command_t parse functions.
Definition: command.h:36
Convenience wrapper for the core headers.
enum CommandResult quoted_colors_parse_uncolor(enum ColorId cid, int q_level, struct Buffer *err)
Parse the 'uncolor quoted' command.
Definition: quoted.c:170
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:291
struct AttrColor * quoted_colors_get(int q)
Return the color of a quote, cycling through the used quotes.
Definition: quoted.c:79
int quoted_colors_num_used(void)
Return the number of used quotes.
Definition: quoted.c:90
int NumQuotedColors
Number of colours for quoted email text.
Definition: quoted.c:45
void qstyle_free_tree(struct QuoteStyle **quote_list)
Free an entire tree of QuoteStyle.
Definition: quoted.c:213
void qstyle_recolour(struct QuoteStyle *quote_list)
Recolour quotes after colour changes.
Definition: quoted.c:619
void quoted_colors_cleanup(void)
Reset the quoted-email colours.
Definition: quoted.c:64
struct AttrColor QuotedColors[]
Array of colours for quoted email text.
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:106
A curses colour and its attributes.
Definition: attr.h:35
int attrs
Text attributes, e.g. A_BOLD.
Definition: attr.h:37
String manipulation buffer.
Definition: buffer.h:34
Style of quoted text.
Definition: quoted.h:68
struct AttrColor * attr_color
Colour and attribute of the text.
Definition: quoted.h:70
struct QuoteStyle * next
Different quoting styles at the same level.
Definition: quoted.h:73
struct QuoteStyle * up
Definition: quoted.h:74
size_t prefix_len
Length of the prefix string.
Definition: quoted.h:72
struct QuoteStyle * prev
Definition: quoted.h:73
char * prefix
Prefix string, e.g. "> ".
Definition: quoted.h:71
struct QuoteStyle * down
Parent (less quoted) and child (more quoted) levels.
Definition: quoted.h:74
int quote_n
The quoteN colour index for this level.
Definition: quoted.h:69