1: #include <X/mit-copyright.h>
   2: 
   3: /* $Header: XCreateWinds.c,v 10.4 86/02/01 15:31:46 tony Rel $ */
   4: /* Copyright    Massachusetts Institute of Technology    1985	*/
   5: 
   6: #include "XlibInternal.h"
   7: int XCreateWindows (parent, defs, ndefs)
   8:     Window parent;
   9:     OpaqueFrame defs[];
  10:     int ndefs;
  11: {
  12:     register Display *dpy;
  13:     register int i;
  14:     register OpaqueFrame *frame = defs;
  15:     int nresult = 0;
  16: 
  17:     for (i=0;i<ndefs;i++) {
  18:         register XReq *req;
  19:         GetReq(X_CreateWindow, 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:         req->param.l[2] = frame->border;
  25:         req->param.l[3] = frame->background;
  26:         req->func = (frame++)->bdrwidth;
  27:         }
  28: 
  29:     /* Reset request number to its old value, so that
  30: 	    error packets are processed correctly.  */
  31:     dpy->request -= ndefs;
  32: 
  33:     frame = defs;
  34:     for (i=0;i<ndefs;i++) {
  35:         XRep rep;
  36:         /* Increment request number so error packets
  37: 	       are processed correctly. */
  38:         dpy->request++;
  39:         if (!_XReply(dpy, &rep))
  40:             (frame++)->self = NULL;
  41:         else {
  42:         (frame++)->self = rep.param.l[0];
  43:         nresult++;
  44:         }
  45:         }
  46:     return (nresult);
  47: }
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 493
Valid CSS Valid XHTML 1.0 Strict