Closed alanbrady closed 6 years ago
Recently I wanted to support both 256 and 16 color terminals and these variables would've been useful. One can use the return value of InitPair
and retry with less colors, but using these variables would make it simpler. Please consider merging this patch.
I'm not sure if this will ever get merged. It looks like this project started strong when GO was really new but looking at the commit history it seems goncurses quickly started dying off in 2014. There has been the occasional merge here and there but overall it doesn't seem like there's much hope. It sucks too because I just started playing around with GO and there doesn't seem to be any better options for Ncurses since those projects too have pretty much died off.
I just wish the maintainers would announce they have no interest in this and put some alternatives in the README file. So many projects just sit around on github with no clear indication of continuing or calling it quits. Suppose I should get around to putting up some announcements of my own since I have moved my projects elsewhere.
Here's to hoping this project comes back swinging!
This doesn't compile on my system. COLORS
and COLOR_PAIRS
aren't constants but global variables which are initialised when start_color
is called.
I've created #40 which exposes these variables in another way.
@silvernode If you are interested in maintaining goncurses, why not fork the project and merge these pull requests and continue improving it. One nice feature of free source is that you can always fork and continue the work if upstream goes silent.
Closing request as #40 by @rgburke is the correct way to handle this.
As defined in 'man 3 color_pair', the COLORS and COLOR_PAIRS global variables define the maximum number of colors and color pairs the terminal can support. This commit exports those variables to goncurses for use in determining the number of colors/color pairs the terminal supports.