--- ray/src/px/x11raster.h 1991/11/12 16:04:31 2.1 +++ ray/src/px/x11raster.h 2004/03/28 20:33:14 2.4 @@ -1,13 +1,17 @@ -/* Copyright 1990 Regents of the University of California */ - -/* SCCSid "$SunId$ LBL" */ - +/* RCSid: $Id: x11raster.h,v 2.4 2004/03/28 20:33:14 schorsch Exp $ */ /* * x11raster.h - header file for X routines using images. * * 3/1/90 */ +#ifndef _RAD_X11RASTER_H_ +#define _RAD_X11RASTER_H_ +#ifdef __cplusplus +extern "C" { +#endif + + typedef struct { Display *disp; /* the display */ int screen; /* the screen */ @@ -22,13 +26,23 @@ typedef struct { Pixmap pm; /* storage on server side */ } XRASTER; -extern Colormap newcmap(); +extern Colormap newcmap(Display *disp, int scrn, Visual *vis); +extern int init_rcolors(XRASTER *xr, BYTE cmap[][3]); +extern unsigned long * map_rcolors(XRASTER *xr, Window w); +extern Pixmap make_rpixmap(XRASTER *xr, Window w); +extern XRASTER * make_raster( Display *disp, XVisualInfo *vis, + int npixbits, char *data, int width, int height, int bm_pad); +extern void patch_raster(Drawable d, int xsrc, int ysrc, + int xdst, int ydst, int width, int height, register XRASTER *xr); +extern void unmap_rcolors(XRASTER *xr); +extern void free_rpixmap(XRASTER *xr); +extern void free_raster(XRASTER *xr); -extern unsigned long *map_rcolors(); - -extern Pixmap make_rpixmap(); - -extern XRASTER *make_raster(); - #define put_raster(d,xdst,ydst,xr) patch_raster(d,0,0,xdst,ydst, \ (xr)->image->width,(xr)->image->height,xr) + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_X11RASTER_H_ */ +