NeoMutt  2024-03-23-147-g885fbc
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 "core/lib.h"
30#include "attr.h"
31#include "color.h"
32
33struct Buffer;
34
36#define COLOR_QUOTES_MAX 10
37
38extern struct AttrColor QuotedColors[];
39extern int NumQuotedColors;
40
67{
68 int quote_n;
70 char *prefix;
71 size_t prefix_len;
72 struct QuoteStyle *prev, *next;
73 struct QuoteStyle *up, *down;
74};
75
76void quoted_colors_init(void);
77void quoted_colors_cleanup(void);
78struct AttrColor * quoted_colors_get(int q);
80
81bool quoted_colors_parse_color (enum ColorId cid, struct AttrColor *ac_val, 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_recolor (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:40
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:176
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:293
struct AttrColor * quoted_colors_get(int q)
Return the color of a quote, cycling through the used quotes.
Definition: quoted.c:92
void qstyle_recolor(struct QuoteStyle *quote_list)
Recolour quotes after colour changes.
Definition: quoted.c:621
bool quoted_colors_parse_color(enum ColorId cid, struct AttrColor *ac_val, int q_level, int *rc, struct Buffer *err)
Parse the 'color quoted' command.
Definition: quoted.c:117
int quoted_colors_num_used(void)
Return the number of used quotes.
Definition: quoted.c:103
int NumQuotedColors
Number of colours for quoted email text.
Definition: quoted.c:44
void qstyle_free_tree(struct QuoteStyle **quote_list)
Free an entire tree of QuoteStyle.
Definition: quoted.c:215
void quoted_colors_init(void)
Initialise the Quoted colours.
Definition: quoted.c:49
void quoted_colors_cleanup(void)
Reset the quoted-email colours.
Definition: quoted.c:77
struct AttrColor QuotedColors[]
Array of colours for quoted email text.
Definition: quoted.c:43
A curses colour and its attributes.
Definition: attr.h:66
String manipulation buffer.
Definition: buffer.h:36
Style of quoted text.
Definition: quoted.h:67
struct AttrColor * attr_color
Colour and attribute of the text.
Definition: quoted.h:69
struct QuoteStyle * next
Different quoting styles at the same level.
Definition: quoted.h:72
struct QuoteStyle * up
Definition: quoted.h:73
size_t prefix_len
Length of the prefix string.
Definition: quoted.h:71
struct QuoteStyle * prev
Definition: quoted.h:72
char * prefix
Prefix string, e.g. "> ".
Definition: quoted.h:70
struct QuoteStyle * down
Parent (less quoted) and child (more quoted) levels.
Definition: quoted.h:73
int quote_n
The quoteN colour index for this level.
Definition: quoted.h:68