Pseudo-transparency
   HOME

TheInfoList



OR:

''Pseudo-transparency'' is a term used for
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wit ...
clients that simulate the appearance of
translucency In the field of optics, transparency (also called pellucidity or diaphaneity) is the physical property of allowing light to pass through the material without appreciable scattering of light. On a macroscopic scale (one in which the dimensions a ...
or transparency by manipulating the same pixmap that has been drawn on the root
window A window is an opening in a wall, door, roof, or vehicle that allows the exchange of light and may also allow the passage of sound and sometimes air. Modern windows are usually glazed or covered in some other transparent or translucent materia ...
, or by instructing the X Server that the Background Pixmap should be inherited from the window's parent.


Purpose

Traditionally, the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wit ...
has lagged behind other windowing systems in adding purely eye candy or aesthetic features, such as window
translucency In the field of optics, transparency (also called pellucidity or diaphaneity) is the physical property of allowing light to pass through the material without appreciable scattering of light. On a macroscopic scale (one in which the dimensions a ...
. This has encouraged
developer Developer may refer to: Computers * Software developer, a person or organization who develop programs/applications * Video game developer, a person or business involved in video game development, the process of designing and creating games * Web d ...
s to develop
kludges A kludge or kluge () is a workaround or quick-and-dirty solution that is clumsy, inelegant, inefficient, difficult to extend and hard to maintain. This term is used in diverse fields such as computer science, aerospace engineering, Internet ...
to overcome this limitation. This pseudo-transparency, so called as the background pixmap of the root window is visible (analogous to
desktop wallpaper A wallpaper or background (also known as a desktop background, desktop picture or desktop image on computers) is a digital image (photo, drawing etc.) used as a decorative background of a graphical user interface on the screen of a computer, smar ...
) rather than any obscured windows, allows users to make windows look less imposing (such as
Terminal emulator A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term ''terminal'' covers all remote termin ...
s, which usually comprise large chunks of text), and to integrate the appearance of windows with their desktop themes.


Implementation

There are three common methods for achieving pseudo-transparency using
Xlib Xlib (also known as libX11) is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the ...
, each with its own advantages and drawbacks.


Parental-relative

The "parental-relative" method uses XSetWindowBackgroundPixmap() to inherit the parent window's background image. Unfortunately, using this method, the X server permits very few operations to be performed on the background pixmap (such as XOR), preventing clients from implementing any sort of advanced image filtering.


_XROOTPMAP_ID and ESETROOT_PMAP_ID properties

These properties are used to inform the window where it can find the pixmap used on the root window. Using this information, a client can paint a section of the image (corresponding to the size and position of the window) onto its background, achieving the effect of transparency. This method uses the most
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered, ...
, but has the advantage of allowing clients to perform any operation, such as tinting or
shading Shading refers to the depiction of depth perception in 3D models (within the field of 3D computer graphics) or illustrations (in visual art) by varying the level of darkness. Shading tries to approximate local behavior of light on the object's ...
, on the image data.


XCopyArea

''XCopyArea'' can achieve a more realistic transparency effect in that it can include obscured windows, but with the significant disadvantage that it is only usable with
modal window In user interface design for computer applications, a modal window is a graphical control element subordinate to an application's main window. A modal window creates a mode that disables the main window but keeps it visible, with the modal window a ...
s. This method simply uses the XCopyArea() function to take a partial
screenshot screenshot (also known as screen capture or screen grab) is a digital image that shows the contents of a computer display. A screenshot is created by the operating system or software running on the device powering the display. Additionally, s ...
for use as the window's background pixmap.


Future

Recent technologies such as
DirectFB DirectFB (Direct Frame Buffer) is a software library with a small memory footprint that provides graphics acceleration, input device handling and abstraction layer, and integrated windowing system with support for translucent windows and mult ...
,
Direct Rendering Infrastructure The Direct Rendering Infrastructure (DRI) is the framework comprising the modern Linux graphics stack which allows unprivileged user-space programs to issue commands to graphics hardware without conflicting with other programs. The main use ...
, and hardware
compositing Compositing is the process or technique of combining visual elements from separate sources into single images, often to create the illusion that all those elements are parts of the same scene. Live action, Live-action shooting for compositing is ...
via
OpenGL OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
allow X client applications to utilize true
alpha transparency In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. It is often useful to render picture elements (pixels) in separate pas ...
.


References

X Window System {{Compu-graphics-stub