[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue using more than 255 color pairs
From: |
Thomas Dickey |
Subject: |
Re: Issue using more than 255 color pairs |
Date: |
Sun, 16 Jul 2023 13:20:19 -0400 |
On Sun, Jul 16, 2023 at 10:57:54AM -0400, Bill Gray wrote:
> On 7/16/23 04:35, Thomas Dickey wrote:
>
> > Rather than using the SVr4-compatible "attron", if you were using a terminal
> > description with more than 256 colors (such as xterm-direct), then the
> > X/Open
> > interfaces using cchar_t rather than chtype would help:
> >
> > int attr_get(attr_t *attrs, short *pair, void *opts);
> > int wattr_get(WINDOW *win, attr_t *attrs, short *pair, void *opts);
> > int attr_set(attr_t attrs, short pair, void *opts);
> > int wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);
>
> And it's documented. From :
>
> https://invisible-island.net/ncurses/man/curs_attr.3x.html
>
> "Color pair values can only be OR'd with attributes if the pair number is
> less than 256. The alternate functions such as color_set can pass a color
> pair value directly."
>
> Looking a few lines above that paragraph reminded me of some things I've
> occasionally wondered about but never got around to asking. From the same
> URL:
>
> "The XSI standard extended conformance level adds new highlights
> A_HORIZONTAL, A_LEFT, A_LOW, A_RIGHT, A_TOP, A_VERTICAL (and
> corresponding WA_ macros for each). As of August 2013, no known terminal
> provides these highlights."
>
> Does that mean "some terminal(s) once did provide these highlights, but
> they're all obsolete/missing as of August 2013"? Or "Somebody might someday
> provide them, but they haven't been yet"?
I could change the FAQ to say 2023 (no real difference). If there's a
chance that something might change, I mention the month/year when I
write the comment.
There aren't a lot of places to look, though: the AT&T terminal database
stopped changing ~1995, while ncurses is still changing.
I've got snapshots of several old-Unix terminal databases, and aside
from some vendor-specific stuff (more flavors of HP and IBM terminals in
their respective HPUX and AIX databases), they're much the same.
> Is there any difference intended between A_UNDERLINE and A_LOW?
I can only guess :-)
> Is A_HORIZONAL basically 'strikeout'? And what are A_VERTICAL and
> A_PROTECT supposed to be?
I can only guess :-)
In principle, someone could decide how they wanted to interpret it,
and write a terminal description using the capabilities (and then
create bug reports if ncurses doesn't handle it properly).
> I'd think the intended display characteristics might have been described
> it the XSI Curses standard, Issue 4, but I can't seem to find that on-line.
I link to it from the FAQ
https://invisible-island.net/ncurses/ncurses.faq.html#additional_reading
https://pubs.opengroup.org/onlinepubs/7908799/cursesix.html
but this doesn't give more insight:
https://pubs.opengroup.org/onlinepubs/7908799/xcurses/curses.h.html
(there are a few later revisions only available as PDFs)
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature
- Re: Issue using more than 255 color pairs, (continued)
- Re: Issue using more than 255 color pairs, David Unterwandling, 2023/07/15
- Re: Issue using more than 255 color pairs, Thomas Dickey, 2023/07/15
- Re: Issue using more than 255 color pairs, Thomas Dickey, 2023/07/16
- Re: Issue using more than 255 color pairs, David Unterwandling, 2023/07/16
- Re: Issue using more than 255 color pairs, Thomas Dickey, 2023/07/16
- Re: Issue using more than 255 color pairs, David Unterwandling, 2023/07/17
- Re: Issue using more than 255 color pairs, David Unterwandling, 2023/07/17
- Re: Issue using more than 255 color pairs, Bill Gray, 2023/07/16
- Re: Issue using more than 255 color pairs,
Thomas Dickey <=
- Re: Issue using more than 255 color pairs, Dennis Clarke, 2023/07/16
- Re: Issue using more than 255 color pairs, William McBrine, 2023/07/16
- Re: Issue using more than 255 color pairs, Bill Gray, 2023/07/16
- Re: Issue using more than 255 color pairs, Mike Gran, 2023/07/16
- Re: Issue using more than 255 color pairs, Bill Gray, 2023/07/17
- Re: Issue using more than 255 color pairs, Mike Gran, 2023/07/17
- Re: Issue using more than 255 color pairs, Bill Gray, 2023/07/19
Re: Issue using more than 255 color pairs, David Unterwandling, 2023/07/15
Re: Issue using more than 255 color pairs, David Unterwandling, 2023/07/28
Re: Issue using more than 255 color pairs, David Unterwandling, 2023/07/28