ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/x11raster.h
Revision: 2.4
Committed: Sun Mar 28 20:33:14 2004 UTC (20 years ago) by schorsch
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9
Changes since 2.3: +12 -8 lines
Log Message:
Continued ANSIfication, and other fixes and clarifications.

File Contents

# Content
1 /* RCSid: $Id: x11raster.h,v 2.3 2003/07/14 22:24:00 schorsch Exp $ */
2 /*
3 * x11raster.h - header file for X routines using images.
4 *
5 * 3/1/90
6 */
7 #ifndef _RAD_X11RASTER_H_
8 #define _RAD_X11RASTER_H_
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14
15 typedef struct {
16 Display *disp; /* the display */
17 int screen; /* the screen */
18 Visual *visual; /* pointer to visual used */
19 XImage *image; /* the X image */
20 GC gc; /* private graphics context */
21 int ncolors; /* number of colors */
22 XColor *cdefs; /* color definitions */
23 short *pmap; /* inverse pixel mapping */
24 unsigned long *pixels; /* allocated table entries */
25 Colormap cmap; /* installed color map */
26 Pixmap pm; /* storage on server side */
27 } XRASTER;
28
29 extern Colormap newcmap(Display *disp, int scrn, Visual *vis);
30 extern int init_rcolors(XRASTER *xr, BYTE cmap[][3]);
31 extern unsigned long * map_rcolors(XRASTER *xr, Window w);
32 extern Pixmap make_rpixmap(XRASTER *xr, Window w);
33 extern XRASTER * make_raster( Display *disp, XVisualInfo *vis,
34 int npixbits, char *data, int width, int height, int bm_pad);
35 extern void patch_raster(Drawable d, int xsrc, int ysrc,
36 int xdst, int ydst, int width, int height, register XRASTER *xr);
37 extern void unmap_rcolors(XRASTER *xr);
38 extern void free_rpixmap(XRASTER *xr);
39 extern void free_raster(XRASTER *xr);
40
41 #define put_raster(d,xdst,ydst,xr) patch_raster(d,0,0,xdst,ydst, \
42 (xr)->image->width,(xr)->image->height,xr)
43
44 #ifdef __cplusplus
45 }
46 #endif
47 #endif /* _RAD_X11RASTER_H_ */
48