1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include <errno.h>
5 #include <stdbool.h>
6
7 #include "macro.h"
8
9 typedef enum SpecialGlyph {
10 SPECIAL_GLYPH_TREE_VERTICAL,
11 SPECIAL_GLYPH_TREE_BRANCH,
12 SPECIAL_GLYPH_TREE_RIGHT,
13 SPECIAL_GLYPH_TREE_SPACE,
14 SPECIAL_GLYPH_TREE_TOP,
15 SPECIAL_GLYPH_VERTICAL_DOTTED,
16 SPECIAL_GLYPH_TRIANGULAR_BULLET,
17 SPECIAL_GLYPH_BLACK_CIRCLE,
18 SPECIAL_GLYPH_WHITE_CIRCLE,
19 SPECIAL_GLYPH_MULTIPLICATION_SIGN,
20 SPECIAL_GLYPH_CIRCLE_ARROW,
21 SPECIAL_GLYPH_BULLET,
22 SPECIAL_GLYPH_MU,
23 SPECIAL_GLYPH_CHECK_MARK,
24 SPECIAL_GLYPH_CROSS_MARK,
25 SPECIAL_GLYPH_ARROW_RIGHT,
26 SPECIAL_GLYPH_ARROW_UP,
27 SPECIAL_GLYPH_ARROW_DOWN,
28 SPECIAL_GLYPH_ELLIPSIS,
29 SPECIAL_GLYPH_LIGHT_SHADE,
30 SPECIAL_GLYPH_DARK_SHADE,
31 SPECIAL_GLYPH_SIGMA,
32 SPECIAL_GLYPH_EXTERNAL_LINK,
33 _SPECIAL_GLYPH_FIRST_EMOJI,
34 SPECIAL_GLYPH_ECSTATIC_SMILEY = _SPECIAL_GLYPH_FIRST_EMOJI,
35 SPECIAL_GLYPH_HAPPY_SMILEY,
36 SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY,
37 SPECIAL_GLYPH_NEUTRAL_SMILEY,
38 SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY,
39 SPECIAL_GLYPH_UNHAPPY_SMILEY,
40 SPECIAL_GLYPH_DEPRESSED_SMILEY,
41 SPECIAL_GLYPH_LOCK_AND_KEY,
42 SPECIAL_GLYPH_TOUCH,
43 SPECIAL_GLYPH_RECYCLING,
44 SPECIAL_GLYPH_DOWNLOAD,
45 SPECIAL_GLYPH_SPARKLES,
46 _SPECIAL_GLYPH_MAX,
47 _SPECIAL_GLYPH_INVALID = -EINVAL,
48 } SpecialGlyph;
49
50 const char *special_glyph(SpecialGlyph code) _const_;
51
52 bool emoji_enabled(void);
53
special_glyph_check_mark(bool b)54 static inline const char *special_glyph_check_mark(bool b) {
55 return b ? special_glyph(SPECIAL_GLYPH_CHECK_MARK) : special_glyph(SPECIAL_GLYPH_CROSS_MARK);
56 }
57
special_glyph_check_mark_space(bool b)58 static inline const char *special_glyph_check_mark_space(bool b) {
59 return b ? special_glyph(SPECIAL_GLYPH_CHECK_MARK) : " ";
60 }
61