|
|
1.1 root 1: #include "copyright.h"
2:
3: /* $Header: XGetGeom.c,v 11.12 87/09/11 08:04:05 toddb Exp $ */
4: /* Copyright Massachusetts Institute of Technology 1986 */
5:
6: #define NEED_REPLIES
7: #include "Xlibint.h"
8:
9: Status XGetGeometry (dpy, d, root, x, y, width, height, borderWidth, depth)
10: register Display *dpy;
11: Drawable d;
12: Window *root; /* RETURN */
13: int *x, *y; /* RETURN */
14: unsigned int *width, *height, *borderWidth, *depth; /* RETURN */
15: {
16: xGetGeometryReply rep;
17: register xResourceReq *req;
18: LockDisplay(dpy);
19: GetResReq(GetGeometry, d, req);
20: if (!_XReply (dpy, (xReply *)&rep, 0, xTrue)) {
21: UnlockDisplay(dpy);
22: SyncHandle();
23: return (0);
24: }
25: *root = rep.root;
26: *x = rep.x;
27: *y = rep.y;
28: *width = rep.width;
29: *height = rep.height;
30: *borderWidth = rep.borderWidth;
31: *depth = rep.depth;
32: UnlockDisplay(dpy);
33: SyncHandle();
34: return (1);
35: }
36:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.