The GrayScale define in X.h conflicts with the name of an enum member in the Qt library's QtGui/qpixelformat.h, such that including both headers would result in a compile error.
This commit adds an X prefix to the GrayScale define, as well as certain other defines related to it (for consistency) to avoid this naming conflict. Signed-off-by: Axel Rasmussen <[email protected]> --- X.h | 13 +++++---- specs/encoding.xml | 12 ++++----- specs/glossary.xml | 58 ++++++++++++++++++++-------------------- specs/sect1-9.xml | 78 +++++++++++++++++++++++++++--------------------------- 4 files changed, 80 insertions(+), 81 deletions(-) diff --git a/X.h b/X.h index 5cf695d..dd396c9 100644 --- a/X.h +++ b/X.h @@ -701,13 +701,12 @@ are reserved in the protocol for errors and replies. */ * Note that the statically allocated ones are even numbered and the * dynamically changeable ones are odd numbered */ -#define StaticGray 0 -#define GrayScale 1 -#define StaticColor 2 -#define PseudoColor 3 -#define TrueColor 4 -#define DirectColor 5 - +#define XStaticGray 0 +#define XGrayScale 1 +#define XStaticColor 2 +#define XPseudoColor 3 +#define XTrueColor 4 +#define XDirectColor 5 /* Byte order used in imageByteOrder and bitmapBitOrder */ diff --git a/specs/encoding.xml b/specs/encoding.xml index 0c6ef02..566e423 100644 --- a/specs/encoding.xml +++ b/specs/encoding.xml @@ -923,12 +923,12 @@ DEPTH VISUALTYPE 4 VISUALID visual-id 1 class - 0 StaticGray - 1 GrayScale - 2 StaticColor - 3 PseudoColor - 4 TrueColor - 5 DirectColor + 0 XStaticGray + 1 XGrayScale + 2 XStaticColor + 3 XPseudoColor + 4 XTrueColor + 5 XDirectColor 1 CARD8 bits-per-rgb-value 2 CARD16 colormap-entries 4 CARD32 red-mask diff --git a/specs/glossary.xml b/specs/glossary.xml index 61233e3..a3c9c39 100644 --- a/specs/glossary.xml +++ b/specs/glossary.xml @@ -299,12 +299,12 @@ The core protocol only deals with two devices, </para> </glossdef> </glossentry> -<glossentry id="glossary:DirectColor"> - <glossterm>DirectColor</glossterm> - <indexterm zone="glossary:DirectColor" significance="preferred"><primary>DirectColor</primary></indexterm> +<glossentry id="glossary:XDirectColor"> + <glossterm>XDirectColor</glossterm> + <indexterm zone="glossary:XDirectColor" significance="preferred"><primary>XDirectColor</primary></indexterm> <glossdef> <para> -<emphasis role='bold'>DirectColor</emphasis> +<emphasis role='bold'>XDirectColor</emphasis> is a class of colormap in which a pixel value is decomposed into three separate subfields for indexing. The first subfield indexes an array to produce red intensity values. @@ -519,14 +519,14 @@ and <glossterm linkend="glossary:Window_gravity">window gravity</glossterm>. </para> </glossdef> </glossentry> -<glossentry id="glossary:GrayScale"> - <glossterm>GrayScale</glossterm> - <indexterm zone="glossary:GrayScale" significance="preferred"><primary>GrayScale</primary></indexterm> +<glossentry id="glossary:XGrayScale"> + <glossterm>XGrayScale</glossterm> + <indexterm zone="glossary:XGrayScale" significance="preferred"><primary>XGrayScale</primary></indexterm> <glossdef> <para> -<emphasis role='bold'>GrayScale</emphasis> +<emphasis role='bold'>XGrayScale</emphasis> can be viewed as a degenerate case of -<glossterm linkend="glossary:PseudoColor"><emphasis role='bold'>PseudoColor</emphasis></glossterm>, +<glossterm linkend="glossary:XPseudoColor"><emphasis role='bold'>XPseudoColor</emphasis></glossterm>, in which the red, green, and blue values in any given colormap entry are equal, thus producing shades of gray. The gray values can be changed dynamically. @@ -698,7 +698,7 @@ ShiftLock, and similar keys are called modifier keys. <glossdef> <para> Monochrome is a special case of -<glossterm linkend="glossary:StaticGray"><emphasis role='bold'>StaticGray</emphasis></glossterm> +<glossterm linkend="glossary:XStaticGray"><emphasis role='bold'>XStaticGray</emphasis></glossterm> in which there are only two colormap entries. <!-- .KE --> </para> @@ -885,12 +885,12 @@ been defined for the window. </para> </glossdef> </glossentry> -<glossentry id="glossary:PseudoColor"> - <glossterm>PseudoColor</glossterm> - <indexterm zone="glossary:PseudoColor" significance="preferred"><primary>PseudoColor</primary></indexterm> +<glossentry id="glossary:XPseudoColor"> + <glossterm>XPseudoColor</glossterm> + <indexterm zone="glossary:XPseudoColor" significance="preferred"><primary>XPseudoColor</primary></indexterm> <glossdef> <para> -<emphasis role='bold'>PseudoColor</emphasis> +<emphasis role='bold'>XPseudoColor</emphasis> is a class of colormap in which a pixel value indexes the colormap to produce independent red, green, and blue values; that is, the colormap is viewed as an array of triples (RGB values). @@ -1121,27 +1121,27 @@ The relationship between sibling windows is known as the stacking order. </para> </glossdef> </glossentry> -<glossentry id="glossary:StaticColor"> - <glossterm>StaticColor</glossterm> - <indexterm zone="glossary:StaticColor" significance="preferred"><primary>StaticColor</primary></indexterm> +<glossentry id="glossary:XStaticColor"> + <glossterm>XStaticColor</glossterm> + <indexterm zone="glossary:XStaticColor" significance="preferred"><primary>XStaticColor</primary></indexterm> <glossdef> <para> -<emphasis role='bold'>StaticColor</emphasis> +<emphasis role='bold'>XStaticColor</emphasis> can be viewed as a degenerate case of -<glossterm linkend="glossary:PseudoColor"><emphasis role='bold'>PseudoColor</emphasis></glossterm> +<glossterm linkend="glossary:XPseudoColor"><emphasis role='bold'>XPseudoColor</emphasis></glossterm> in which the RGB values are predefined and read-only. <!-- .KE --> </para> </glossdef> </glossentry> -<glossentry id="glossary:StaticGray"> - <glossterm>StaticGray</glossterm> - <indexterm zone="glossary:StaticGray" significance="preferred"><primary>StaticGray</primary></indexterm> +<glossentry id="glossary:XStaticGray"> + <glossterm>XStaticGray</glossterm> + <indexterm zone="glossary:XStaticGray" significance="preferred"><primary>XStaticGray</primary></indexterm> <glossdef> <para> -<emphasis role='bold'>StaticGray</emphasis> +<emphasis role='bold'>XStaticGray</emphasis> can be viewed as a degenerate case of -<glossterm linkend="glossary:GrayScale"><emphasis role='bold'>GrayScale</emphasis></glossterm> +<glossterm linkend="glossary:XGrayScale"><emphasis role='bold'>XGrayScale</emphasis></glossterm> in which the gray values are predefined and read-only. The values are typically linear or near-linear increasing ramps. <!-- .KE --> @@ -1213,14 +1213,14 @@ server time. </para> </glossdef> </glossentry> -<glossentry id="glossary:TrueColor"> - <glossterm>TrueColor</glossterm> - <indexterm zone="glossary:TrueColor" significance="preferred"><primary>TrueColor</primary></indexterm> +<glossentry id="glossary:XTrueColor"> + <glossterm>XTrueColor</glossterm> + <indexterm zone="glossary:XTrueColor" significance="preferred"><primary>XTrueColor</primary></indexterm> <glossdef> <para> -<emphasis role='bold'>TrueColor</emphasis> +<emphasis role='bold'>XTrueColor</emphasis> can be viewed as a degenerate case of -<glossterm linkend="glossary:DirectColor"><emphasis role='bold'>DirectColor</emphasis></glossterm> +<glossterm linkend="glossary:XDirectColor"><emphasis role='bold'>XDirectColor</emphasis></glossterm> in which the subfields in the pixel value directly encode the corresponding RGB values; that is, the colormap has predefined read-only RGB values. diff --git a/specs/sect1-9.xml b/specs/sect1-9.xml index f8e8b7c..a1b5caa 100644 --- a/specs/sect1-9.xml +++ b/specs/sect1-9.xml @@ -1419,8 +1419,8 @@ scanline-pad: {8, 16, 32}] <row> <entry></entry> <entry> -class: {StaticGray, StaticColor, TrueColor, GrayScale, -PseudoColor, DirectColor} +class: {XStaticGray, XStaticColor, XTrueColor, XGrayScale, +XPseudoColor, XDirectColor} </entry> </row> <row> @@ -1680,45 +1680,45 @@ more than one screen. <indexterm zone="colormap_types" significance="preferred"><primary>Colormap</primary><secondary>types</secondary></indexterm> <indexterm zone="colormap_types"><primary>Pixel value</primary></indexterm> For -<emphasis role='bold'>PseudoColor</emphasis>, +<emphasis role='bold'>XPseudoColor</emphasis>, a pixel value indexes a colormap to produce independent RGB values; the RGB values can be changed dynamically. -<emphasis role='bold'>GrayScale</emphasis> +<emphasis role='bold'>XGrayScale</emphasis> is treated in the same way as -<emphasis role='bold'>PseudoColor</emphasis> +<emphasis role='bold'>XPseudoColor</emphasis> except which primary drives the screen is undefined; thus, the client should always store the same value for red, green, and blue in colormaps. For -<emphasis role='bold'>DirectColor</emphasis>, +<emphasis role='bold'>XDirectColor</emphasis>, a pixel value is decomposed into separate RGB subfields, and each subfield separately indexes the colormap for the corresponding value. The RGB values can be changed dynamically. -<emphasis role='bold'>TrueColor</emphasis> +<emphasis role='bold'>XTrueColor</emphasis> is treated in the same way as -<emphasis role='bold'>DirectColor</emphasis> +<emphasis role='bold'>XDirectColor</emphasis> except the colormap has predefined read-only RGB values. These values are server-dependent but provide linear or near-linear increasing ramps in each primary. -<emphasis role='bold'>StaticColor</emphasis> +<emphasis role='bold'>XStaticColor</emphasis> is treated in the same way as -<emphasis role='bold'>PseudoColor</emphasis> +<emphasis role='bold'>XPseudoColor</emphasis> except the colormap has predefined read-only RGB values, which are server-dependent. -<emphasis role='bold'>StaticGray</emphasis> +<emphasis role='bold'>XStaticGray</emphasis> is treated in the same way as -<emphasis role='bold'>StaticColor</emphasis> +<emphasis role='bold'>XStaticColor</emphasis> except the red, green, and blue values are equal for any single pixel value, resulting in shades of gray. -<emphasis role='bold'>StaticGray</emphasis> +<emphasis role='bold'>XStaticGray</emphasis> with a two-entry colormap can be thought of as monochrome. </para> <para> The red-mask, green-mask, and blue-mask are only defined for -<emphasis role='bold'>DirectColor</emphasis> +<emphasis role='bold'>XDirectColor</emphasis> and -<emphasis role='bold'>TrueColor</emphasis>. +<emphasis role='bold'>XTrueColor</emphasis>. Each has one contiguous set of bits set to 1 with no intersections. Usually each mask has the same number of bits set to 1. </para> @@ -1745,9 +1745,9 @@ Colormap entries are indexed from 0. The colormap-entries defines the number of available colormap entries in a newly created colormap. For -<emphasis role='bold'>DirectColor</emphasis> +<emphasis role='bold'>XDirectColor</emphasis> and -<emphasis role='bold'>TrueColor</emphasis>, +<emphasis role='bold'>XTrueColor</emphasis>, this will usually be 2 to the power of the maximum number of bits set to 1 in red-mask, green-mask, and blue-mask. </para> @@ -9857,23 +9857,23 @@ The visual type must be one supported by the screen (or a <emphasis role='bold'>Match</emphasis> error results). The initial values of the colormap entries are undefined for classes -<emphasis role='bold'>GrayScale</emphasis>, -<emphasis role='bold'>PseudoColor</emphasis>, +<emphasis role='bold'>XGrayScale</emphasis>, +<emphasis role='bold'>XPseudoColor</emphasis>, and -<emphasis role='bold'>DirectColor</emphasis>. +<emphasis role='bold'>XDirectColor</emphasis>. For -<emphasis role='bold'>StaticGray</emphasis>, -<emphasis role='bold'>StaticColor</emphasis>, +<emphasis role='bold'>XStaticGray</emphasis>, +<emphasis role='bold'>XStaticColor</emphasis>, and -<emphasis role='bold'>TrueColor</emphasis>, +<emphasis role='bold'>XTrueColor</emphasis>, the entries will have defined values, but those values are specific to the visual and are not defined by the core protocol. For -<emphasis role='bold'>StaticGray</emphasis>, -<emphasis role='bold'>StaticColor</emphasis>, +<emphasis role='bold'>XStaticGray</emphasis>, +<emphasis role='bold'>XStaticColor</emphasis>, and -<emphasis role='bold'>TrueColor</emphasis>, +<emphasis role='bold'>XTrueColor</emphasis>, alloc must be specified as <emphasis role='bold'>None</emphasis> (or a @@ -9890,15 +9890,15 @@ If alloc is then the entire colormap is allocated writable. The initial values of all allocated entries are undefined. For -<emphasis role='bold'>GrayScale</emphasis> +<emphasis role='bold'>XGrayScale</emphasis> and -<emphasis role='bold'>PseudoColor</emphasis>, +<emphasis role='bold'>XPseudoColor</emphasis>, the effect is as if an <link linkend="requests:AllocColorCells"><emphasis role='bold'>AllocColorCells</emphasis></link> request returned all pixel values from zero to N - 1, where N is the colormap-entries value in the specified visual. For -<emphasis role='bold'>DirectColor</emphasis>, +<emphasis role='bold'>XDirectColor</emphasis>, the effect is as if an <link linkend="requests:AllocColorPlanes"><emphasis role='bold'>AllocColorPlanes</emphasis></link> request returned a pixel value of zero and red-mask, @@ -10390,21 +10390,21 @@ By ORing together masks and pixels, C*%2 sup P% distinct pixels can be produced; all of these are allocated writable by the request. For -<emphasis role='bold'>GrayScale</emphasis> +<emphasis role='bold'>XGrayScale</emphasis> or -<emphasis role='bold'>PseudoColor</emphasis>, +<emphasis role='bold'>XPseudoColor</emphasis>, each mask will have exactly one bit set to 1; for -<emphasis role='bold'>DirectColor</emphasis>, +<emphasis role='bold'>XDirectColor</emphasis>, each will have exactly three bits set to 1. If contiguous is <emphasis role='bold'>True</emphasis> and if all masks are ORed together, a single contiguous set of bits will be formed for -<emphasis role='bold'>GrayScale</emphasis> +<emphasis role='bold'>XGrayScale</emphasis> or -<emphasis role='bold'>PseudoColor</emphasis>, +<emphasis role='bold'>XPseudoColor</emphasis>, and three contiguous sets of bits (one within each pixel subfield) for -<emphasis role='bold'>DirectColor</emphasis>. +<emphasis role='bold'>XDirectColor</emphasis>. The RGB values of the allocated entries are undefined. <!-- .sp --> </para> @@ -10480,7 +10480,7 @@ then each mask will have a contiguous set of bits. No mask will have any bits in common with any other mask or with any of the pixels. For -<emphasis role='bold'>DirectColor</emphasis>, +<emphasis role='bold'>XDirectColor</emphasis>, each mask will lie within the corresponding pixel subfield. By ORing together subsets of masks with pixels, C*%2 sup R+G+B% distinct pixels can be produced; @@ -10491,7 +10491,7 @@ there are only C*%2 sup R% independent red entries, C*%2 sup G% independent green entries, and C*%2 sup B% independent blue entries. This is true even for -<emphasis role='bold'>PseudoColor</emphasis>. +<emphasis role='bold'>XPseudoColor</emphasis>. When the colormap entry for a pixel value is changed using <link linkend="requests:StoreColors"><emphasis role='bold'>StoreColors</emphasis></link> or @@ -10928,9 +10928,9 @@ Errors: This request creates a cursor and associates identifier cid with it. The foreground and background RGB values must be specified, even if the server only has a -<emphasis role='bold'>StaticGray</emphasis> +<emphasis role='bold'>XStaticGray</emphasis> or -<emphasis role='bold'>GrayScale</emphasis> +<emphasis role='bold'>XGrayScale</emphasis> screen. The foreground is used for the bits set to 1 in the source, and the background is used for the bits set to 0. -- 1.8.5.5 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
