XQueryBestSize(3)

🌸 NAME 🌸

okay so bestie, welcome to the XQueryBestSize(3) page from the XLIB FUNCTIONS manual πŸ’…βœ¨ These three functions β€” XQueryBestSize, XQueryBestTile, and XQueryBestStipple β€” determine efficient sizes. That's the whole vibe: finding the sizes your display hardware actually slays at. πŸŽ€


✨ 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);

πŸŽ€ ARGUMENTS πŸŽ€

  • class β€” specifies the class you're interested in. You can pass TileShape, CursorShape, or StippleShape. pick your fighter πŸ’–
  • display β€” specifies the connection to the X server. literally the link to the server, bestie.
  • width, height β€” specify the width and height.
  • which_screen β€” specifies any drawable on the screen.
  • width_return, height_return β€” return the width and height of the object best supported by the display hardware. iconic output behavior ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

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

XQueryBestSize can generate BadDrawable, BadMatch, and BadValue errors.

The 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 InputOnly window is used as the drawable, a BadMatch error results. 🫢

XQueryBestTile can generate BadDrawable and BadMatch errors.

The 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 InputOnly window is used as the drawable, a BadMatch error results. 🌈

XQueryBestStipple can generate BadDrawable and BadMatch errors.


πŸ’€ DIAGNOSTICS πŸ’€

  • BadMatch β€” An InputOnly window is used as a Drawable.
  • BadDrawable β€” A value for a Drawable argument does not name a defined Window or Pixmap.
  • BadMatch β€” The values do not exist for an InputOnly window. yes, BadMatch really shows up twice β€” that's what the page says, bestie 🫠
  • 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.

πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, bestie β€” brought to you by X Version 11, libX11 1.8.14, and the footer wraps it up with XQueryBestSize(3). mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from