|
|
1.1 root 1: /* $Header: param.h,v 10.3 86/02/01 15:47:19 tony Rel $ */
2: /* param.h Definitions for primitive objects in Workstation Graphics
3: * Architecture
4: *
5: * Each object has two definitions. The more human-readable one
6: * has "reasonable" definitions, the one beginning with a_ expresses
7: * the structure as an array of shorts so that the C compiler doesn't
8: * move it around for silly alignment reasons.
9: *
10: * Author: Paul J. Asente
11: * Digital Equipment Corporation
12: * Western Reseach Lab
13: * Date: June 1983
14: */
15:
16: /****************************************************************************
17: * *
18: * Copyright (c) 1983, 1984 by *
19: * DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts. *
20: * All rights reserved. *
21: * *
22: * This software is furnished on an as-is basis and may be used and copied *
23: * only with inclusion of the above copyright notice. This software or any *
24: * other copies thereof may be provided or otherwise made available to *
25: * others only for non-commercial purposes. No title to or ownership of *
26: * the software is hereby transferred. *
27: * *
28: * The information in this software is subject to change without notice *
29: * and should not be construed as a commitment by DIGITAL EQUIPMENT *
30: * CORPORATION. *
31: * *
32: * DIGITAL assumes no responsibility for the use or reliability of its *
33: * software on equipment which is not supplied by DIGITAL. *
34: * *
35: * *
36: ****************************************************************************/
37:
38: #ifndef WGA_PARAMS
39: #define WGA_PARAMS
40:
41: typedef short Constant;
42:
43: typedef struct _Point {
44: short p_x;
45: short p_y;
46: } Point;
47: typedef Point *PointPtr;
48:
49: typedef short a_Point[2];
50: typedef short a_PointPtr[2];
51:
52: typedef struct _Extent {
53: short e_width;
54: short e_height;
55: } Extent;
56:
57: typedef short a_Extent[2];
58:
59: typedef struct _Rectangle {
60: a_Point r_origin;
61: a_Extent r_size;
62: } Rectangle;
63: typedef Rectangle *RectanglePtr;
64:
65: typedef short a_Rectangle[4];
66: typedef short a_RectanglePtr[2];
67:
68: #define r_x r_origin[0]
69: #define r_y r_origin[1]
70: #define r_width r_size[0]
71: #define r_height r_size[1]
72:
73: typedef struct _RectangleList {
74: a_RectanglePtr r_first;
75: short r_count;
76: } RectangleList;
77:
78: typedef short a_RectangleList[3];
79:
80: typedef short BitmapEntry;
81: typedef BitmapEntry *BitmapEntryPtr;
82:
83: typedef short a_BitmapEntryPtr[2];
84:
85: typedef struct _Bitmap {
86: a_BitmapEntryPtr bm_address;
87: short bm_width;
88: short bm_height;
89: short bm_bitsPerPixel;
90: } BitMap;
91:
92: typedef short a_Bitmap[5];
93:
94: typedef struct _SubBitmap {
95: a_Bitmap sb_base;
96: a_Point sb_offset;
97: } SubBitmap;
98:
99: typedef short a_SubBitmap[7];
100:
101: #define sb_address sb_base
102: #define sb_width sb_base[2]
103: #define sb_height sb_base[3]
104: #define sb_bitsPerPixel sb_base[4]
105: #define sb_x sb_offset[0]
106: #define sb_y sb_offset[1]
107:
108: typedef struct _Halftone {
109: a_Bitmap ht_base;
110: a_Point ht_offset;
111: } Halftone;
112:
113: typedef short a_Halftone[7];
114:
115: #define ht_address ht_base
116: #define ht_width ht_base[2]
117: #define ht_height ht_base[3]
118: #define ht_bitsPerPixel ht_base[4]
119: #define ht_x ht_offset[0]
120: #define ht_y ht_offset[1]
121:
122: typedef long Map;
123: typedef Map *MapPtr;
124: typedef short a_Map[2];
125: typedef short a_MapPtr[2];
126:
127: typedef struct _Segment {
128: a_Point seg_p;
129: short seg_flags;
130: } Segment;
131: typedef Segment *SegmentPtr;
132:
133: typedef short a_Segment[3];
134: typedef short a_SegmentPtr[2];
135:
136: #define seg_x seg_p[0]
137: #define seg_y seg_p[1]
138:
139: /* Meanings of bits in seg_flags. Bit on means the predicate is true */
140:
141: #define seg_relative 0x0001
142: #define seg_dontDraw 0x0002
143: #define seg_curved 0x0004
144: #define seg_startClosed 0x0008
145: #define seg_endClosed 0x0010
146: #define seg_drawLastPoint 0x0020
147:
148: typedef struct _SegmentList {
149: a_SegmentPtr seg_first;
150: short seg_count;
151: } SegmentList;
152:
153: typedef short a_SegmentList[3];
154:
155: typedef struct _PatternString {
156: short p_length;
157: unsigned short p_pattern;
158: short p_multiplier;
159: } PatternString;
160:
161: typedef short a_PatternString[3];
162:
163: typedef struct _PatternState {
164: short p_position;
165: short p_count;
166: } PatternState;
167: typedef PatternState *PatternStatePtr;
168:
169: typedef short a_PatternState[2];
170: typedef short a_PatternStatePtr[2];
171:
172: typedef short FontWidthEntry;
173: typedef FontWidthEntry *FontWidthEntryPtr;
174: typedef short a_FontWidthEntryPtr[2];
175:
176: typedef struct _FontData {
177: a_Bitmap f_characters;
178: short f_firstChar;
179: short f_lastChar;
180: a_FontWidthEntryPtr f_leftArray;
181: short f_baseline;
182: short f_spaceIndex;
183: short f_fixedWidth;
184: } FontData;
185: typedef FontData *FontPtr;
186:
187: typedef short a_FontData[12];
188: typedef short a_FontPtr[2];
189:
190: typedef char *CharPtr;
191: typedef short a_CharPtr[2];
192:
193: typedef struct _TextString {
194: a_CharPtr t_first;
195: short t_count;
196: } TextString;
197:
198: typedef short a_TextString[3];
199:
200: typedef short ControlElement;
201: typedef ControlElement *ControlElementPtr;
202: typedef short a_ControlElementPtr[2];
203:
204: typedef struct _ControlString {
205: a_ControlElementPtr c_first;
206: short c_count;
207: } ControlString;
208:
209: typedef short a_ControlString[3];
210:
211: typedef long MemSize;
212: typedef short a_MemSize[2];
213:
214: typedef struct _MemArea {
215: a_CharPtr m_base;
216: a_MemSize m_size;
217: } MemArea;
218:
219: typedef short a_MemArea[4];
220:
221:
222:
223: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.