PEXUtDBConfig(3G)
Name
PEXUtDBConfig − configure a window for double-buffering
Syntax
int PEXUtDBConfig(Display *dpy, Window win, int db_on, XColor *bg_color, int db_x, Drawable *drw_id_return)
Parameters
dpyA pointer to a display structure returned by a successful XOpenDisplay call.
winThe resource identifier of the window to be configured for double-buffering.
db_onto turn double-buffering on, and to turn double-buffering off.
bg_color
A pointer to the background color values used when clearing. These values should be the same color as the window’s background. The application must ensure that both the pixel value and the red, green and blue values are valid in bg_color. These values should have been set or computed during window creation and configuration. (One way to obtain the pixel value is which returns the pixel value for a specified red, green and blue color triplet. One way to obtain the triplet values is which return the red, green and blue component values for a specified pixel value. There are other methods available in Xlib depending on the application needs.)
db_xindicates the application requires the double-buffered rendering to support both X and PEX. indicates the application requires double-buffered rendering to support only PEX.
drw_id_return
A pointer to a drawable identifier. This is the drawable identifier to be used for subsequent rendering calls for X and PEX. For example, this drawable identifier should be used for or as well as for X rendering calls like The returned value is a null pointer if the function is unsuccessful.
Returns
The function returns a value of zero if it is successful; a non-zero return value indicates failure. The following are the meaning of the different non-zero return values:
•A return value of means that double-buffering was requested (db_on == but double-buffering is not supported for this window.
•A return value of means that double-buffered rendering for both X and PEX was requested (db_x == but is not supported for this window. If acceptable, the application should retry with db_x set to which will double-buffer only PEX rendering.
•A return value of means that the PEX server major version was not 5. These utilities are designed only to work with 5.0 and 5.1 compatible servers.
•A return value of means that the utilities ran out of memory.
Description
The function configures the specified window for double-buffered rendering (if db_on == or configures the specified window for single-buffered rendering (if db_on == The utilities support double-buffered rendering for PEX primitives, and if requested (db_x == for X and PEX primitives together.
If the window is configured for double-buffering, the back buffer is cleared to the specified background color.
Restrictions
If it is necessary to ensure that all actions have completed before proceeding, the application should call XSync after calling
This function assumes that has been called for the specified display argument.
Renderer clip lists do not affect the clear operation. The entire back buffer is cleared.
If the PEX server is version 5.0, and MBX is not available, pixmaps are the only other option. However, there is no way to determine if a 5.0 PEX server supports rendering into pixmaps. In this case, will configure the window for double-buffering via pixmap, but the application should be prepared to receive an error from the first or with the drawable identifier returned from If an error does result, that error is the application’s indication that double-buffering is not supported for the specified window.
See Also
(c) Hewlett-Packard Company — HP PEXlib Release 5.1: January 1993