1: /* $Header: packet.h,v 10.3 86/02/01 15:47:13 tony Rel $ */
   2: /* packet.h	Packet descriptions for Workstation Graphics Architecture
   3:  *		command packets
   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_PACKET
  39: #define WGA_PACKET
  40: 
  41: typedef struct _CopyAreaMod {
  42:     unsigned : 8;
  43:     unsigned m_source : 3;
  44:     unsigned m_mask : 3;
  45:     unsigned : 3;
  46:     unsigned m_map : 3;
  47:     unsigned m_clipping : 3;
  48: } CopyAreaMod;
  49: 
  50: typedef struct _DrawCurveMod {
  51:     unsigned : 8;
  52:     unsigned m_source : 3;
  53:     unsigned m_mask : 3;
  54:     unsigned : 3;
  55:     unsigned m_map : 3;
  56:     unsigned m_clipping : 3;
  57:     unsigned m_drawMode : 1;
  58:     unsigned m_patState : 2;
  59:     unsigned m_patMode : 2;
  60: } DrawCurveMod;
  61: 
  62: typedef struct _PrintTextMod {
  63:     unsigned : 8;
  64:     unsigned m_source : 3;
  65:     unsigned m_mask: 3;
  66:     unsigned m_dest : 3;
  67:     unsigned m_map : 3;
  68:     unsigned m_clipping : 3;
  69:     unsigned m_textSize : 1;
  70:     unsigned m_control : 1;
  71: } PrintTextMod;
  72: 
  73: typedef struct _FillAreaMod {
  74:     unsigned : 8;
  75:     unsigned m_source : 3;
  76:     unsigned : 6;
  77:     unsigned m_map : 3;
  78:     unsigned m_clipping : 3;
  79: } FillAreaMod;
  80: 
  81: typedef struct _FloodAreaMod {
  82:     unsigned : 8;
  83:     unsigned m_source : 3;
  84:     unsigned : 9;
  85:     unsigned m_clipping : 3;
  86:     unsigned m_boundary : 1;
  87: } FloodAreaMod;
  88: 
  89: typedef struct _LoadCursorMod {
  90:     unsigned : 8;
  91:     unsigned m_source : 3;
  92:     unsigned m_mask : 3;
  93:     unsigned : 3;
  94:     unsigned m_map : 3;
  95: } LoadCursorMod;
  96: 
  97: typedef struct _SetMouseCharacteristicsMod {
  98:     unsigned : 8;
  99:     unsigned m_tracking : 3;
 100: } SetMouseCharacteristicsMod;
 101: 
 102: typedef struct _SetTabletCharacteristicsMod {
 103:     unsigned : 8;
 104:     unsigned m_tracking : 3;
 105: } SetTabletCharacteristicsMod;
 106: 
 107: typedef struct _PacketHeader {
 108:     union {
 109:         struct {
 110:         unsigned _opcode : 8;
 111:         unsigned _modifier : 24;
 112:         } ph;
 113:         long emptymod;
 114:         CopyAreaMod copy;
 115:         DrawCurveMod draw;
 116:         PrintTextMod text;
 117:         FillAreaMod fill;
 118:         FloodAreaMod flood;
 119:         LoadCursorMod cursor;
 120:         SetMouseCharacteristicsMod mouse;
 121:         SetTabletCharacteristicsMod tablet;
 122:     } ph_modifier;
 123:     a_CharPtr ph_next;
 124: } PacketHeader;
 125: 
 126: #define ph_copyMod ph_modifier.copy
 127: #define ph_drawMod ph_modifier.draw
 128: #define ph_textMod ph_modifier.text
 129: #define ph_fillMod ph_modifier.fill
 130: #define ph_floodMod ph_modifier.flood
 131: #define ph_cursorMod ph_modifier.cursor
 132: #define ph_mouseMod ph_modifier.mouse
 133: #define ph_tabletMod ph_modifier.tablet
 134: 
 135: typedef short a_PacketHeader[4];
 136: 
 137: #define ph_opcode ph_modifier.ph._opcode
 138: 
 139: #define COPY_AREA   1
 140: 
 141: typedef struct _CopyAreaPacket {
 142:     a_PacketHeader cap_head;
 143:     union {
 144:         a_SubBitmap image;
 145:         Constant const;
 146:         a_Halftone pattern;
 147:     } cap_source;
 148:     a_SubBitmap cap_sourceMask;
 149:     a_Extent cap_maskSize;
 150:     a_Bitmap cap_destImage;
 151:     a_Point cap_destOffset;
 152:     union {
 153:         a_MapPtr ptr;
 154:         a_Map literal;
 155:     } cap_map;
 156:     union {
 157:         a_RectangleList rectList;
 158:         a_Rectangle litRect;
 159:     } cap_clipping;
 160: } CopyAreaPacket;
 161: 
 162: typedef short a_CopyAreaPacket[33];
 163: 
 164: #define DRAW_CURVE  2
 165: 
 166: typedef struct _DrawCurvePacket {
 167:     a_PacketHeader dcp_head;
 168:     union {
 169:         a_SubBitmap image;
 170:         Constant const;
 171:         a_Halftone pattern;
 172:     } dcp_source;
 173:     a_SubBitmap dcp_sourceMask;
 174:     a_Extent dcp_maskSize;
 175:     a_Bitmap dcp_destImage;
 176:     a_Point dcp_destOffset;
 177:     union {
 178:         a_MapPtr ptr;
 179:         a_Map literal;
 180:     } dcp_map;
 181:     union {
 182:         a_RectangleList rectList;
 183:         a_Rectangle litRect;
 184:     } dcp_clipping;
 185:     a_SegmentList dcp_path;
 186:     a_PatternString dcp_pattern;
 187:     union {
 188:         a_PatternState literal;
 189:         a_PatternStatePtr ptr;
 190:     } dcp_patState;
 191:     union {
 192:         a_SubBitmap image;
 193:         Constant const;
 194:         a_Halftone pattern;
 195:     } dcp_secondSource;
 196: } DrawCurvePacket;
 197: 
 198: typedef short a_DrawCurvePacket[49];
 199: 
 200: #define PRINT_TEXT  3
 201: 
 202: typedef struct _PrintTextPacket {
 203:     a_PacketHeader ptp_head;
 204:     union {
 205:         a_FontPtr font;
 206:         Constant const;
 207:         a_Halftone pattern;
 208:     } ptp_source;
 209:     a_FontPtr ptp_mask;
 210:     short filler[7];
 211:     a_Bitmap ptp_destImage;
 212:     union {
 213:         a_Point literal;
 214:         a_PointPtr ptr;
 215:     } ptp_initialOffset;
 216:     union {
 217:         a_MapPtr ptr;
 218:         a_Map literal;
 219:     } ptp_map;
 220:     union {
 221:         a_RectangleList rectList;
 222:         a_Rectangle litRect;
 223:     } ptp_clipping;
 224:     a_TextString ptp_text;
 225:     a_ControlString ptp_control;
 226:     short ptp_charPad;
 227:     short ptp_spacePad;
 228: } PrintTextPacket;
 229: 
 230: typedef short a_PrintTextPacket[41];
 231: 
 232: #define FILL_AREA   11
 233: 
 234: typedef struct _FillAreaPacket {
 235:     a_PacketHeader fap_head;
 236:     union {
 237:         Constant const;
 238:         a_Halftone pattern;
 239:     } fap_source;
 240:     a_Bitmap fap_destImage;
 241:     a_Point fap_destOffset;
 242:     union {
 243:         a_MapPtr ptr;
 244:         a_Map literal;
 245:     } fap_map;
 246:     a_Rectangle fap_clippingRec;
 247:     a_SegmentList fap_path;
 248: } FillAreaPacket;
 249: 
 250: typedef short a_FillAreaPacket[28];
 251: 
 252: #define FLOOD_AREA  4
 253: 
 254: typedef struct _FloodAreaPacket {
 255:     a_PacketHeader flp_head;
 256:     union {
 257:         Constant const;
 258:         a_Halftone pattern;
 259:     } flp_source;
 260:     a_Bitmap flp_destImage;
 261:     a_Point flp_seed;
 262:     Rectangle flp_clippingRec;
 263:     union {
 264:         a_MapPtr ptr;
 265:         a_Map literal;
 266:     } flp_boundary;
 267: } FloodAreaPacket;
 268: 
 269: typedef short a_FloodAreaPacket[24];
 270: 
 271: #define LOAD_CURSOR 5
 272: 
 273: typedef struct _LoadCursorPacket {
 274:     a_PacketHeader lcp_head;
 275:     union {
 276:         a_SubBitmap image;
 277:         Constant const;
 278:         a_Halftone pattern;
 279:     } lcp_source;
 280:     a_SubBitmap lcp_sourceMask;
 281:     a_Extent lcp_maskSize;
 282:     union {
 283:         a_MapPtr ptr;
 284:         a_Map literal;
 285:     } lcp_map;
 286:     short lcp_blink;
 287:     short lcp_tip_x;
 288:     short lcp_tip_y;
 289:     short lcp_center_x;
 290:     short lcp_center_y;
 291: } LoadCursorPacket;
 292: 
 293: typedef short a_LoadCursorPacket[29];
 294: 
 295: #define SET_CURSOR_POSITION 6
 296: 
 297: typedef struct _SetCursorPositionPacket {
 298:     a_PacketHeader scp_head;
 299:     a_Point scp_position;
 300: } SetCursorPositionPacket;
 301: 
 302: typedef short a_SetCursorPositionPacket[6];
 303: 
 304: #define ATTACH_CURSOR   7
 305: 
 306: typedef struct _AttachCursorPacket {
 307:     a_PacketHeader acp_head;
 308:     short acp_device;
 309: } AttachCursorPacket;
 310: 
 311: typedef short a_AttachCursorPacket[5];
 312: 
 313: #define GET_CURSOR_POSITION 8
 314: 
 315: typedef struct _GetCursorPositionPacket {
 316:     a_PacketHeader gcp_head;
 317:     a_Point gcp_position;
 318: } GetCursorPositionPacket;
 319: 
 320: typedef short a_GetCursorPositionPacket[6];
 321: 
 322: #define MOVE_OBJECT 9
 323: #define MOVE_OBJECT_ROM 128
 324: 
 325: typedef struct _MoveObjectPacket {
 326:     a_PacketHeader mop_head;
 327:     short mop_objectType;
 328:     a_MemSize mop_objectSize;
 329:     a_CharPtr mop_source;
 330:     a_CharPtr mop_dest;
 331: } MoveObjectPacket;
 332: 
 333: typedef short a_MoveObjectPacket[11];
 334: 
 335: #define REPORT_STATUS   10
 336: #define REPORT_STATUS_ROM   129
 337: 
 338: typedef struct _ReportStatusPacket {
 339:     a_PacketHeader rsp_head;
 340:     char rsp_deviceType[4];
 341:     short rsp_deviceVersion;
 342:     short rsp_ucodeVersion;
 343:     a_Bitmap rsp_visibleFramebuffer;
 344:     a_MemArea rsp_freeFramebuffer;
 345:     a_MemArea rsp_freeProgramMemory;
 346:     a_MemArea rsp_hostMemory;
 347: } ReportStatusPacket;
 348: 
 349: typedef short a_ReportStatusPacket[25];
 350: 
 351: #define NO_OPERATION    0
 352: 
 353: typedef struct _NoopPacket {
 354:     a_PacketHeader nop_head;
 355: } NoopPacket;
 356: 
 357: typedef short a_NoopPacket[4];
 358: 
 359: #define GET_MOUSE_POSITION  12
 360: 
 361: typedef struct _GetMousePositionPacket {
 362:     a_PacketHeader gmp_head;
 363:     a_Point gmp_position;
 364: } GetMousePositionPacket;
 365: 
 366: typedef short a_GetMousePositionPacket[6];
 367: 
 368: #define SET_MOUSE_CHARACTERISTICS   13
 369: 
 370: typedef struct _SetMouseCharacteristicsPacket {
 371:     a_PacketHeader smc_head;
 372:     union {
 373:         struct {
 374:             short multiplier;
 375:             short divisor;
 376:         } linear;
 377:         struct {
 378:             short scale;
 379:             short threshold;
 380:         } exponential;
 381:     } tracking;
 382: } SetMouseCharacteristicsPacket;
 383: 
 384: 
 385: #define smc_multiplier tracking.linear.multiplier
 386: #define smc_divisor tracking.linear.divisor
 387: #define smc_threshold tracking.exponential.threshold
 388: #define smc_scale tracking.exponential.scale
 389: 
 390: typedef short a_SetMouseCharacteristicsPacket[6];
 391: 
 392: #define GET_TABLET_POSITION 14
 393: 
 394: typedef struct _GetTabletPositionPacket {
 395:     a_PacketHeader gtp_head;
 396:     a_Point gtp_position;
 397: } GetTabletPositionPacket;
 398: 
 399: typedef short a_GetTabletPositionPacket[6];
 400: 
 401: #define SET_TABLET_CHARACTERISTICS  16
 402: 
 403: typedef struct _SetTabletCharacteristicsPacket {
 404:     a_PacketHeader stc_head;
 405:     union {
 406:         struct {
 407:             short multiplier;
 408:             short divisor;
 409:         } linear;
 410:         struct {
 411:             a_Point input;
 412:             a_Point output;
 413:         } quantized;
 414:     } tracking;
 415: } SetTabletCharacteristicsPacket;
 416: 
 417: #define stc_multiplier tracking.linear.multiplier
 418: #define stc_divisor tracking.linear.divisor
 419: #define stc_input tracking.quantized.input
 420: #define stc_output tracking.quantized.output
 421: 
 422: typedef short a_SetTabletCharacteristicsPacket[8];
 423: 
 424: #define SET_POINTING_DEVICE_REPORTING   15
 425: 
 426: typedef struct _SetPointingDeviceReportingPacket {
 427:     a_PacketHeader spdp_head;
 428:     short spdp_enable;
 429: } SetPointingDeviceReportingPacket;
 430: 
 431: typedef short a_SetPointingDeviceReportingPacket[5];
 432: 
 433: typedef union _Packet {
 434:     a_CopyAreaPacket copyArea;
 435:     a_DrawCurvePacket drawCurve;
 436:     a_PrintTextPacket writeText;
 437:     a_FillAreaPacket fillArea;
 438:     a_FloodAreaPacket floodArea;
 439:     a_LoadCursorPacket loadCursor;
 440:     a_SetCursorPositionPacket setCursor;
 441:     a_AttachCursorPacket attachCursor;
 442:     a_GetCursorPositionPacket getCursor;
 443:     a_MoveObjectPacket moveObject;
 444:     a_ReportStatusPacket reportStatus;
 445:     a_NoopPacket noop;
 446:     a_GetMousePositionPacket getMouse;
 447:     a_SetMouseCharacteristicsPacket setMouse;
 448:     a_GetTabletPositionPacket getTablet;
 449:     a_SetTabletCharacteristicsPacket setTablet;
 450:     a_SetPointingDeviceReportingPacket setPointingDevice;
 451: } Packet;
 452: 
 453: #endif

Defined struct's

_AttachCursorPacket defined in line 306; never used
_CopyAreaMod defined in line 41; never used
_CopyAreaPacket defined in line 141; never used
_DrawCurveMod defined in line 50; never used
_DrawCurvePacket defined in line 166; never used
_FillAreaMod defined in line 73; never used
_FillAreaPacket defined in line 234; never used
_FloodAreaMod defined in line 81; never used
_FloodAreaPacket defined in line 254; never used
_GetCursorPositionPacket defined in line 315; never used
_GetMousePositionPacket defined in line 361; never used
_GetTabletPositionPacket defined in line 394; never used
_LoadCursorMod defined in line 89; never used
_LoadCursorPacket defined in line 273; never used
_MoveObjectPacket defined in line 325; never used
_NoopPacket defined in line 353; never used
_PacketHeader defined in line 107; never used
_PrintTextMod defined in line 62; never used
_PrintTextPacket defined in line 202; never used
_ReportStatusPacket defined in line 338; never used
_SetCursorPositionPacket defined in line 297; never used
_SetMouseCharacteristicsMod defined in line 97; never used
_SetMouseCharacteristicsPacket defined in line 370; never used
_SetPointingDeviceReportingPacket defined in line 426; never used
_SetTabletCharacteristicsMod defined in line 102; never used
_SetTabletCharacteristicsPacket defined in line 403; never used

Defined union's

_Packet defined in line 433; never used

Defined typedef's

AttachCursorPacket defined in line 309; used 3 times
CopyAreaMod defined in line 48; used 1 times
DrawCurveMod defined in line 60; used 1 times
DrawCurvePacket defined in line 196; used 3 times
FillAreaMod defined in line 79; used 1 times
FillAreaPacket defined in line 248; used 7 times
FloodAreaMod defined in line 87; used 1 times
FloodAreaPacket defined in line 267; never used
GetCursorPositionPacket defined in line 318; never used
GetMousePositionPacket defined in line 364; never used
GetTabletPositionPacket defined in line 397; never used
LoadCursorMod defined in line 95; used 1 times
LoadCursorPacket defined in line 291; used 3 times
MoveObjectPacket defined in line 331; used 6 times
NoopPacket defined in line 355; never used
Packet defined in line 451; never used
PrintTextMod defined in line 71; used 1 times
PrintTextPacket defined in line 228; used 9 times
ReportStatusPacket defined in line 347; used 3 times
SetCursorPositionPacket defined in line 300; used 3 times
SetMouseCharacteristicsMod defined in line 100; used 1 times
SetTabletCharacteristicsMod defined in line 105; used 1 times
SetTabletCharacteristicsPacket defined in line 415; never used
a_AttachCursorPacket defined in line 311; used 1 times
a_CopyAreaPacket defined in line 162; used 1 times
a_DrawCurvePacket defined in line 198; used 1 times
a_FillAreaPacket defined in line 250; used 1 times
a_FloodAreaPacket defined in line 269; used 1 times
a_GetCursorPositionPacket defined in line 320; used 1 times
a_GetMousePositionPacket defined in line 366; used 1 times
a_GetTabletPositionPacket defined in line 399; used 1 times
a_LoadCursorPacket defined in line 293; used 1 times
a_MoveObjectPacket defined in line 333; used 1 times
a_NoopPacket defined in line 357; used 1 times
a_PacketHeader defined in line 135; used 17 times
a_PrintTextPacket defined in line 230; used 1 times
a_ReportStatusPacket defined in line 349; used 1 times
a_SetCursorPositionPacket defined in line 302; used 1 times
a_SetMouseCharacteristicsPacket defined in line 390; used 1 times
a_SetPointingDeviceReportingPacket defined in line 431; used 1 times
a_SetTabletCharacteristicsPacket defined in line 422; used 1 times

Defined macros

ATTACH_CURSOR defined in line 304; used 1 times
DRAW_CURVE defined in line 164; used 1 times
FILL_AREA defined in line 232; used 1 times
FLOOD_AREA defined in line 252; never used
GET_CURSOR_POSITION defined in line 313; never used
GET_MOUSE_POSITION defined in line 359; never used
GET_TABLET_POSITION defined in line 392; never used
LOAD_CURSOR defined in line 271; used 1 times
MOVE_OBJECT defined in line 322; used 2 times
MOVE_OBJECT_ROM defined in line 323; used 1 times
NO_OPERATION defined in line 351; never used
PRINT_TEXT defined in line 200; used 3 times
REPORT_STATUS defined in line 335; used 1 times
REPORT_STATUS_ROM defined in line 336; used 1 times
SET_CURSOR_POSITION defined in line 295; used 1 times
SET_MOUSE_CHARACTERISTICS defined in line 368; used 1 times
SET_TABLET_CHARACTERISTICS defined in line 401; never used
WGA_PACKET defined in line 39; used 1 times
  • in line 38
ph_cursorMod defined in line 131; used 4 times
ph_drawMod defined in line 127; used 10 times
ph_fillMod defined in line 129; used 4 times
ph_floodMod defined in line 130; never used
ph_mouseMod defined in line 132; used 1 times
ph_tabletMod defined in line 133; never used
ph_textMod defined in line 128; used 23 times
smc_divisor defined in line 386; never used
smc_multiplier defined in line 385; never used
smc_scale defined in line 388; used 1 times
smc_threshold defined in line 387; used 1 times
stc_divisor defined in line 418; never used
stc_input defined in line 419; never used
stc_multiplier defined in line 417; never used
stc_output defined in line 420; never used

Usage of this include

Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2316
Valid CSS Valid XHTML 1.0 Strict