[Top][All Lists]

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

Re: [NCURSES/CDK] how to get the default background color?

From: Bryan Christ
Subject: Re: [NCURSES/CDK] how to get the default background color?
Date: Thu, 21 May 2009 10:02:12 -0500

chtype getbkgd(WINDOW *win)

this function will fetch the attributes of a given window as set by

you can then mask out what you want to know about the default attributes
of the window

A_CHARTEXT     Bit-mask to extract character
A_ATTRIBUTES   Bit-mask to extract attributes
A_COLOR        Bit-mask to extract color-pair field information

and then use the PAIR_NUMBER macro to match it to a color pair.

PAIR_NUMBER(attrs) Returns the pair number associated
                   with the COLOR_PAIR(n) attribute.

On Thu, 2009-05-21 at 10:48 +0000, bugzilla wrote:
> hi,
> i need to get the default background color of the current terminal.
> i use "use_default_colors" routine and i want to set the foreground
> color of text with color_pair but i don't know the value of the background
> color. :/

reply via email to

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