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 passTileShape,CursorShape, orStippleShape. 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β AnInputOnlywindow is used as aDrawable.BadDrawableβ A value for aDrawableargument does not name a definedWindoworPixmap.BadMatchβ The values do not exist for anInputOnlywindow. yes,BadMatchreally 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 π
XCreateGC(3)XSetArcMode(3)XSetClipOrigin(3)XSetFillStyle(3)XSetFont(3)XSetLineAttributes(3)XSetState(3)XSetTile(3)Xlib - C Language X Interface
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
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms