|
|
1.1 root 1: #include "copyright.h"
2:
3: /* $Header: XTrCoords.c,v 11.10 87/09/11 08:07:48 toddb Exp $ */
4: /* Copyright Massachusetts Institute of Technology 1986 */
5:
6: #define NEED_REPLIES
7: #include "Xlibint.h"
8:
9: int XTranslateCoordinates(dpy, src_win, dest_win, src_x, src_y,
10: dst_x, dst_y, child)
11: register Display *dpy;
12: Window src_win, dest_win;
13: int src_x, src_y;
14: int *dst_x, *dst_y;
15: Window *child;
16: {
17: register xTranslateCoordsReq *req;
18: xTranslateCoordsReply rep;
19:
20: LockDisplay(dpy);
21: GetReq(TranslateCoords, req);
22: req->srcWid = src_win;
23: req->dstWid = dest_win;
24: req->srcX = src_x;
25: req->srcY = src_y;
26: if (_XReply (dpy, (xReply *)&rep, 0, xTrue) == 0) {
27: UnlockDisplay(dpy);
28: SyncHandle();
29: return(False);
30: }
31:
32: *child = rep.child;
33: *dst_x = rep.dstX;
34: *dst_y = rep.dstY;
35: UnlockDisplay(dpy);
36: SyncHandle();
37: return ((int)rep.sameScreen);
38: }
39:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.