2 * @file gntcolors.h Colors API
6 * GNT - The GLib Ncurses Toolkit
8 * GNT is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This library is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
33 * Different classes of colors.
38 GNT_COLOR_HIGHLIGHT
, /* eg. when a button is selected */
39 GNT_COLOR_DISABLED
, /* eg. when a button is disabled */
40 GNT_COLOR_HIGHLIGHT_D
, /* eg. when a button is selected, but some other window is in focus */
41 GNT_COLOR_TEXT_NORMAL
,
42 GNT_COLOR_TEXT_INACTIVE
, /* when the entry is out of focus */
48 GNT_COLOR_URGENT
, /* this is for the 'urgent' windows */
65 * Initialize the colors.
67 void gnt_init_colors(void);
70 * Uninitialize the colors.
72 void gnt_uninit_colors(void);
74 #if GLIB_CHECK_VERSION(2,6,0)
76 * Parse color information from a file.
78 * @param kfile The file containing color information.
80 void gnt_colors_parse(GKeyFile
*kfile
);
83 * Parse color-pair information from a file.
85 * @param kfile The file containing the color-pair information.
87 void gnt_color_pairs_parse(GKeyFile
*kfile
);
92 * Return the appropriate character attribute for a specified color.
93 * If the terminal doesn't have color support, this returns A_STANDOUT
94 * when deemed appropriate.
96 * @param color The color code.
98 * @return A character attribute.
102 int gnt_color_pair(int color
);