NeoMutt  2025-01-09-41-g086358
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)   (((cid) >= MT_COLOR_QUOTED0) && ((cid) <= MT_COLOR_QUOTED9))
 

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)    (((cid) >= MT_COLOR_QUOTED0) && ((cid) <= MT_COLOR_QUOTED9))

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 71 of file quoted.c.

72{
74}
void mutt_color_observer_add(observer_t callback, void *global_data)
Add an observer.
Definition: notify.c:61
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 79 of file quoted.c.

80{
82}
static int NumQuotedColors
Number of colours for quoted email text.
Definition: quoted.c:37
+ Here is the caller graph for this function:

◆ quoted_colors_cleanup()

void quoted_colors_cleanup ( void  )

Cleanup the quoted-email colours.

Definition at line 87 of file quoted.c.

88{
91}
void mutt_color_observer_remove(observer_t callback, void *global_data)
Remove an observer.
Definition: notify.c:71
void quoted_colors_reset(void)
Reset the quoted-email colours.
Definition: quoted.c:79
+ 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 98 of file quoted.c.

99{
100 if (NumQuotedColors == 0)
101 return NULL;
102
103 // If we have too few colours, cycle around
104 q %= NumQuotedColors;
105
107}
struct AttrColor * simple_color_get(enum ColorId cid)
Get the colour of an object by its ID.
Definition: simple.c:95
@ MT_COLOR_QUOTED0
Pager: quoted text, level 0.
Definition: color.h:59
+ 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 113 of file quoted.c.

114{
115 return NumQuotedColors;
116}
+ Here is the caller graph for this function: