]> git.decadent.org.uk Git - ion3.git/blob - de/colour.h
9864779392efa0641dcc69bd5dcfa94a2ef366c3
[ion3.git] / de / colour.h
1 /*
2  * ion/de/colour.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2008. 
5  *
6  * See the included file LICENSE for details.
7  */
8
9 #ifndef ION_DE_COLOUR_H
10 #define ION_DE_COLOUR_H
11
12 #include <ioncore/common.h>
13 #include <ioncore/global.h>
14 #include <ioncore/rootwin.h>
15
16
17 INTRSTRUCT(DEColourGroup);
18
19
20 typedef unsigned long DEColour;
21
22
23 DECLSTRUCT(DEColourGroup){
24     GrStyleSpec spec;
25     DEColour bg, hl, sh, fg, pad;
26 };
27
28
29 #define DE_BLACK(rootwin) BlackPixel(ioncore_g.dpy, rootwin->xscr)
30 #define DE_WHITE(rootwin) WhitePixel(ioncore_g.dpy, rootwin->xscr)
31
32 bool de_init_colour_group(WRootWin *rootwin, DEColourGroup *cg);
33 bool de_alloc_colour(WRootWin *rootwin, DEColour *ret, const char *name);
34 bool de_duplicate_colour(WRootWin *rootwin, DEColour in, DEColour *out);
35 void de_free_colour_group(WRootWin *rootwin, DEColourGroup *cg);
36 void de_free_colour(WRootWin *rootwin, DEColour col);
37
38 #endif /* ION_DE_COLOUR_H */