Shape extension

Last updated
X Nonrectangular Window Shape Extension

Oclock.png

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

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

X Window System windowing system for bitmap displays on UNIX-like systems

The X Window System is a windowing system for bitmap displays, common on Unix-like operating systems.

Window (computing) visual area containing some kind of user interface

In computing, a window is a graphical control element. It consists of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration. It usually has a rectangular shape that can overlap with the area of other windows. It displays the output of and may allow input to one or more processes.

Contents

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 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.

Googly eyes small plastic craft supplies used to imitate eyeballs

Googly eyes, or jiggly eyes, are small plastic craft supplies used to imitate eyeballs. Googly eyes traditionally are composed of a white plastic or card backing covered by a clear, hard-plastic shell, encapsulating a black plastic disk. The combination of a black circle over a white disk mimics the appearance of the sclera and pupil of the eye to humorous effect. The inner black disk is allowed to move freely within the larger clear plastic shell, which makes the eyes appear to move when the googly eyes are tilted or shaken.

X window manager software for Unix type operating systems

An X window manager is a window manager which runs on top of the X Window System, a windowing system mainly used on Unix-like systems.

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. Xhole.png
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 display 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.

Display server program to coordinate the input and output of display clients

A display server or window server is a program whose primary task is to coordinate the input and output of its clients to and from the rest of the operating system, the hardware, and each other. The display server communicates with its clients over the display server protocol, a communications protocol, which can be network-transparent or simply network-capable.

Color depth or colour depth, also known as bit depth, is either the number of bits used to indicate the color of a single pixel, in a bitmapped image or video framebuffer, or the number of bits used for each color component of a single pixel. For consumer video standards, such as High Efficiency Video Coding (H.265), the bit depth specifies the number of bits used for each color component. When referring to a pixel, the concept can be defined as bits per pixel (bpp), which specifies the number of bits used. When referring to a color component, the concept can be defined as bits per component, bits per channel, bits per color, and also bits per pixel component, bits per color channel or bits per sample (bps). Color depth is only one aspect of color representation, expressing the precision with which colors can be expressed; the other aspect is how broad a range of colors can be expressed. The definition of both color precision and gamut is accomplished with a color encoding specification which assigns a digital code value to a location in a color space.

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

Related Research Articles

The Lightweight Directory Access Protocol is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network. Directory services play an important role in developing intranet and Internet applications by allowing the sharing of information about users, systems, networks, services, and applications throughout the network. As examples, directory services may provide any organized set of records, often with a hierarchical structure, such as a corporate email directory. Similarly, a telephone directory is a list of subscribers with an address and a phone number.

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email to support:

The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network. Major internet applications such as the World Wide Web, email, remote administration, and file transfer rely on TCP. Applications that do not require reliable data stream service may use the User Datagram Protocol (UDP), which provides a connectionless datagram service that emphasizes reduced latency over reliability.

The File Transfer Protocol (FTP) is a standard network protocol used for the transfer of computer files between a client and server on a computer network.

In HTML and XHTML, an image map is a list of coordinates relating to a specific image, created in order to hyperlink areas of the image to different destinations. For example, a map of the world may have each country hyperlinked to further information about that country. The intention of an image map is to provide an easy way of linking various parts of an image without dividing the image into separate image files.

QuickDraw is the 2D graphics library and associated Application Programming Interface (API) which is a core part of the classic Mac OS operating system. It was initially written by Bill Atkinson and Andy Hertzfeld. QuickDraw still existed as part of the libraries of Mac OS X, but had been largely superseded by the more modern Quartz graphics system. In Mac OS X v10.4, QuickDraw has been officially deprecated. In Mac OS X v10.5 applications using QuickDraw cannot make use of the added 64-bit support. In Mac OS X v10.8, QuickDraw header support was removed from the operating system. Applications using QuickDraw will still run under OS X 10.8 through macOS 10.12; however, the current versions of Xcode and the macOS SDK do not contain the header files to compile such programs.

Virtual Network Computing

In computing, Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical-screen updates back in the other direction, over a network.

Bounding volume

In computer graphics and computational geometry, a bounding volume for a set of objects is a closed volume that completely contains the union of the objects in the set. Bounding volumes are used to improve the efficiency of geometrical operations by using simple volumes to contain more complex objects. Normally, simpler volumes have simpler ways to test for overlap.

Direct Rendering Infrastructure software framework

The Direct Rendering Infrastructure (DRI) is a framework for allowing direct access to graphics hardware under the X Window System in a safe, efficient way. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL. DRI has also been adapted to provide OpenGL acceleration on a framebuffer console without a display server running.

In computing, the X Window System is a network-transparent windowing system for bitmap displays. This article details the protocols and technical structure of X11.

Treemapping visualisation of hierchical data

In information visualization and computing, treemapping is a method for displaying hierarchical data using nested figures, usually rectangles.

Xlib X Window System protocol client library written in the C programming language

Xlib 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 details of the protocol. Few applications use Xlib directly; rather, they employ other libraries that use Xlib functions to provide widget toolkits:

Clipping, in the context of computer graphics, is a method to selectively enable or disable rendering operations within a defined region of interest. Mathematically, clipping can be described using the terminology of constructive geometry. A rendering algorithm only draws pixels in the intersection between the clip region and the scene model. Lines and surfaces outside the view volume are removed.

The Cohen–Sutherland algorithm is a computer-graphics algorithm used for line clipping. The algorithm divides a two-dimensional space into 9 regions and then efficiently determines the lines and portions of lines that are visible in the central region of interest.

The X Window System core protocol is the base protocol of the X Window System, which is a networked windowing system for bitmap displays used to build graphical user interfaces on Unix, Unix-like, and other operating systems. The X Window System is based on a client–server model: a single server controls the input/output hardware, such as the screen, the keyboard, and the mouse; all application programs act as clients, interacting with the user and with the other clients via the server. This interaction is regulated by the X Window System core protocol. Other protocols related to the X Window System exist, both built at the top of the X Window System core protocol or as separate protocols.

In human-computer interfaces, the X keyboard extension or XKB is a part of the X Window System that 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:

The MIT Shared Memory Extension or MIT-SHM is a X Window System extension for exchange of image data between client and server using shared memory.

Haar-like features are digital image features used in object recognition. They owe their name to their intuitive similarity with Haar wavelets and were used in the first real-time face detector.

Minimum bounding box

In geometry, the minimum or smallest bounding or enclosing box for a point set (S) in N dimensions is the box with the smallest measure within which all the points lie. When other kinds of measure are used, the minimum box is usually called accordingly, e.g., "minimum-perimeter bounding box".

Wayland (display server protocol) computer display server protocol

Wayland is a computer protocol that specifies the communication between a display server and its clients, as well as a reference implementation of the protocol in the C programming language. A display server using the Wayland protocol is called a Wayland compositor.