gntcolors.h
Go to the documentation of this file.
1 
5 /*
6  * GNT - The GLib Ncurses Toolkit
7  *
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.
11  *
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.
16  *
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.
21  *
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
25  */
26 
27 #ifndef GNT_COLORS_H
28 #define GNT_COLORS_H
29 
30 #include <glib.h>
31 
35 typedef enum
36 {
37  GNT_COLOR_NORMAL = 1,
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 */
43  GNT_COLOR_MNEMONIC,
44  GNT_COLOR_MNEMONIC_D,
45  GNT_COLOR_SHADOW,
46  GNT_COLOR_TITLE,
47  GNT_COLOR_TITLE_D,
48  GNT_COLOR_URGENT, /* this is for the 'urgent' windows */
49  GNT_COLORS
50 } GntColorType;
51 
52 enum
53 {
54  GNT_COLOR_BLACK = 0,
55  GNT_COLOR_RED,
56  GNT_COLOR_GREEN,
57  GNT_COLOR_BLUE,
58  GNT_COLOR_WHITE,
59  GNT_COLOR_GRAY,
60  GNT_COLOR_DARK_GRAY,
61  GNT_TOTAL_COLORS
62 };
63 
67 void gnt_init_colors(void);
68 
72 void gnt_uninit_colors(void);
73 
74 #if GLIB_CHECK_VERSION(2,6,0)
75 
80 void gnt_colors_parse(GKeyFile *kfile);
81 
87 void gnt_color_pairs_parse(GKeyFile *kfile);
88 
98 int gnt_colors_get_color(char *key);
99 #endif
100 
112 int gnt_color_pair(int color);
113 
124 int gnt_color_add_pair(int fg, int bg);
125 #endif
void gnt_uninit_colors(void)
Uninitialize the colors.
GntColorType
Different classes of colors.
Definition: gntcolors.h:35
int gnt_color_add_pair(int fg, int bg)
Adds a color definition.
void gnt_init_colors(void)
Initialize the colors.
int gnt_color_pair(int color)
Return the appropriate character attribute for a specified color.