1. NAME

XQueryBestSize, XQueryBestTile, XQueryBestStipple - determine efficient sizes

2. SYNTAX

Status XQueryBestSize(Display *display, int class, Drawable which_screen, unsigned int width, unsigned int height, unsigned int *width_return, unsigned int *height_return); Status XQueryBestTile(Display *display, Drawable which_screen, unsigned int width, unsigned int height, unsigned int *width_return, unsigned int *height_return); Status XQueryBestStipple(Display *display, Drawable which_screen, unsigned int width, unsigned int height, unsigned int *width_return, unsigned int *height_return);

3. ARGUMENTS

class 1i Specifies the class that you are interested in. You can pass .ZN TileShape , .ZN CursorShape , or .ZN StippleShape .

display 1i Specifies the connection to the X server.

width 1i

height 1i Specify the width and height.

which_screen 1i Specifies any drawable on the screen.

width_return 1i

height_return 1i Return the width and height of the object best supported by the display hardware.

4. DESCRIPTION

The .ZN XQueryBestSize function returns the best or closest size to the specified size. For .ZN CursorShape , this is the largest size that can be fully displayed on the screen specified by which_screen. For .ZN TileShape , this is the size that can be tiled fastest. For .ZN StippleShape , this is the size that can be stippled fastest. For .ZN CursorShape , the drawable indicates the desired screen. For .ZN TileShape and .ZN StippleShape , the drawable indicates the screen and possibly the window class and depth. An .ZN InputOnly window cannot be used as the drawable for .ZN TileShape or .ZN StippleShape , or a .ZN BadMatch error results.

.ZN XQueryBestSize can generate .ZN BadDrawable , .ZN BadMatch , and .ZN BadValue errors.

The .ZN XQueryBestTile function returns the best or closest size, that is, the size that can be tiled fastest on the screen specified by which_screen. The drawable indicates the screen and possibly the window class and depth. If an .ZN InputOnly window is used as the drawable, a .ZN BadMatch error results.

.ZN XQueryBestTile can generate .ZN BadDrawable and .ZN BadMatch errors.

The .ZN XQueryBestStipple function returns the best or closest size, that is, the size that can be stippled fastest on the screen specified by which_screen. The drawable indicates the screen and possibly the window class and depth. If an .ZN InputOnly window is used as the drawable, a .ZN BadMatch error results.

.ZN XQueryBestStipple can generate .ZN BadDrawable and .ZN BadMatch errors.

5. DIAGNOSTICS

  • .ZN BadMatch
     An .ZN InputOnly window is used as a Drawable.
  • .ZN BadDrawable
     A value for a Drawable argument does not name a defined Window or Pixmap.
  • .ZN BadMatch
     The values do not exist for an .ZN InputOnly window.
  • .ZN 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.

6. SEE ALSO