4 * Copyright (c) Tuomo Valkonen 1999-2007.
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.
12 #ifndef ION_DE_COLOUR_H
13 #define ION_DE_COLOUR_H
15 #include <ioncore/common.h>
16 #include <ioncore/global.h>
17 #include <ioncore/rootwin.h>
20 INTRSTRUCT(DEColourGroup);
23 typedef unsigned long DEColour;
26 DECLSTRUCT(DEColourGroup){
28 DEColour bg, hl, sh, fg, pad;
32 #define DE_BLACK(rootwin) BlackPixel(ioncore_g.dpy, rootwin->xscr)
33 #define DE_WHITE(rootwin) WhitePixel(ioncore_g.dpy, rootwin->xscr)
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);
41 #endif /* ION_DE_COLOUR_H */