cwidget
0.5.17
src
cwidget
config
colors.h
Go to the documentation of this file.
1
// colors.h -*-c++-*-
2
//
3
// Copyright 1999-2001, 2004-2005, 2008 Daniel Burrows
4
//
5
// This program is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation; either version 2 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; see the file COPYING. If not, write to
17
// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
// Boston, MA 02111-1307, USA.
19
//
20
// Manages color allocation so as to allow any combination of
21
// foreground/background colors to be used. If there aren't enough
22
// color pairs available to handle all color combinations, this will
23
// act as though no colors are available. NOTE: colors whose
24
// foreground and background are the same will be reduced to an
25
// arbitrary color of that background; it is expected that the caller
26
// will apply A_INVIS to such colors. This is done to conserve color
27
// pairs so as to allow the use of the 'default' color.
28
29
#ifndef COLORS_H
30
#define COLORS_H
31
44
namespace
cwidget
45
{
51
namespace
config
52
{
60
void
init_colors
();
61
63
int
get_color_pair
(
short
fg,
short
bg);
64
72
int
mix_color
(
short
color,
short
fg,
short
bg);
73
}
74
}
75
76
#endif
cwidget
The namespace containing everything defined by cwidget.
Definition:
columnify.cc:26
cwidget::config::get_color_pair
int get_color_pair(short fg, short bg)
Definition:
colors.cc:69
cwidget::config::mix_color
int mix_color(short color, short fg, short bg)
Definition:
colors.cc:101
cwidget::config::init_colors
void init_colors()
Set up the colors as we expect them to be.
Definition:
colors.cc:36
Generated by
1.8.13