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_cansextant(const struct notcurses* nc);
28
29 bool notcurses_canbraille(const struct notcurses* nc);
30
31 bool notcurses_canpixel(const struct notcurses* nc);
32
34 notcurses_supported_styles returns a bitmask representing those styles
35 for which the terminal advertises support.
36
37 notcurses_palette_size returns the size of the terminal's palette, used
38 for palette-indexed color. It will always return at least 1. This is
39 independent of RGB TrueColor support. No terminal is know to support
40 more than 256-indexed color.
41
42 notcurses_cantruecolor returns true if the terminal advertises support
43 for RGB TrueColor. Note that the RGB APIs of Notcurses can be used
44 even in the absence of terminal RGB support (Notcurses will map the RGB
45 values to the palette).
46
47 notcurses_canfade returns true if Notcurses has a means by which it can
48 effect fades.
49
50 notcurses_canchangecolor returns true if the terminal advertises sup‐
51 port for changing its palette entries.
52
53 notcurses_canopen_images returns true if Notcurses was built with mul‐
54 timedia support.
55
56 notcurses_canopen_video returns true if Notcurses was built with multi‐
57 media support capable of decoding videos.
58
59 notcurses_canutf8 returns true if the configured locale uses UTF-8 en‐
60 coding, and the locale was successfully loaded.
61
62 notcurses_cansextant returns true if the heuristics suggest that the
63 terminal can properly render Unicode 13 sextants.
64
65 notcurses_canpixel returns true if the terminal advertises support for
66 pixel graphics (e.g. Sixel). This function will not return true until
67 notcurses_check_pixel_support is called, and successfully returns.
68
69 notcurses_canbraille returns true if Braille is expected to work on the
70 terminal.
71
73 Some terminals advertise support for TrueColor, but then downsample or
74 otherwise degrade the provided RGB. In this case notcurses_cantruecol‐
75 or will return true, but the full spectrum will not be available.
76
79 notcurses(3), notcurses_init(3), notcurses_visual(3), utf8(7)
80
82 nick black <nickblack@linux.com>.
83
84
85
86 v2.2.3 notcurses_capabilities(3)