Annotation of researchv9/X11/src/X.V11R1/lib/X/XAllPlanes.c, revision 1.1.1.1

1.1       root        1: #include "copyright.h"
                      2: 
                      3: /* $Header: XAllPlanes.c,v 11.13 87/09/11 08:00:55 toddb Exp $ */
                      4: /* Copyright    Massachusetts Institute of Technology    1986  */
                      5: #define NEED_REPLIES
                      6: #include "Xlibint.h"
                      7: 
                      8: Status XAllocColorPlanes(dpy, cmap, contig, pixels, ncolors, nreds, ngreens, 
                      9:                          nblues, rmask, gmask, bmask)
                     10: register Display *dpy;
                     11: Colormap cmap;
                     12: Bool contig;
                     13: unsigned long pixels[]; /* LISTofCARD32 */ /* RETURN */
                     14: int ncolors;
                     15: int nreds, ngreens, nblues;
                     16: unsigned long *rmask, *gmask, *bmask; /* CARD32 */ /* RETURN */
                     17: {
                     18:     xAllocColorPlanesReply rep;
                     19:     Status status;
                     20:     register xAllocColorPlanesReq *req;
                     21: 
                     22:     LockDisplay(dpy);
                     23:     GetReq(AllocColorPlanes,req);
                     24: 
                     25:     req->cmap = cmap;
                     26:     req->colors = ncolors;
                     27:     req->red = nreds;
                     28:     req->green = ngreens;
                     29:     req->blue = nblues;
                     30:     req->contiguous = contig;
                     31: 
                     32:     status = _XReply(dpy, (xReply *)&rep, 0, xFalse);
                     33: 
                     34: 
                     35:     if (status) {
                     36:        *rmask = rep.redMask;
                     37:        *gmask = rep.greenMask;
                     38:        *bmask = rep.blueMask;
                     39: 
                     40:        /* sizeof(CARD32) = 4 */
                     41:        _XRead (dpy, (char *) pixels, (long)(ncolors * 4));
                     42:     }
                     43: 
                     44:     UnlockDisplay(dpy);
                     45:     SyncHandle();
                     46:     return(status);
                     47: }    

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.