Status XQueryBestSize(display, class, which_screen, width, height, width_return, height_return) 
      Display *display;
      int class;
      Drawable which_screen;
      unsigned int width, height;
      unsigned int *width_return, *height_return;
| display | Specifies the connection to the X server. | 
| class | Specifies the class that you are interested in. You can pass TileShape, CursorShape, or StippleShape. | 
| which_screen | Specifies any drawable on the screen. | 
|  width height  | Specify the width and height. | 
|  width_return height_return  | Return the width and height of the object best supported by the display hardware. | 
XQueryBestSize() can generate BadDrawable, BadMatch, and BadValue errors.
| BadDrawable | A value for a Drawable argument does not name a defined Window or Pixmap. | 
| BadMatch | An InputOnly window is used as a Drawable. | 
| BadMatch | Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. | 
| BadValue | Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. |