2020-08-16 05:22:53 +00:00
|
|
|
% notcurses_capabilities(3)
|
|
|
|
% nick black <nickblack@linux.com>
|
2021-07-20 18:07:47 +00:00
|
|
|
% v2.3.11
|
2020-08-16 05:22:53 +00:00
|
|
|
|
|
|
|
# NAME
|
|
|
|
|
|
|
|
notcurses_capabilities - runtime capability detection
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
**#include <notcurses/notcurses.h>**
|
|
|
|
|
2021-06-12 17:10:16 +00:00
|
|
|
**const char* notcurses_detected_terminal(const struct notcurses* ***nc***);**
|
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**unsigned notcurses_supported_styles(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**unsigned notcurses_palette_size(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**bool notcurses_cantruecolor(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**bool notcurses_canfade(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**bool notcurses_canchangecolor(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**bool notcurses_canopen_images(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**bool notcurses_canopen_videos(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-11-06 21:11:59 +00:00
|
|
|
**bool notcurses_canutf8(const struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2021-04-22 04:10:55 +00:00
|
|
|
**bool notcurses_canhalfblock(const struct notcurses* ***nc***);**
|
|
|
|
|
|
|
|
**bool notcurses_canquadrant(const struct notcurses* ***nc***);**
|
|
|
|
|
2020-12-25 22:37:27 +00:00
|
|
|
**bool notcurses_cansextant(const struct notcurses* ***nc***);**
|
|
|
|
|
2021-02-07 23:31:31 +00:00
|
|
|
**bool notcurses_canbraille(const struct notcurses* ***nc***);**
|
|
|
|
|
2021-03-25 23:15:17 +00:00
|
|
|
**int notcurses_check_pixel_support(struct notcurses* ***nc***);**
|
2020-08-16 05:22:53 +00:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
2021-06-12 17:10:16 +00:00
|
|
|
**notcurses_detected_terminal** returns a free-form string describing
|
|
|
|
the detected terminal. Terminal detection takes into account any
|
|
|
|
specified terminal database (see **notcurses_init(3)**), the **TERM**,
|
|
|
|
**TERM_PROGRAM**, and **TERM_PROGRAM_VERSION** environment variables,
|
|
|
|
the response to a **XTGETTCAP[TN]** Device Control String, the response
|
|
|
|
to Primary, Secondary, and Tertiary Send Device Attributes control
|
|
|
|
sequences, and the phase of the moon. You should not build logic around
|
|
|
|
this response; all relevant properties of the terminal ought be
|
|
|
|
abstracted by Notcurses. This is only made available for diagnostics.
|
|
|
|
|
2020-08-16 05:22:53 +00:00
|
|
|
**notcurses_supported_styles** returns a bitmask representing those styles
|
|
|
|
for which the terminal advertises support.
|
|
|
|
|
|
|
|
**notcurses_palette_size** returns the size of the terminal's palette, used
|
|
|
|
for palette-indexed color. It will always return at least 1. This is
|
|
|
|
independent of RGB TrueColor support. No terminal is know to support
|
|
|
|
more than 256-indexed color.
|
|
|
|
|
|
|
|
**notcurses_cantruecolor** returns **true** if the terminal advertises
|
|
|
|
support for RGB TrueColor. Note that the RGB APIs of Notcurses can be used
|
|
|
|
even in the absence of terminal RGB support (Notcurses will map the RGB
|
|
|
|
values to the palette).
|
|
|
|
|
|
|
|
**notcurses_canfade** returns **true** if Notcurses has a means by which
|
|
|
|
it can effect fades.
|
|
|
|
|
|
|
|
**notcurses_canchangecolor** returns **true** if the terminal advertises
|
|
|
|
support for changing its palette entries.
|
|
|
|
|
|
|
|
**notcurses_canopen_images** returns **true** if Notcurses was built with
|
|
|
|
multimedia support.
|
|
|
|
|
|
|
|
**notcurses_canopen_video** returns **true** if Notcurses was built with
|
|
|
|
multimedia support capable of decoding videos.
|
|
|
|
|
|
|
|
**notcurses_canutf8** returns **true** if the configured locale uses
|
2020-08-24 04:35:41 +00:00
|
|
|
UTF-8 encoding, and the locale was successfully loaded.
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2020-12-25 22:37:27 +00:00
|
|
|
**notcurses_cansextant** returns **true** if the heuristics suggest
|
2021-04-22 04:10:55 +00:00
|
|
|
that the terminal can properly render Unicode 13 sextants. Likewise,
|
|
|
|
**notcurses_canquadrant** and **notcurses_canhalfblock** return **true**
|
|
|
|
if the heuristics suggest that the terminal can properly render Unicode
|
|
|
|
quadrants and halfblocks, respectively. **notcurses_canbraille** returns
|
|
|
|
**true** if Unicode Braille is expected to work on the terminal. None of
|
|
|
|
these functions return **true** unless UTF-8 encoding is in use.
|
2020-08-16 05:22:53 +00:00
|
|
|
|
2021-03-25 23:15:17 +00:00
|
|
|
**notcurses_check_pixel_support** returns 1 if bitmap support (via any
|
2021-06-13 21:11:06 +00:00
|
|
|
mechanism) has been detected, and otherwise 0.
|
2021-03-25 23:15:17 +00:00
|
|
|
|
2020-08-16 05:22:53 +00:00
|
|
|
# NOTES
|
|
|
|
|
|
|
|
Some terminals advertise support for TrueColor, but then downsample or
|
|
|
|
otherwise degrade the provided RGB. In this case **notcurses_cantruecolor**
|
|
|
|
will return **true**, but the full spectrum will not be available.
|
|
|
|
|
|
|
|
# RETURN VALUES
|
|
|
|
|
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
**notcurses(3)**,
|
2021-02-25 07:03:01 +00:00
|
|
|
**notcurses_init(3)**,
|
2021-02-27 20:57:09 +00:00
|
|
|
**notcurses_visual(3)**,
|
2020-08-16 05:22:53 +00:00
|
|
|
utf8(7)
|