Shape extension

Shape extension
X Nonrectangular Window Shape Extension
Oclock.png

The round oclock window.
Original author(s) X.Org Foundation
Stable release 1.1 / 2006; 5 years ago (2006)

In the X Window System, the X Nonrectangular Window Shape Extension allows windows to be given arbitrary, non-rectangular shapes.

Two well-known applets that use the shape extension are oclock, which is a simple round analog clock, and xeyes, which shows two googly eyes that follow the cursor on the screen as if they were watching it. Most X Window systems have one or the other (or both) in their standard installations. In addition, some window managers use the shape extension to draw non-rectangular icons.

Implementation

Applications can only create rectangular windows, but can then change their shape to be an arbitrary part of the original rectangle. The remaining area of the rectangle is not only transparent (shows what is below the window); rather, it is not part of the window at all. For example, if a window is shaped with a hole in the middle, not only the hole shows what is below the window, but a click in the hole is considered to be a click in what is below the window.

A window having a rectangular outline but a hole in the middle.

Applications create windows as usual (specifying width and height), but can then change the shape of a window to be a subset of the original area. by sending the X server either a list of rectangles or a pixmap of color depth one (a black-and-white pixmap). More precisely, a client can request the rectangles or the pixmap to be set as the new shape, but also to be combined in various ways (e.g., intersected or added) with the old shape. A third way for changing the shape of a window is by using the current shape of a window or a part of it.

The extension allows defining the shape of two separate regions: the clipping and the bounding regions. These two areas are defined even for windows not using the shape extension: the clipping region is the area that can be used for drawing, the bounding region is the total area covered by the window (that is, the clipping region plus the border). The shape extension allows defining two independent shapes for these two regions.

Both the clipping and bounding are associated, in the shape extension, two areas: a default rectangular region and a possibly non-rectangular client region, defined and changed by the client as specified above. The effective region, which is the actual shape of the window, is the intersection of these two areas. This intersection is performed every time either region is changed: for example, if the client regions contains parts that are outside the default region but the default region is then enlarged, the effective region will include these parts.

See also

  • X Window core protocol

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • SHAPE — • X/11 non rectangular Window Shape Extension ab Release 4, Routinensatz für die Erstellung nichtrechteckiger Fenster • Versionsverwaltungs und Konfigurationssystem Erweiterung zu make auf Basis eines Attributierten Filesystems (AFS) • Supreme… …   Acronyms

  • SHAPE — [1] X/11 non rectangular Window Shape Extension ab Release 4, Routinensatz für die Erstellung nichtrechteckiger Fenster [2] Versionsverwaltungs und Konfigurationssystem Erweiterung zu make auf Basis eines Attributierten Filesystems (AFS) [3]… …   Acronyms von A bis Z

  • Extension — • Philosophical term. From Lat. ex tendere, to spread out Catholic Encyclopedia. Kevin Knight. 2006. Extension     Extension     † …   Catholic encyclopedia

  • X keyboard extension — In the X Window System, the X keyboard extension or XKB extends the ability to control the keyboard over what is offered by the X Window System core protocol. The main features of this extension are:* enhanced support for modifiers; * better… …   Wikipedia

  • Convergent extension — Convergent extension, or Convergence and Extension, is the process by which the tissue of an embryo is restructured to converge (narrow) along one axis and extend (elongate) along a perpendicular axis by cellular movement. An example of this… …   Wikipedia

  • Season extension — In agriculture, season extension refers to anything that allows a crop to be cultivated beyond its normal outdoor growing season. For colder climates, the fully heated and artificially lit greenhouse is the ultimate season extension device,… …   Wikipedia

  • illusory arm extension —    The term illusory arm extension refers to a subclass of the motor illusions, which is itself a subclass of the group of illusory movement experiences. The phenomenon of illusory arm extension can be induced by means of vibratory stimulation of …   Dictionary of Hallucinations

  • Leading edge extension — Leading edge extensions or LEX (also referred to as leading edge root extensions or LERX or strakes or chines ) are fillets added to the front of a modern fighter aircraft s wings in order to provide usable airflow at high angles of attack. They… …   Wikipedia

  • X Window System core protocol — The X Window System logo The X Window System core protocol[1][2][3] is the base protocol of the X Windo …   Wikipedia

  • philosophy, Western — Introduction       history of Western philosophy from its development among the ancient Greeks to the present.       This article has three basic purposes: (1) to provide an overview of the history of philosophy in the West, (2) to relate… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”