1: #include <X/mit-copyright.h>
   2: 
   3: /* $Header: XCreateWinBat.c,v 10.4 86/02/01 15:31:31 tony Rel $ */
   4: /* Copyright    Massachusetts Institute of Technology    1985	*/
   5: 
   6: #include "XlibInternal.h"
   7: 
   8: int XCreateWindowBatch(defs, ndefs)
   9:     BatchFrame defs[];
  10:     int ndefs;
  11: {
  12:     register Display *dpy;
  13:     register int i;
  14:     register BatchFrame *frame = defs;
  15:     int nresult = 0;
  16: 
  17:     /*
  18: 	 * Issue requests.
  19: 	 */
  20:     for (i=0; i < ndefs; i++) {
  21:         register XReq *req;
  22:         if (frame->type == IsOpaque) {
  23:         GetReq(X_CreateWindow, frame->parent);
  24:         req->param.s[0] = frame->height;
  25:         req->param.s[1] = frame->width;
  26:         req->param.s[2] = frame->x;
  27:         req->param.s[3] = frame->y;
  28:         req->param.l[2] = frame->border;
  29:         req->param.l[3] = frame->background;
  30:         req->func = (frame++)->bdrwidth;
  31:         }
  32:         else {
  33:         GetReq(X_CreateTransparency, frame->parent);
  34:         req->param.s[0] = frame->height;
  35:         req->param.s[1] = frame->width;
  36:         req->param.s[2] = frame->x;
  37:         req->param.s[3] = (frame++)->y;
  38:         }
  39:     }
  40: 
  41:     /*
  42: 	 * Reset request number to its old value, so that
  43: 	 * error packets are processed correctly.
  44: 	 */
  45:     dpy->request -= ndefs;
  46: 
  47:     /*
  48: 	 * Retrieve replies.
  49: 	 */
  50:     frame = defs;
  51:     for (i=0;i<ndefs;i++) {
  52:         XRep rep;
  53:         /*
  54: 	     * Increment request number so error packets
  55: 	     * are processed correctly.
  56: 	     */
  57:         dpy->request++;
  58:         if (!_XReply(dpy, &rep)) (frame++)->self = NULL;
  59:         else {
  60:         (frame++)->self = rep.param.l[0];
  61:         nresult++;
  62:         }
  63:     }
  64:     return (nresult);
  65: }

Defined functions

XCreateWindowBatch defined in line 8; used 2 times
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 874
Valid CSS Valid XHTML 1.0 Strict