/usr/include/cwidget/config/colors.h is in libcwidget-dev 0.5.17-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | // colors.h -*-c++-*-
//
// Copyright 1999-2001, 2004-2005, 2008 Daniel Burrows
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; see the file COPYING. If not, write to
// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
// Manages color allocation so as to allow any combination of
// foreground/background colors to be used. If there aren't enough
// color pairs available to handle all color combinations, this will
// act as though no colors are available. NOTE: colors whose
// foreground and background are the same will be reduced to an
// arbitrary color of that background; it is expected that the caller
// will apply A_INVIS to such colors. This is done to conserve color
// pairs so as to allow the use of the 'default' color.
#ifndef COLORS_H
#define COLORS_H
/** \file colors.h
*
* \brief Routines to support independently changing foreground and
* background colors.
*
* cwidget can only support colors on terminals that allow at least
* 64 color pairs to be defined. However, on those terminals, it can
* mix foreground and background colors independently of one another.
* Normally colors are accessed through the style system (see
* style.h).
*/
namespace cwidget
{
/** \brief Routines that support parsing and interpreting user configuration.
*
* For instance, routines to handle keybindings are placed in this
* namespace.
*/
namespace config
{
/** Set up the colors as we expect them to be. Call this once
* when the program starts.
*
* This will normally be invoked during the library's
* initialization and does not need to be called by clients of
* the library.
*/
void init_colors();
/** \return a color pair for the given foreground and background. */
int get_color_pair(short fg, short bg);
/** \param color attributes containing the starting color value
* \param fg the new foreground (-1 to use color)
* \param bg the new background (-2 to use color; -1 to use the default background)
*
* \return a color pair created by mixing the given foreground
* and background into color.
*/
int mix_color(short color, short fg, short bg);
}
}
#endif
|