4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
9 #include <ioncore/common.h>
13 bool de_alloc_colour(WRootWin *rootwin, DEColour *ret, const char *name)
21 if(XParseColor(ioncore_g.dpy, rootwin->default_cmap, name, &c)){
22 ok=XAllocColor(ioncore_g.dpy, rootwin->default_cmap, &c);
31 bool de_duplicate_colour(WRootWin *rootwin, DEColour in, DEColour *out)
35 XQueryColor(ioncore_g.dpy, rootwin->default_cmap, &c);
36 if(XAllocColor(ioncore_g.dpy, rootwin->default_cmap, &c)){
44 void de_free_colour_group(WRootWin *rootwin, DEColourGroup *cg)
54 XFreeColors(ioncore_g.dpy, rootwin->default_cmap, pixels, 5, 0);
56 gr_stylespec_unalloc(&cg->spec);
60 void de_free_colour(WRootWin *rootwin, DEColour col)
66 XFreeColors(ioncore_g.dpy, rootwin->default_cmap, pixels, 1, 0);