JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Solaris X Window System Developer's Guide
search filter icon
search icon

Document Information

Preface

1.  Introduction to the Solaris X Server

2.  DPS Features and Enhancements

3.  Visuals on the Solaris X Server

4.  Font Support

5.  Server Overlay Windows

6.  Transparent Overlay Windows

What are Transparent Overlay Windows?

Basic Characteristics of Transparent Overlay Windows

Paint Type

Viewability

More on Transparent Overlay Characteristics

Background

Window Border

Backing Store

Window Gravity

Colormaps

Input Distribution Model

Print Capture

Choosing Visuals for Overlay/Underlay Windows

Example Program

Overview of the Solaris Transparent Overlay Window API

Creating Transparent Overlay Windows

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

Pixel Transfer Routines

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

XGetImage

XCopyArea and XCopyPlane

Designing an Application for Portability

Selecting a Visual for an Overlay/Underlay Window

Argument Types

Return Types

Multiple Criteria Sets

Selecting an Optimal Overlay/Underlay Visual Pair

Argument Types

Return Types

Criteria Sets

7.  Security Issues

A.  Reference Display Devices

Glossary

Index

Basic Characteristics of Transparent Overlay Windows

A transparent overlay window is a special class of an X InputOutput window into which pixels can be rendered transparently. Handles to transparent overlay windows have the X window type Window. Just like standard X windows, overlay windows are drawables, and an overlay window handle can be passed to any Xlib drawing routine that takes a Drawable.

Transparent overlay windows have extended the set of graphics context attributes to include an attribute for paint type. With the transparent overlay extension, transparent overlay windows can be rendered to with either opaque or transparent paint.

Paint Type

While standard X InputOutput windows and other drawables (such as pixmaps) accept only opaque paint, transparent overlay windows permit pixels to be rendered with transparent paint. Valid pixel values painted opaquely obscure pixels in underlying windows. Such pixels have associated color values that are displayed. Pixels rendered transparently have no intrinsic color; they derive their displayed color from the pixels that lie beneath.

Valid pixel values for pixels painted opaquely are obtained via XAllocColor() or another standard pixel allocation mechanism. Painting opaquely with a non-valid pixel value, for example a value that falls outside the valid colormap entries for a visual, produces undefined results for both transparent overlay windows and standard X InputOutput windows.

Paint type is defined with the data structure XSolarisOvlPaintType. By default, the paint type of a GC is opaque. The XSolarisOvlPaintType data structure is defined as:

typedef

enum {     XSolarisOvlPaintTransparent,     XSolarisOvlPaintOpaque, }

XSolarisOvlPaintType;

Viewability

A transparent overlay window is considered viewable even if all its pixels are fully transparent. For viewable pixels in a transparent overlay window that are fully transparent, the underlying pixels in the underlay will be displayed.

If an overlay window is unmapped or moved, the underlay beneath may receive exposure events. This, for example, is the case on devices that cannot display the overlay window and underlay window in different plane groups.