Quoted style. More...
#include "config.h"
#include <stdbool.h>
#include "mutt/lib.h"
#include "qstyle.h"
#include "quoted.h"
Go to the source code of this file.
Functions | |
static void | qstyle_free (struct QuoteStyle **ptr) |
Free a single QuoteStyle object. | |
void | qstyle_free_tree (struct QuoteStyle **quote_list) |
Free an entire tree of QuoteStyle. | |
static struct QuoteStyle * | qstyle_new (void) |
Create a new QuoteStyle. | |
static void | qstyle_insert (struct QuoteStyle *quote_list, struct QuoteStyle *new_class, int index, int *q_level) |
Insert a new quote colour class into a list. | |
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. | |
static void | qstyle_recurse (struct QuoteStyle *quote_list, int num_qlevel, int *cur_qlevel) |
Update the quoting styles after colour changes. | |
void | qstyle_recolor (struct QuoteStyle *quote_list) |
Recolour quotes after colour changes. | |
Quoted style.
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 qstyle.c.
|
static |
Free a single QuoteStyle object.
ptr | QuoteStyle to free |
Definition at line 41 of file qstyle.c.
void qstyle_free_tree | ( | struct QuoteStyle ** | quote_list | ) |
Free an entire tree of QuoteStyle.
[out] | quote_list | Quote list to free |
Definition at line 58 of file qstyle.c.
|
static |
Create a new QuoteStyle.
ptr | New QuoteStyle |
Definition at line 76 of file qstyle.c.
|
static |
Insert a new quote colour class into a list.
[in] | quote_list | List of quote colours |
[in] | new_class | New quote colour to inset |
[in] | index | Index to insert at |
[in,out] | q_level | Quote level |
Definition at line 88 of file qstyle.c.
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.
[out] | quote_list | List of quote colours |
[in] | qptr | String to classify |
[in] | length | Length of string |
[out] | force_redraw | Set to true if a screen redraw is needed |
[out] | q_level | Quoting level |
ptr | Quoting style |
Definition at line 136 of file qstyle.c.
|
static |
Update the quoting styles after colour changes.
quote_list | Styles to update |
num_qlevel | Number of quote levels |
cur_qlevel | Current quote level |
Definition at line 441 of file qstyle.c.
void qstyle_recolor | ( | struct QuoteStyle * | quote_list | ) |
Recolour quotes after colour changes.
quote_list | List of quote colours |
Definition at line 464 of file qstyle.c.