File: wmx11pixmap.h

package info (click to toggle)
wmbubble 1.53-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 272 kB
  • ctags: 224
  • sloc: ansic: 2,139; makefile: 72; sh: 1
file content (32 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (2)
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