]> git.decadent.org.uk Git - ion3.git/blob - de/colour.h
06d865407e8fcb38611d8927502a517c96cca4c8
[ion3.git] / de / colour.h
1 /*
2  * ion/de/colour.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #ifndef ION_DE_COLOUR_H
13 #define ION_DE_COLOUR_H
14
15 #include <ioncore/common.h>
16 #include <ioncore/global.h>
17 #include <ioncore/rootwin.h>
18
19
20 INTRSTRUCT(DEColourGroup);
21
22
23 typedef unsigned long DEColour;
24
25
26 DECLSTRUCT(DEColourGroup){
27     GrStyleSpec spec;
28     DEColour bg, hl, sh, fg, pad;
29 };
30
31
32 #define DE_BLACK(rootwin) BlackPixel(ioncore_g.dpy, rootwin->xscr)
33 #define DE_WHITE(rootwin) WhitePixel(ioncore_g.dpy, rootwin->xscr)
34
35 bool de_init_colour_group(WRootWin *rootwin, DEColourGroup *cg);
36 bool de_alloc_colour(WRootWin *rootwin, DEColour *ret, const char *name);
37 bool de_duplicate_colour(WRootWin *rootwin, DEColour in, DEColour *out);
38 void de_free_colour_group(WRootWin *rootwin, DEColourGroup *cg);
39 void de_free_colour(WRootWin *rootwin, DEColour col);
40
41 #endif /* ION_DE_COLOUR_H */