General Information about PEXlib Access and Information Functions


This section describes the PEXlib functions you need to begin using PEXlib (e.g., PEXInitialize) and to obtain information that is specific to the PEX/PEXlib implementation you are using. A few of the more common ones are introduced below.

You must invoke PEXInitialize before using most of the PEXlib functions. If PEXInitialize succeeds, you may use the information it returns to learn more about the particular PEX/PEXlib implementation, or you may invoke PEXGetExtensionInfo to retrieve the same information at a later time.

The PEX specification does not require that PEX implementors completely implement all functions described in the specifications. You use the PEXGetEnumTypeInfo function to find out whether the functions you need are present in the implementation you are using. You use the PEXGetImpDepConstants to determine the limits involved with some features in the implementation.

PEXMatchRenderingTargets, PEXQueryColorApproximation, and PEXSelectVisual are beneficial for selecting visuals and for initializing colormaps when you are using the X Window System to create drawables for PEXlib use.

Double-Buffering

The PEXDBAllocateBackBufferName, PEXDBFreeBackBufferName, PEXDBSwapBuffer, and PEXDBTestVisual functions are useful for creating double-buffered applications. You are encouraged to use these functions instead of older techniques such as the MBX extension, special escape functions, or pixmap double buffering when working with PEX 5.2 implementations. These functions follow the design of the DBE (Double Buffer Extension) which is a required X co-extension for PEX. These PEXlib functions provide nearly all the function and flexibility of the DBE itself. If you need to access DBE functionality not exposed by these PEXlib functions, then it is better to use direct DBE function calls exclusively. PEXlib implementations may or may not use DBE in the implementations of the PEXDB Double Buffering functions, so it may be difficult to predict the interaction between the DBE and the PEXlib implementation.