NeoMutt  2025-12-11-769-g906513
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
quoted.h File Reference

Quoted-Email colours. More...

#include "color.h"
+ Include dependency graph for quoted.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define COLOR_QUOTED(cid)
 

Functions

void quoted_colors_init (void)
 Initialise the Quoted colours.
 
void quoted_colors_reset (void)
 Reset the quoted-email colours.
 
void quoted_colors_cleanup (void)
 Cleanup the quoted-email colours.
 
struct AttrColorquoted_colors_get (int q)
 Return the color of a quote, cycling through the used quotes.
 
int quoted_colors_num_used (void)
 Return the number of used quotes.
 

Detailed Description

Quoted-Email colours.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file quoted.h.

Macro Definition Documentation

◆ COLOR_QUOTED

#define COLOR_QUOTED ( cid)
Value:
(((cid) >= MT_COLOR_QUOTED0) && ((cid) <= MT_COLOR_QUOTED9))
@ MT_COLOR_QUOTED0
Pager: quoted text, level 0.
Definition color.h:57
@ MT_COLOR_QUOTED9
Pager: quoted text, level 9.
Definition color.h:66

Definition at line 28 of file quoted.h.

Function Documentation

◆ quoted_colors_init()

void quoted_colors_init ( void )

Initialise the Quoted colours.

Definition at line 73 of file quoted.c.

74{
76}
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
Definition notify.c:62
static int quoted_color_observer(struct NotifyCallback *nc)
Notification that a Color has changed - Implements observer_t -.
Definition quoted.c:42
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quoted_colors_reset()

void quoted_colors_reset ( void )

Reset the quoted-email colours.

Definition at line 81 of file quoted.c.

82{
84 mod_data->num_quoted_colors = 0;
85}
@ MODULE_ID_COLOR
ModuleColor, Color
Definition module_api.h:53
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:665
Color private Module data.
Definition module_data.h:35
int num_quoted_colors
Number of colours for quoted email text.
Definition module_data.h:41
Container for Accounts, Notifications.
Definition neomutt.h:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quoted_colors_cleanup()

void quoted_colors_cleanup ( void )

Cleanup the quoted-email colours.

Definition at line 90 of file quoted.c.

91{
94}
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
Definition notify.c:73
void quoted_colors_reset(void)
Reset the quoted-email colours.
Definition quoted.c:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quoted_colors_get()

struct AttrColor * quoted_colors_get ( int q)

Return the color of a quote, cycling through the used quotes.

Parameters
qQuote level
Return values
enumColorId, e.g. MT_COLOR_QUOTED3

Definition at line 101 of file quoted.c.

102{
104 if (mod_data->num_quoted_colors == 0)
105 return NULL;
106
107 // If we have too few colours, cycle around
108 q %= mod_data->num_quoted_colors;
109
111}
struct AttrColor * simple_color_get(enum ColorId cid)
Get the colour of an object by its ID.
Definition simple.c:97
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quoted_colors_num_used()

int quoted_colors_num_used ( void )

Return the number of used quotes.

Return values
numNumber of used quotes

Definition at line 117 of file quoted.c.

118{
120 return mod_data->num_quoted_colors;
121}
+ Here is the call graph for this function:
+ Here is the caller graph for this function: