libsir 2.2.5
Standard Incident Reporter
Loading...
Searching...
No Matches
textstyle.h
1/*
2 * textstyle.h
3 *
4 * Version: 2.2.5
5 *
6 * -----------------------------------------------------------------------------
7 *
8 * SPDX-License-Identifier: MIT
9 *
10 * Copyright (c) 2018-2024 Ryan M. Lederman <lederman@gmail.com>
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a copy of
13 * this software and associated documentation files (the "Software"), to deal in
14 * the Software without restriction, including without limitation the rights to
15 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
16 * the Software, and to permit persons to whom the Software is furnished to do so,
17 * subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included in all
20 * copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
24 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
25 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
26 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 *
29 * -----------------------------------------------------------------------------
30 */
31
32#ifndef _SIR_TEXTSTYLE_H_INCLUDED
33# define _SIR_TEXTSTYLE_H_INCLUDED
34
35# include "sir/types.h"
36
37extern sir_text_style_data sir_text_style_section;
38
40const char* _sir_gettextstyle(sir_level level);
41
43bool _sir_settextstyle(sir_level level, const sir_textstyle* style);
44
46const sir_textstyle* _sir_getdefstyle(sir_level level);
47
49bool _sir_resettextstyles(void);
50
52bool _sir_formatstyle(sir_colormode mode, const sir_textstyle* style,
53 char buf[SIR_MAXSTYLE]);
54
56bool _sir_validtextstyle(sir_colormode mode, const sir_textstyle* style);
57
59bool _sir_setcolormode(sir_colormode mode);
60
61#endif /* !_SIR_TEXTSTYLE_H_INCLUDED */
#define SIR_MAXSTYLE
The size, in characters, of the buffer used to hold a sequence of styling data in any color mode (the...
Definition config.h:397
uint16_t sir_level
The sir_level type.
Definition types.h:71
sir_colormode
Color mode selection.
Definition types.h:99
Container for all the information associated with the appearance of text in the context of stdio.
Definition types.h:169
Container for text style related data that is mutex protected.
Definition types.h:434