1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#ifndef WMX11PIXMAP_H_INCLUDED
#define WMX11PIXMAP_H_INCLUDED
#include <X11/Xutil.h>
/* Defines */
#ifndef BOX_SIZE
#define BOX_SIZE 58
#endif
/* Function Prototypes */
XImage * initwmX11pixmap(int argc, char *argv[]);
void RedrawWindow(XImage * xim);
void RGBtoXIm(const unsigned char * from, XImage * ximout);
#define wmPutPixel(xim, x, y, r, g, b) {\
unsigned long pxl;\
\
pxl = ((r*xim->red_mask/255)&xim->red_mask) |\
((g*xim->green_mask/255)&xim->green_mask) |\
((b*xim->blue_mask/255)&xim->blue_mask);\
\
XPutPixel(xim, x, y, pxl);\
}
/* Global variables necessary for the event handlers */
Display *wmxp_display;
Window wmxp_iconwin, wmxp_win;
#endif
|