Unix Programming - ncurses background color

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2005 > ncurses background color





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ncurses background color
Average Joe

2005-01-28, 2:47 am

Users have different background colors in their xterm. How can my
ncurses program determine the background color so that I can set my
color_pairs to have the users default background?

--
Average Joe
Thomas Dickey

2005-01-28, 8:47 pm

Average Joe <joe@use.net> wrote:
> Users have different background colors in their xterm. How can my
> ncurses program determine the background color so that I can set my
> color_pairs to have the users default background?


You cannot determine it - but you can call use_default_colors() and
use the related extension for init_pair(), e.g., set the color to -1.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Average Joe

2005-01-29, 5:54 pm

Thomas Dickey wrote:
> Average Joe <joe@use.net> wrote:
>
>
>
> You cannot determine it - but you can call use_default_colors() and
> use the related extension for init_pair(), e.g., set the color to -1.


Thanks, that works great.

--
Average Joe
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com