0023885: Inclusion of X11 header should be protected with macro
[occt.git] / src / Aspect / Aspect_XWD.hxx
1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
2 //
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
7 //
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10 //
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
17
18 #ifndef __Aspect_WNTXWD_HXX
19 # define __Aspect_WNTXWD_HXX
20
21 #if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
22 #  include <X11/XWDFile.h>
23 # else
24
25 # ifdef WORD64
26 #  define B32 :32
27 # else
28 #  define B32
29 # endif  /* WORD64 */
30
31 # define XWD_FILE_VERSION  7
32
33 # define XYBitmap          0
34 # define XYPixmap          1
35 # define ZPixmap           2
36
37 # define LSBFirst          0
38 # define MSBFirst                  1
39
40 # define DoRed             ( 1 << 0 )
41 # define DoGreen           ( 1 << 1 )
42 # define DoBlue            ( 1 << 2 )
43
44 # define StaticGray        0
45 # define GrayScale         1
46 # define StaticColor       2
47 # define PseudoColor       3
48 # define TrueColor         4
49 # define DirectColor       5
50
51 typedef unsigned int CARD32;
52
53 typedef struct _xwd_file_header {
54
55                 CARD32 header_size      B32;
56                                 CARD32 file_version         B32;
57                                 CARD32 pixmap_format    B32;
58                                 CARD32 pixmap_depth     B32;
59                                 CARD32 pixmap_width     B32;
60                                 CARD32 pixmap_height    B32;
61                                 CARD32 xoffset          B32;
62                                 CARD32 byte_order       B32;
63                                 CARD32 bitmap_unit      B32;
64                                 CARD32 bitmap_bit_order B32;
65                                 CARD32 bitmap_pad       B32;
66                                 CARD32 bits_per_pixel   B32;
67                                 CARD32 bytes_per_line   B32;
68                                 CARD32 visual_class     B32;
69                                 CARD32 red_mask         B32;
70                                 CARD32 green_mask       B32;
71                                 CARD32 blue_mask        B32;
72                                 CARD32 bits_per_rgb     B32;
73                                 CARD32 colormap_entries B32;
74                                 CARD32 ncolors          B32;
75                                 CARD32 window_width     B32;
76                                 CARD32 window_height    B32;
77                                 CARD32 window_x         B32;
78                                 CARD32 window_y         B32;
79                                 CARD32 window_bdrwidth  B32;
80 # ifdef WORD64
81                                 CARD32 header_end       B32;
82 # endif  /* WORD64 */
83                } XWDFileHeader;
84
85 typedef struct _xcolor {
86
87                                 unsigned long  pixel;
88                                 unsigned short red;
89                                 unsigned short green;
90                                 unsigned short blue;
91                                 char           flags;
92                                 char           pad;
93
94                } XColor;
95
96 # endif /* WNT */
97 #endif  /* __Aspect_WNTXWD_HXX */