Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

NAME

XQueryBestSize − obtain the "best" supported cursor, tile, or stipple size. 

Synopsis

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;

Arguments

displaySpecifies a connection to an X server; returned from XOpenDisplay(). 

classSpecifies the class that you are interested in.  Pass one of these constants: TileShape, CursorShape, or StippleShape. 

which_screenSpecifies a drawable ID that tells the server which screen you want the best size for. 

width

heightSpecify the preferred width and height in pixels. 

width_return

height_returnReturn the closest supported width and height, in pixels, available for the object on the display hardware. 

Description

XQueryBestSize() returns the "fastest" or "closest" size to the specified size.  For class of CursorShape, this is the closest size that can be fully displayed on the screen.  For TileShape and StippleShape, this is the closest size that can be tiled or stippled "fastest." For CursorShape, the drawable indicates the desired screen.  For TileShape and StippleShape, the drawable indicates the screen and possibly the visual class and depth (server-dependent).  An InputOnly window cannot be used as the drawable for TileShape or StippleShape (else a BadMatch error occurs).  XQueryBestSize() returns nonzero if the call succeeded in getting a supported size (may be the same or different from the specified size), or zero if the call failed. 

Errors

BadDrawable

BadMatchInputOnly drawable for class TileShape or StippleShape. 

BadValue

See Also

XCreateBitmapFromData(), XCreatePixmap(), XCreatePixmapFromBitmapData(), XFreePixmap(), XQueryBestStipple(), XQueryBestTile(), XReadBitmapFile(), XSetTile(), XSetWindowBackgroundPixmap(), XSetWindowBorderPixmap(), XWriteBitmapFile(). 

Copyright O’Reilly & Assoc.  —  

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026