VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/X11/XWDFile.h@ 18709

Last change on this file since 18709 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 3.9 KB
Line 
1/* $Xorg: XWDFile.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
2/*
3
4Copyright 1985, 1986, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26*/
27
28/*
29 * XWDFile.h MIT Project Athena, X Window system window raster
30 * image dumper, dump file format header file.
31 *
32 * Author: Tony Della Fera, DEC
33 * 27-Jun-85
34 *
35 * Modifier: William F. Wyatt, SAO
36 * 18-Nov-86 - version 6 for saving/restoring color maps
37 */
38
39#ifndef XWDFILE_H
40#define XWDFILE_H
41
42#include <X11/Xmd.h>
43
44#define XWD_FILE_VERSION 7
45#define sz_XWDheader 100
46#define sz_XWDColor 12
47
48typedef CARD32 xwdval; /* for old broken programs */
49
50/* Values in the file are most significant byte first. */
51
52typedef struct _xwd_file_header {
53 /* header_size = SIZEOF(XWDheader) + length of null-terminated
54 * window name. */
55 CARD32 header_size B32;
56
57 CARD32 file_version B32; /* = XWD_FILE_VERSION above */
58 CARD32 pixmap_format B32; /* ZPixmap or XYPixmap */
59 CARD32 pixmap_depth B32; /* Pixmap depth */
60 CARD32 pixmap_width B32; /* Pixmap width */
61 CARD32 pixmap_height B32; /* Pixmap height */
62 CARD32 xoffset B32; /* Bitmap x offset, normally 0 */
63 CARD32 byte_order B32; /* of image data: MSBFirst, LSBFirst */
64
65 /* bitmap_unit applies to bitmaps (depth 1 format XY) only.
66 * It is the number of bits that each scanline is padded to. */
67 CARD32 bitmap_unit B32;
68
69 CARD32 bitmap_bit_order B32; /* bitmaps only: MSBFirst, LSBFirst */
70
71 /* bitmap_pad applies to pixmaps (non-bitmaps) only.
72 * It is the number of bits that each scanline is padded to. */
73 CARD32 bitmap_pad B32;
74
75 CARD32 bits_per_pixel B32; /* Bits per pixel */
76
77 /* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps)
78 * or bitmap_pad (pixmaps). It is the delta (in bytes) to get
79 * to the same x position on an adjacent row. */
80 CARD32 bytes_per_line B32;
81 CARD32 visual_class B32; /* Class of colormap */
82 CARD32 red_mask B32; /* Z red mask */
83 CARD32 green_mask B32; /* Z green mask */
84 CARD32 blue_mask B32; /* Z blue mask */
85 CARD32 bits_per_rgb B32; /* Log2 of distinct color values */
86 CARD32 colormap_entries B32; /* Number of entries in colormap; not used? */
87 CARD32 ncolors B32; /* Number of XWDColor structures */
88 CARD32 window_width B32; /* Window width */
89 CARD32 window_height B32; /* Window height */
90 CARD32 window_x B32; /* Window upper left X coordinate */
91 CARD32 window_y B32; /* Window upper left Y coordinate */
92 CARD32 window_bdrwidth B32; /* Window border width */
93} XWDFileHeader;
94
95/* Null-terminated window name follows the above structure. */
96
97/* Next comes XWDColor structures, at offset XWDFileHeader.header_size in
98 * the file. XWDFileHeader.ncolors tells how many XWDColor structures
99 * there are.
100 */
101
102typedef struct {
103 CARD32 pixel B32;
104 CARD16 red B16;
105 CARD16 green B16;
106 CARD16 blue B16;
107 CARD8 flags;
108 CARD8 pad;
109} XWDColor;
110
111/* Last comes the image data in the format described by XWDFileHeader. */
112
113#endif /* XWDFILE_H */
114
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette