rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / rasterfile / src / rasterfile.h
blobb216d5630d7b50ddb2d0ebf9e29e46e67cc87ab7
1 /* Copyright (c) 1989, 1991, Oracle and/or its affiliates. All rights reserved.
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice (including the next
11 * paragraph) shall be included in all copies or substantial portions of the
12 * Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
25 * Description of header for files containing raster images
28 #ifndef _rasterfile_h
29 #define _rasterfile_h
31 struct rasterfile {
32 int ras_magic; /* magic number */
33 int ras_width; /* width (pixels) of image */
34 int ras_height; /* height (pixels) of image */
35 int ras_depth; /* depth (1, 8, or 24 bits) of pixel */
36 int ras_length; /* length (bytes) of image */
37 int ras_type; /* type of file; see RT_* below */
38 int ras_maptype; /* type of colormap; see RMT_* below */
39 int ras_maplength; /* length (bytes) of following map */
40 /* color map follows for ras_maplength bytes, followed by image */
42 #define RAS_MAGIC 0x59a66a95
44 /* Sun supported ras_type's */
45 #define RT_OLD 0 /* Raw pixrect image in 68000 byte order */
46 #define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */
47 #define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */
48 #define RT_FORMAT_RGB 3 /* XRGB or RGB instead of XBGR or BGR */
49 #define RT_FORMAT_TIFF 4 /* tiff <-> standard rasterfile */
50 #define RT_FORMAT_IFF 5 /* iff (TAAC format) <-> standard rasterfile */
51 #define RT_EXPERIMENTAL 0xffff /* Reserved for testing */
53 /* Sun registered ras_maptype's */
54 #define RMT_RAW 2
55 /* Sun supported ras_maptype's */
56 #define RMT_NONE 0 /* ras_maplength is expected to be 0 */
57 #define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */
60 * NOTES:
61 * Each line of the image is rounded out to a multiple of 16 bits.
62 * This corresponds to the rounding convention used by the memory pixrect
63 * package (/usr/include/pixrect/memvar.h) of the SunWindows system.
64 * The ras_encoding field (always set to 0 by Sun's supported software)
65 * was renamed to ras_length in release 2.0. As a result, rasterfiles
66 * of type 0 generated by the old software claim to have 0 length; for
67 * compatibility, code reading rasterfiles must be prepared to compute the
68 * true length from the width, height, and depth fields.
71 #endif /*!_rasterfile_h*/