int PEXQueryColorApproximation( Display *display, Drawable example_drawable, PEXColorApproxEntry *color_approx unsigned long *count_return, PEXColorApproxEntry **color_approx_return, int *all_return )
True if the given color approximation table entry is supported; False otherwise. If an error condition was not identified and False is returned, then the output arguments of the function provide alternative color approximation table entries.
Invoke PEXQueryColorApproximation to find a supported color approximation table entry for the specified example drawable.
This function returns a value of True, if there are drawables that support the specified color approximation table entry, and these drawables have the same visual (if the drawable has a visual), root, and depth as the specified example drawable.
If there are no drawables that support the specified color approximation color table, then this function returns a value of False. In this case, this function returns via the color_approx_return argument, a list of color approximations which are supported by drawables of the same visual (if the drawable has one), root and depth as the specified example drawable. A return value of True on the all_return argument indicates that this list is exhaustive.
PEXlib allocates memory if the implementation supports any alternative color approximation table entries. If PEXlib is unable to allocate the memory it requires, then PEXlib sets the count_return argument to zero and sets the color_approx_return argument to NULL. Invoke the XFree function to deallocate this memory.
For an overview, see PEXlib Access and Information Functions.