configuring X Windows on
{
/* Since the Atom exists, request the property's contents. */ bytesAfter = 0;
numLongs = (nVisuals * sizeof(OverlayVisualPropertyRec) + 3 ) / 4;
XGetWindowProperty(display, RootWindow(display, screen), overlayVisualsAtom, 0, numLongs, False, AnyPropertyType, &actualType, &actualFormat, &numLongs, &bytesAfter, &pOverlayVisuals);
if (bytesAfter != 0 ) {/* Serious Failure Here */} ;
/* Loop through the pOverlayVisuals array. */
| ... |
|
nOVisuals = | numLongs/sizeof(OverlayVisualPropertyRec); | |
pOVis | = | pOverlayVisuals; |
while
{if (
**Found a transparent overlay visual, **set ident. aside.
*/
};
pOVis++;
}
XFree(pOverlayVisuals);
/*
**There might be some additional checking of the found **transparent overlay visuals wanted; e.g., for depth. */
}
XFree(pVisuals);
}
This program segment is not complete; however, its main purpose is to give an idea of how to find an overlay visual having transparency.
When the overlay planes are enabled, one colormap entry in PseudoColor colormaps is not available for use by clients. The server handles this entry in one of two ways depending upon the setting of the "Count- TransInOvlyVis" device option. If the option is not set, the server will report that 256 colormap entries are available for allocation in the PseudoColor visual. However, the transparent pixel will always remain transparent. The image layer will be visible wherever this pixel value is rendered in the overlay planes. Hence, applications should not render using this pixel unless transparency is desired.
Chapter 3 | 73 |