1. Introduction to the Solaris X Server
2. DPS Features and Enhancements
3. Visuals on the Solaris X Server
6. Transparent Overlay Windows
What are Transparent Overlay Windows?
Basic Characteristics of Transparent Overlay Windows
More on Transparent Overlay Characteristics
Choosing Visuals for Overlay/Underlay Windows
Overview of the Solaris Transparent Overlay Window API
Setting the Paint Type of a Graphics Context
Setting the Background State of a Transparent Overlay Window
Rendering to a Transparent Overlay Window
Querying the Characteristics of a Transparent Overlay Window
Determining Whether a Window is an Overlay Window
Determining the Paint Type of a Graphics Context
Filling an Area Using the Source Area Paint Type
Copying an Area and Its Paint Type
Retrieving Overlay Color Information
Using Existing Xlib Pixel Transfer Routines
Designing an Application for Portability
Selecting a Visual for an Overlay/Underlay Window
You can create a transparent overlay using XSolarisOvlCreateWindow. This routine behaves exactly as XCreateWindow except that the resulting window is a transparent overlay window. The newly created window can be rendered into with both opaque and transparent paint, and the background of the overlay window is transparent.
The class argument to XSolarisOvlCreateWindow should be InputOutput. An overlay window can be created as an InputOnly window but, in this case, it will behave like a standard InputOnly window. It is only for InputOutput windows that there is a difference between overlay and non-overlay.
The syntax and arguments for XSolarisOvlCreateWindow are shown below.
Window XSolarisOvlCreateWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int class, Visual * visual, unsigned long valuemask, XSetWindowAttributes * attr)
The arguments for this routine are the same as those for XCreateWindow.
|
You can use any visual to create the overlay. However, not all overlay/underlay visual pairs may be optimal. Each screen defines a set of optimal overlay/underlay visual pairs. These define the optimal visuals of the overlay windows that can be created with a particular underlay visual. Likewise, they define the optimal visuals of underlay windows that can be created with a particular overlay visual. You can determine the optimal pairs using XSolarisOvlSelectPair and XSolarisOvlSelectPartner.
The definition of optimal varies from device to device, but it will usually refer to the ability of a device to create an overlay window in a different plane group than that of an underlay window. See Selecting an Optimal Overlay/Underlay Visual Pair for more information on overlay/underlay visual pairs.
Overlay windows are destroyed with the Xlib routines XDestroyWindow or XDestroySubwindows.