invert.c (374B)
1 static int invertcolors = 0; 2 3 void 4 invert(const Arg *dummy) 5 { 6 invertcolors = !invertcolors; 7 redraw(); 8 } 9 10 Color 11 invertedcolor(Color *clr) 12 { 13 XRenderColor rc; 14 Color inverted; 15 rc.red = ~clr->color.red; 16 rc.green = ~clr->color.green; 17 rc.blue = ~clr->color.blue; 18 rc.alpha = clr->color.alpha; 19 XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &rc, &inverted); 20 return inverted; 21 }