bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: color_set


From: Thomas Dickey
Subject: Re: color_set
Date: Tue, 24 Feb 2009 17:02:43 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Feb 24, 2009 at 09:05:27AM -0800, Heracles wrote:
> 
> I would like someone to clarify the semantics of color_set.  The man pages

       int color_set(short color_pair_number, void* opts);

> say that color_set takes a color_pair_number argument which is apparently an
> index into a collection of color pairs, and a null pointer as the opts.

It's not a collection per se, but the "same" color table as
some applications use by OR'ing the color pair into a chtype.

However, color_set takes a short for the pair number, while
the field in chtype is (for ncurses) only 8 bits).

The type is a short (signed) since that corresponds to the
type used for numbers in compiled terminfo.
 
> To what window(s) do(es) the changes apply when using this method versus the
> wcolor_set method?

stdscr

(I see the manpage has a typo - it refers to the given window, which
would be for wcolor_set).
 
> How do you establish the collection to be indexed in the first place?

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]