next up previous contents
Next: Pointer control Up: X Windows Version 11.5 Previous: Buffers

Miscellaneous Routines

Not all of the following routines are very useful; they are included mainly for the sake of completeness. The following routines return the biggest (in the case of cursors), else the fastest size of the required resource.

XQueryBestSize(display,class,d,width, height,rwidth,rheight)
   int class; /* TileShape, CursorShape, StippleShape*/
   unsigned int width, height;       /* requested size                */
   unsigned int *rwidth, *rheight;   /* RETURN of required legal size */

XQueryBestTile(display,d,width, height,rwidth,rheight)
   unsigned int width, height;       /* requested size                */
   unsigned int *rwidth, *rheight;   /* RETURN of required legal size */

XQueryBestStipple(display,d,width, height,rwidth,rheight)
   unsigned int width, height;       /* requested size                */
   unsigned int *rwidth, *rheight;   /* RETURN of required legal size */
    /* FIND NEAREST POSSIBLE CURSOR SIZE TO REQUESTED SIZE      */
XQueryBestCursor(display,d,width, height, rwidth, rheight)
    unsigned int width, height;       /* requested size                  */
    unsigned int *rwidth, *rheight;   /* RETURN possible size            */
int XTranslateCoordinates(display,src_w,dest_w,src_x,src_y,dest_x,dest_y,child)
   int *dest_x, *dest_y; /*RETURN src_x, src_y relative to the dest window*/
   Window *child; /*RETURN a child window of dest_w if the point is within it*/

Status XGetGeometry(display,d,root,x,y,width,height,border_width,depth);
   Drawable *root; /*RETURN the root of d*/
   int *x,*y;   /*RETURN coords if d is a window, else 0 */
   unsigned int *width, *height;  /*RETURN*/
   unsigned int *border_width; /*RETURN border_width if d is a window, else 0*/
   unsigned int *depth; /*RETURN*/

    /* LIST THE PARENT AND CHILDREN OF A WINDOW                 */
Status XQueryTree(display,w, parent, children, nchildren)
   Window *parent;      /* RETURN pointer to parent window id  */
   int *nchildren;      /* RETURN pointer to number of children*/
   Window **children;   /* RETURN pointer to array of child ids*/

XSetScreenSaver(display,timeout,interval,prefer_blanking,allow_exposures)
    int timeout;     /* blank screen after this many seconds*/
    int interval;  /* interval between screen saver invocations*/
    int prefer_blanking;/*DontPreferBlanking,PreferBlanking,DefaultBlanking*/
    int allowExposures;/*DontAllowExposure, AllowExposures,DefaultExposures*/




Tim Love
Mon Mar 11 17:03:18 GMT 1996