PEXUtVerifyColorApproximation(3G)
Name
PEXUtVerifyColorApproximation − determine PEX server support for a particular color approximation entry
Syntax
#include <pexutcmap.h>
int PEXUtVerifyColorApproximation(Display *display, PEXColorApproxEntry*capx_info, XVisualInfo *vis_info)
Parameters
display
A pointer to a display structure returned by a successful XOpenDisplay call, on which PEXlib has been initialized.
capx_info
A pointer to a valid structure, that describes the color approximation setup for which support is to be verified.
vis_info
A pointer to a valid structure that describes the Visual of interest.
Returns
The function returns a value of if it determines that the color approximation entry is supported by the PEX server. is returned if support cannot be determined.
A negative return value indicates failure. The following are the meanings of the different failure values:
•A return value of means that the utility definitely determined that the color approximation entry is not supported by the PEX server.
•A return value of means that an error was encountered during an Xlib call.
•means that an error was encountered during a PEXlib call. One possible cause of this failure is that PEXInitialize has not been called for the display connection.
•means that the utility ran out of memory.
Description
This procedure attempts to verify that the color approximation setup described by capx_info is supported by PEX on the Visual described by vis_info. Whether or not the procedure can determine support for the setup that is described depends on what information is available from the server. If the described setup is determined to be supported by the PEX server, a value of is returned. If support cannot be determined, a value of is returned. If it is determined that the specified color approximation is not supported, the return value is
This utility is intended for use by applications that create a PEX color approximation entry (by calling PEXUtFindVisual or PEXUtGetStandardColormapInfo, or by other means) and wish to verify that the entry is supported by the server.
Restrictions
It is assumed on entry that PEXInitialize has already been successfully called on the display connection. The utility may make various PEXlib calls.
The ability of this procedure to verify support for the entry depends on information available from the PEX server, including its support for various interoperability conventions. If support cannot be determined, is returned so that application can choose to go on to attempt a call to PEXSetTableEntries. Applications should be prepared for an error to be returned during that call in case the entry is in fact not supported.
See Also
(c) Hewlett-Packard Company — HP PEXlib Release 5.1: January 1993