colors.h

00001 // colors.h  -*-c++-*-
00002 //
00003 //  Copyright 1999-2001, 2004-2005 Daniel Burrows
00004 //
00005 //  This program is free software; you can redistribute it and/or modify
00006 //  it under the terms of the GNU General Public License as published by
00007 //  the Free Software Foundation; either version 2 of the License, or
00008 //  (at your option) any later version.
00009 //
00010 //  This program is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //  GNU General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU General Public License
00016 //  along with this program; see the file COPYING.  If not, write to
00017 //  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018 //  Boston, MA 02111-1307, USA.
00019 //
00020 //  Manages color allocation so as to allow any combination of
00021 //  foreground/background colors to be used.  If there aren't enough
00022 //  color pairs available to handle all color combinations, this will
00023 //  act as though no colors are available.  NOTE: colors whose
00024 //  foreground and background are the same will be reduced to an
00025 //  arbitrary color of that background; it is expected that the caller
00026 //  will apply A_INVIS to such colors.  This is done to conserve color
00027 //  pairs so as to allow the use of the 'default' color.
00028 
00029 #ifndef COLORS_H
00030 #define COLORS_H
00031 
00032 namespace cwidget
00033 {
00034   namespace config
00035   {
00039     void init_colors();
00040 
00042     int get_color_pair(short fg, short bg);
00043 
00051     int mix_color(short color, short fg, short bg);
00052   }
00053 }
00054 
00055 #endif

Generated on Wed Jan 28 07:23:52 2009 for cwidget by  doxygen 1.5.6