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