1: #include <X/mit-copyright.h> 2: 3: /* $Header: XCreatTranss.c,v 10.4 86/02/01 15:30:54 tony Rel $ */ 4: /* Copyright Massachusetts Institute of Technology 1985 */ 5: 6: #include "XlibInternal.h" 7: int XCreateTransparencies (parent, defs, ndefs) 8: Window parent; 9: TransparentFrame defs[]; 10: int ndefs; 11: { 12: register Display *dpy; 13: register int i; 14: register TransparentFrame *frame = defs; 15: int nresult = 0; 16: 17: for (i=0;i<ndefs;i++) { 18: register XReq *req; 19: GetReq(X_CreateTransparency, parent); 20: req->param.s[0] = frame->height; 21: req->param.s[1] = frame->width; 22: req->param.s[2] = frame->x; 23: req->param.s[3] = (frame++)->y; 24: } 25: 26: /* Reset request number to its old value, so that 27: error packets are processed correctly. */ 28: dpy->request -= ndefs; 29: 30: frame = defs; 31: for (i=0;i<ndefs;i++) { 32: XRep rep; 33: /* Increment request number so error packets 34: are processed correctly. */ 35: dpy->request++; 36: if (!_XReply(dpy, &rep)) 37: (frame++)->self = NULL; 38: else { 39: (frame++)->self = rep.param.l[0]; 40: nresult++; 41: } 42: } 43: return (nresult); 44: }