|
|
1.1 ! root 1: #include "copyright.h" ! 2: ! 3: /* $Header: XCrWindow.c,v 11.9 87/09/11 08:02:37 toddb Exp $ */ ! 4: /* Copyright Massachusetts Institute of Technology 1986 */ ! 5: ! 6: #include "Xlibint.h" ! 7: ! 8: Window XCreateSimpleWindow(dpy, parent, x, y, width, height, ! 9: borderWidth, border, background) ! 10: register Display *dpy; ! 11: Window parent; ! 12: int x, y; ! 13: unsigned int width, height, borderWidth; ! 14: unsigned long border; ! 15: unsigned long background; ! 16: { ! 17: Window wid; ! 18: register unsigned long *valuePtr; ! 19: register xCreateWindowReq *req; ! 20: ! 21: LockDisplay(dpy); ! 22: GetReqExtra(CreateWindow, 8, req); ! 23: req->parent = parent; ! 24: req->x = x; ! 25: req->y = y; ! 26: req->width = width; ! 27: req->height = height; ! 28: req->borderWidth = borderWidth; ! 29: req->depth = 0; ! 30: req->class = CopyFromParent; ! 31: req->visual = CopyFromParent; ! 32: wid = req->wid = XAllocID(dpy); ! 33: req->mask = CWBackPixel | CWBorderPixel; ! 34: ! 35: valuePtr = (unsigned long *) (req + 1); ! 36: *valuePtr++ = background; ! 37: *valuePtr = border; ! 38: UnlockDisplay(dpy); ! 39: SyncHandle(); ! 40: return (wid); ! 41: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.