some conditions (for example, if the window is covered). Whenever an area of destroyed content is made visible, the server generates an Expose event to notify the client that a part of the window has to be drawn. Other events can serve to notify clients of keyboard or mouse input, of the creation of new windows, etc. Some kinds of events are always sent to a client, but most kinds of event are sent only if the client previously stated an interest in them, because clients may only be interested in some kind of events. For example, a client may be interested in keyboard-related event but not in mouse-related events. Color modes The way the X Window System handles colors can sometimes confuse users, and historically several different modes have been supported. Most modern applications use full color (24-bit color, 8 bits for each of red, green and blue), but old or specialist applications may require a different color mode. Many commercial specialist applications use PseudoColor. The X11 protocol actually uses a single 32-bit unsigned integer - called a pixelvalue - for representing a single color in most graphic operations. When transferring the intensity of primary colors, a 16 bit integer is used for each color component. The following representations of colors exist; not all of them may be supported on a specific device. DirectColor: A pixel value is decomposed into separate red, green, and blue subfields. Each subfield indexes a separate colormap. Entries in all colormaps can be changed. TrueColor: Same as DirectColor, except that the colormap entries are predefined by the hardware and cannot be changed. Typically, each of the red, green, and blue colormaps provides a (near) linear ramp of intensity. GrayScale: A pixel value indexes a single colormap that contains monochrome intensities. Colormap entries can be changed. StaticGray: Same as GrayScale, except that the colormap entries are predefined by the hardware and cannot be changed. PseudoColor (Chunky): A pixel value indexes a single colormap that contains color intensities. Colormap entries can be changed. StaticColor: Same as PseudoColor, except that the colormap entries are predefined by the hardware and cannot be changed. Xlib and other client libraries Most client programs communicate with the server via the Xlib client library. Beside Xlib, the XCB library operates more closely to X protocol. In particular, most clients use libraries such as Xaw, Motif, GTK+, or Qt which in turn use