|
|
1.1 ! root 1: #include "copyright.h" ! 2: ! 3: /* $Header: XQuBest.c,v 1.6 87/09/11 08:05:44 toddb Exp $ */ ! 4: /* Copyright Massachusetts Institute of Technology 1986 */ ! 5: ! 6: #define NEED_REPLIES ! 7: #include "Xlibint.h" ! 8: ! 9: Status XQueryBestSize(dpy, class, drawable, width, height, ret_width, ret_height) ! 10: register Display *dpy; ! 11: int class; ! 12: Drawable drawable; ! 13: unsigned int width, height; ! 14: unsigned int *ret_width, *ret_height; ! 15: { ! 16: xQueryBestSizeReply rep; ! 17: register xQueryBestSizeReq *req; ! 18: ! 19: LockDisplay(dpy); ! 20: GetReq(QueryBestSize, req); ! 21: req->class = class; ! 22: req->drawable = drawable; ! 23: req->width = width; ! 24: req->height = height; ! 25: if (_XReply (dpy, (xReply *)&rep, 0, xTrue) == 0) { ! 26: UnlockDisplay(dpy); ! 27: SyncHandle(); ! 28: return 0; ! 29: } ! 30: *ret_width = rep.width; ! 31: *ret_height = rep.height; ! 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.