0024428: Implementation of LGPL license
[occt.git] / src / Aspect / Aspect_XWD.hxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
973c2be1 5// This library is free software; you can redistribute it and / or modify it
6// under the terms of the GNU Lesser General Public version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14#ifndef __Aspect_WNTXWD_HXX
15# define __Aspect_WNTXWD_HXX
16
87225ffd 17#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
7fd59977 18# include <X11/XWDFile.h>
19# else
20
21# ifdef WORD64
22# define B32 :32
23# else
24# define B32
25# endif /* WORD64 */
26
27# define XWD_FILE_VERSION 7
28
29# define XYBitmap 0
30# define XYPixmap 1
31# define ZPixmap 2
32
33# define LSBFirst 0
34# define MSBFirst 1
35
36# define DoRed ( 1 << 0 )
37# define DoGreen ( 1 << 1 )
38# define DoBlue ( 1 << 2 )
39
40# define StaticGray 0
41# define GrayScale 1
42# define StaticColor 2
43# define PseudoColor 3
44# define TrueColor 4
45# define DirectColor 5
46
47typedef unsigned int CARD32;
48
49typedef struct _xwd_file_header {
50
51 CARD32 header_size B32;
52 CARD32 file_version B32;
53 CARD32 pixmap_format B32;
54 CARD32 pixmap_depth B32;
55 CARD32 pixmap_width B32;
56 CARD32 pixmap_height B32;
57 CARD32 xoffset B32;
58 CARD32 byte_order B32;
59 CARD32 bitmap_unit B32;
60 CARD32 bitmap_bit_order B32;
61 CARD32 bitmap_pad B32;
62 CARD32 bits_per_pixel B32;
63 CARD32 bytes_per_line B32;
64 CARD32 visual_class B32;
65 CARD32 red_mask B32;
66 CARD32 green_mask B32;
67 CARD32 blue_mask B32;
68 CARD32 bits_per_rgb B32;
69 CARD32 colormap_entries B32;
70 CARD32 ncolors B32;
71 CARD32 window_width B32;
72 CARD32 window_height B32;
73 CARD32 window_x B32;
74 CARD32 window_y B32;
75 CARD32 window_bdrwidth B32;
76# ifdef WORD64
77 CARD32 header_end B32;
78# endif /* WORD64 */
79 } XWDFileHeader;
80
81typedef struct _xcolor {
82
83 unsigned long pixel;
84 unsigned short red;
85 unsigned short green;
86 unsigned short blue;
87 char flags;
88 char pad;
89
90 } XColor;
91
92# endif /* WNT */
93#endif /* __Aspect_WNTXWD_HXX */