Adding invert patch
This commit is contained in:
parent
4966f31256
commit
d26b46ffa7
8 changed files with 62 additions and 0 deletions
21
patch/invert.c
Normal file
21
patch/invert.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
static int invertcolors = 0;
|
||||
|
||||
void
|
||||
invert(const Arg *dummy)
|
||||
{
|
||||
invertcolors = !invertcolors;
|
||||
redraw();
|
||||
}
|
||||
|
||||
Color
|
||||
invertedcolor(Color *clr)
|
||||
{
|
||||
XRenderColor rc;
|
||||
Color inverted;
|
||||
rc.red = ~clr->color.red;
|
||||
rc.green = ~clr->color.green;
|
||||
rc.blue = ~clr->color.blue;
|
||||
rc.alpha = clr->color.alpha;
|
||||
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &rc, &inverted);
|
||||
return inverted;
|
||||
}
|
||||
1
patch/invert.h
Normal file
1
patch/invert.h
Normal file
|
|
@ -0,0 +1 @@
|
|||
static void invert(const Arg *);
|
||||
|
|
@ -11,6 +11,9 @@
|
|||
#if FONT2_PATCH
|
||||
#include "font2.c"
|
||||
#endif
|
||||
#if INVERT_PATCH
|
||||
#include "invert.c"
|
||||
#endif
|
||||
#if KEYBOARDSELECT_PATCH
|
||||
#include "keyboardselect_x.c"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
#if FONT2_PATCH
|
||||
#include "font2.h"
|
||||
#endif
|
||||
#if INVERT_PATCH
|
||||
#include "invert.h"
|
||||
#endif
|
||||
#if KEYBOARDSELECT_PATCH
|
||||
#include "keyboardselect_x.h"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue