1notcurses_capabilities(3) notcurses_capabilities(3)
2
3
4
6 notcurses_capabilities - runtime capability detection
7
9 #include <notcurses/notcurses.h>
10
11 unsigned notcurses_supported_styles(const struct notcurses* nc);
12
13 unsigned notcurses_palette_size(const struct notcurses* nc);
14
15 bool notcurses_cantruecolor(const struct notcurses* nc);
16
17 bool notcurses_canfade(const struct notcurses* nc);
18
19 bool notcurses_canchangecolor(const struct notcurses* nc);
20
21 bool notcurses_canopen_images(const struct notcurses* nc);
22
23 bool notcurses_canopen_videos(const struct notcurses* nc);
24
25 bool notcurses_canutf8(const struct notcurses* nc);
26
27 bool notcurses_canhalfblock(const struct notcurses* nc);
28
29 bool notcurses_canquadrant(const struct notcurses* nc);
30
31 bool notcurses_cansextant(const struct notcurses* nc);
32
33 bool notcurses_canbraille(const struct notcurses* nc);
34
35 int notcurses_check_pixel_support(struct notcurses* nc);
36
38 notcurses_supported_styles returns a bitmask representing those styles
39 for which the terminal advertises support.
40
41 notcurses_palette_size returns the size of the terminal's palette, used
42 for palette-indexed color. It will always return at least 1. This is
43 independent of RGB TrueColor support. No terminal is know to support
44 more than 256-indexed color.
45
46 notcurses_cantruecolor returns true if the terminal advertises support
47 for RGB TrueColor. Note that the RGB APIs of Notcurses can be used
48 even in the absence of terminal RGB support (Notcurses will map the RGB
49 values to the palette).
50
51 notcurses_canfade returns true if Notcurses has a means by which it can
52 effect fades.
53
54 notcurses_canchangecolor returns true if the terminal advertises sup‐
55 port for changing its palette entries.
56
57 notcurses_canopen_images returns true if Notcurses was built with mul‐
58 timedia support.
59
60 notcurses_canopen_video returns true if Notcurses was built with multi‐
61 media support capable of decoding videos.
62
63 notcurses_canutf8 returns true if the configured locale uses UTF-8 en‐
64 coding, and the locale was successfully loaded.
65
66 notcurses_cansextant returns true if the heuristics suggest that the
67 terminal can properly render Unicode 13 sextants. Likewise, notcurs‐
68 es_canquadrant and notcurses_canhalfblock return true if the heuristics
69 suggest that the terminal can properly render Unicode quadrants and
70 halfblocks, respectively. notcurses_canbraille returns true if Unicode
71 Braille is expected to work on the terminal. None of these functions
72 return true unless UTF-8 encoding is in use.
73
74 notcurses_check_pixel_support returns 1 if bitmap support (via any
75 mechanism) is detected; NCBLIT_PIXEL can be used after such a return.
76 It returns 0 a lack of bitmap support was confirmed, and -1 on error.
77
79 Some terminals advertise support for TrueColor, but then downsample or
80 otherwise degrade the provided RGB. In this case notcurses_cantruecol‐
81 or will return true, but the full spectrum will not be available.
82
85 notcurses(3), notcurses_init(3), notcurses_visual(3), utf8(7)
86
88 nick black <nickblack@linux.com>.
89
90
91
92 v2.3.1 notcurses_capabilities(3)