1 /* $XConsortium: phigs.h,v 5.10 91/08/23 17:16:47 hersh Exp $ */ 2 3 /*********************************************************** 4 Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium. 5 6 All Rights Reserved 7 8 Permission to use, copy, modify, and distribute this software and its 9 documentation for any purpose and without fee is hereby granted, 10 provided that the above copyright notice appear in all copies and that 11 both that copyright notice and this permission notice appear in 12 supporting documentation, and that the names of Sun Microsystems, 13 the X Consortium, and MIT not be used in advertising or publicity 14 pertaining to distribution of the software without specific, written 15 prior permission. 16 17 SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 18 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 19 SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 20 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 21 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 22 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 23 SOFTWARE. 24 ******************************************************************/ 25 26 #ifndef PHIGS_H_INCLUDED 27 #define PHIGS_H_INCLUDED 28 29 #include <X11/Xlib.h> 30 #include <X11/Xutil.h> 31 #include <X11/Xresource.h> 32 #include <stdio.h> 33 /* #include <sys/types.h> Xlib.h does this */ 34 #include "attr.h" 35 #include "phigscfunc.h" 36 #include "phigsextrn.h" 37 #include "phigserr.h" 38 39 #ifdef min 40 #undef min 41 #endif 42 43 #ifdef max 44 #undef max 45 #endif 46 47 #ifdef major 48 #undef major 49 #endif 50 51 #ifdef minor 52 #undef minor 53 #endif 54 55 #ifndef FALSE 56 #define FALSE 0 57 #endif 58 #ifndef TRUE 59 #define TRUE 1 60 #endif 61 62 #if NeedFunctionPrototypes 63 typedef void * Pconnid; 64 #else 65 typedef char * Pconnid; 66 #endif 67 68 69 typedef struct { 70 Display *display; 71 XID drawable_id; 72 } Pconnid_x_drawable; 73 74 typedef int Pint; 75 76 typedef long Plong; 77 78 typedef float Pfloat; 79 80 #if NeedFunctionPrototypes 81 typedef void *Pstore; 82 #else 83 typedef char *Pstore; 84 #endif 85 86 typedef Pfloat Pmatrix3[4][4]; 87 88 typedef Pfloat Pmatrix[3][3]; 89 90 /* These are the base ws types */ 91 extern Pint phigs_ws_type_x_tool; 92 extern Pint phigs_ws_type_x_drawable; 93 94 typedef enum { 95 PWS_INDEP, 96 PWS_DEP 97 } Pws_dep_ind; 98 99 typedef enum { 100 PSYS_ST_PHCL, 101 PSYS_ST_PHOP 102 } Psys_st; 103 104 typedef enum { 105 PWS_ST_WSCL, 106 PWS_ST_WSOP 107 } Pws_st; 108 109 typedef enum { 110 PSTRUCT_ST_STCL, 111 PSTRUCT_ST_STOP 112 } Pstruct_st; 113 114 typedef enum { 115 PSTRUCT_STATUS_NON_EXISTENT, 116 PSTRUCT_STATUS_EMPTY, 117 PSTRUCT_STATUS_NOT_EMPTY 118 } Pstruct_status; 119 120 typedef enum { 121 PST_ARCL, 122 PST_AROP 123 } Par_st; 124 125 typedef enum { 126 PCLASS_VEC, 127 PCLASS_RASTER, 128 PCLASS_OTHER 129 } Pws_class; 130 131 typedef enum { 132 PCAT_OUT, 133 PCAT_IN, 134 PCAT_OUTIN, 135 PCAT_MO, 136 PCAT_MI 137 } Pws_cat; 138 139 typedef enum { 140 PFLAG_COND, 141 PFLAG_ALWAYS 142 } Pctrl_flag; 143 144 typedef enum { 145 PFLAG_POSTPONE, 146 PFLAG_PERFORM 147 } Pregen_flag; 148 149 typedef enum { 150 PDEFER_ASAP, 151 PDEFER_BNIG, 152 PDEFER_BNIL, 153 PDEFER_ASTI, 154 PDEFER_WAIT 155 } Pdefer_mode; 156 157 typedef enum { 158 PDISTING_NO, 159 PDISTING_YES 160 } Pdisting_mode; 161 162 typedef enum { 163 PCULL_NONE, 164 PCULL_BACKFACE, 165 PCULL_FRONTFACE 166 } Pcull_mode; 167 168 typedef enum { 169 PMODE_NIVE, 170 PMODE_UWOR, 171 PMODE_UQUM 172 } Pmod_mode; 173 174 typedef enum { 175 PSIMULT_NO_MORE, 176 PSIMULT_MORE 177 } Pmore_simult_events; 178 179 typedef enum { 180 PNET_CSS, 181 PNET_AR 182 } Pstruct_net_source; 183 184 typedef enum { 185 PSURF_NOT_EMPTY, 186 PSURF_EMPTY 187 } Pdisp_surf_empty; 188 189 typedef enum { 190 PVISUAL_ST_CORRECT, 191 PVISUAL_ST_DEFER, 192 PVISUAL_ST_SIMULATED 193 } Pvisual_st; 194 195 typedef enum { 196 PPREC_STRING, 197 PPREC_CHAR, 198 PPREC_STROKE 199 } Ptext_prec; 200 201 typedef enum { 202 PPATH_RIGHT, 203 PPATH_LEFT, 204 PPATH_UP, 205 PPATH_DOWN 206 } Ptext_path; 207 208 typedef enum { 209 PHOR_NORM, 210 PHOR_LEFT, 211 PHOR_CTR, 212 PHOR_RIGHT 213 } Phor_text_align; 214 215 typedef enum { 216 PVERT_NORM, 217 PVERT_TOP, 218 PVERT_CAP, 219 PVERT_HALF, 220 PVERT_BASE, 221 PVERT_BOTTOM 222 } Pvert_text_align; 223 224 typedef enum { 225 PSTYLE_HOLLOW, 226 PSTYLE_SOLID, 227 PSTYLE_PAT, 228 PSTYLE_HATCH, 229 PSTYLE_EMPTY 230 } Pint_style; 231 232 typedef enum { 233 PEDGE_OFF, 234 PEDGE_ON 235 } Pedge_flag; 236 237 typedef enum { 238 PASPECT_LINETYPE, 239 PASPECT_LINEWIDTH, 240 PASPECT_LINE_COLR_IND, 241 PASPECT_MARKER_TYPE, 242 PASPECT_MARKER_SIZE, 243 PASPECT_MARKER_COLR_IND, 244 PASPECT_TEXT_FONT, 245 PASPECT_TEXT_PREC, 246 PASPECT_CHAR_EXPAN, 247 PASPECT_CHAR_SPACE, 248 PASPECT_TEXT_COLR_IND, 249 PASPECT_INT_STYLE, 250 PASPECT_INT_STYLE_IND, 251 PASPECT_INT_COLR_IND, 252 PASPECT_EDGE_FLAG, 253 PASPECT_EDGETYPE, 254 PASPECT_EDGEWIDTH, 255 PASPECT_EDGE_COLR_IND, 256 PASPECT_LINE_SHAD_METH, 257 PASPECT_INT_SHAD_METH, 258 PASPECT_REFL_PROPS, 259 PASPECT_INT_REFL_EQN, 260 PASPECT_BACK_INT_STYLE, 261 PASPECT_BACK_INT_STYLE_IND, 262 PASPECT_BACK_INT_COLR, 263 PASPECT_BACK_INT_SHAD_METH, 264 PASPECT_BACK_REFL_PROPS, 265 PASPECT_BACK_INT_REFL_EQN, 266 PASPECT_CURVE_APPROX_CRIT, 267 PASPECT_SURF_APPROX_CRIT 268 } Paspect; 269 270 typedef enum { 271 PASF_BUNDLED, 272 PASF_INDIV 273 } Pasf; 274 275 typedef enum { 276 PAVAIL_MONOCHR, 277 PAVAIL_COLR 278 } Pcolr_avail; 279 280 typedef enum { 281 PTYPE_PRECONCAT, 282 PTYPE_POSTCONCAT, 283 PTYPE_REPLACE 284 } Pcompose_type; 285 286 typedef enum { 287 PTYPE_PARAL, 288 PTYPE_PERSPECT 289 } Pproj_type; 290 291 typedef enum { 292 PIND_NO_CLIP, 293 PIND_CLIP 294 } Pclip_ind; 295 296 typedef enum { 297 PPRI_HIGHER, 298 PPRI_LOWER 299 } Prel_pri; 300 301 typedef enum { 302 PRES_MAINTAIN, 303 PRES_ABANDON, 304 PRES_UPD 305 } Pconf_res; 306 307 typedef enum { 308 PFLAG_LINE, 309 PFLAG_FILL, 310 PFLAG_FILL_SET 311 } Pline_fill_ctrl_flag; 312 313 typedef enum { 314 PORDER_TOP_FIRST, 315 PORDER_BOTTOM_FIRST 316 } Ppath_order; 317 318 typedef enum { 319 POP_REQ, 320 POP_SAMPLE, 321 POP_EVENT 322 } Pop_mode; 323 324 typedef enum { 325 PSWITCH_NO_ECHO, 326 PSWITCH_ECHO 327 } Pecho_switch; 328 329 typedef enum { 330 PIN_STATUS_NONE, 331 PIN_STATUS_OK, 332 PIN_STATUS_NO_IN 333 } Pin_status; 334 335 typedef enum { 336 PSTRUCT_NONE, 337 PSTRUCT_OPEN 338 } Popen_struct_status; 339 340 typedef enum { 341 PIN_NONE, 342 PIN_LOC, 343 PIN_STROKE, 344 PIN_VAL, 345 PIN_CHOICE, 346 PIN_PICK, 347 PIN_STRING 348 } Pin_class; 349 350 typedef enum { 351 PPR_OFF, 352 PPR_ON 353 } Ppr_switch; 354 355 typedef enum { 356 PINQ_SET, 357 PINQ_REALIZED 358 } Pinq_type; 359 360 typedef enum { 361 PUPD_NOT_PEND, 362 PUPD_PEND 363 } Pupd_st; 364 365 typedef enum { 366 PDC_METRES, 367 PDC_OTHER 368 } Pdc_units; 369 370 typedef enum { 371 PDYN_IRG, 372 PDYN_IMM, 373 PDYN_CBS 374 } Pdyn_mod; 375 376 typedef enum { 377 PATTR_LINE, 378 PATTR_MARKER, 379 PATTR_TEXT, 380 PATTR_INT, 381 PATTR_EDGE 382 } Pattrs; 383 384 typedef enum { 385 PELEM_ALL, 386 PELEM_NIL, 387 PELEM_POLYLINE3, 388 PELEM_POLYLINE, 389 PELEM_POLYMARKER3, 390 PELEM_POLYMARKER, 391 PELEM_TEXT3, 392 PELEM_TEXT, 393 PELEM_ANNO_TEXT_REL3, 394 PELEM_ANNO_TEXT_REL, 395 PELEM_FILL_AREA3, 396 PELEM_FILL_AREA, 397 PELEM_FILL_AREA_SET3, 398 PELEM_FILL_AREA_SET, 399 PELEM_CELL_ARRAY3, 400 PELEM_CELL_ARRAY, 401 PELEM_GDP3, 402 PELEM_GDP, 403 PELEM_LINE_IND, 404 PELEM_MARKER_IND, 405 PELEM_TEXT_IND, 406 PELEM_INT_IND, 407 PELEM_EDGE_IND, 408 PELEM_LINETYPE, 409 PELEM_LINEWIDTH, 410 PELEM_LINE_COLR_IND, 411 PELEM_MARKER_TYPE, 412 PELEM_MARKER_SIZE, 413 PELEM_MARKER_COLR_IND, 414 PELEM_TEXT_FONT, 415 PELEM_TEXT_PREC, 416 PELEM_CHAR_EXPAN, 417 PELEM_CHAR_SPACE, 418 PELEM_TEXT_COLR_IND, 419 PELEM_CHAR_HT, 420 PELEM_CHAR_UP_VEC, 421 PELEM_TEXT_PATH, 422 PELEM_TEXT_ALIGN, 423 PELEM_ANNO_CHAR_HT, 424 PELEM_ANNO_CHAR_UP_VEC, 425 PELEM_ANNO_PATH, 426 PELEM_ANNO_ALIGN, 427 PELEM_ANNO_STYLE, 428 PELEM_INT_STYLE, 429 PELEM_INT_STYLE_IND, 430 PELEM_INT_COLR_IND, 431 PELEM_EDGE_FLAG, 432 PELEM_EDGETYPE, 433 PELEM_EDGEWIDTH, 434 PELEM_EDGE_COLR_IND, 435 PELEM_PAT_SIZE, 436 PELEM_PAT_REF_POINT_VECS, 437 PELEM_PAT_REF_POINT, 438 PELEM_ADD_NAMES_SET, 439 PELEM_REMOVE_NAMES_SET, 440 PELEM_INDIV_ASF, 441 PELEM_HLHSR_ID, 442 PELEM_LOCAL_MODEL_TRAN3, 443 PELEM_LOCAL_MODEL_TRAN, 444 PELEM_GLOBAL_MODEL_TRAN3, 445 PELEM_GLOBAL_MODEL_TRAN, 446 PELEM_MODEL_CLIP_VOL3, 447 PELEM_MODEL_CLIP_VOL, 448 PELEM_MODEL_CLIP_IND, 449 PELEM_RESTORE_MODEL_CLIP_VOL, 450 PELEM_VIEW_IND, 451 PELEM_EXEC_STRUCT, 452 PELEM_LABEL, 453 PELEM_APPL_DATA, 454 PELEM_GSE, 455 PELEM_PICK_ID, 456 PELEM_POLYLINE_SET3_DATA, 457 PELEM_FILL_AREA_SET3_DATA, 458 PELEM_TRI_STRIP3_DATA, 459 PELEM_QUAD_MESH3_DATA, 460 PELEM_SET_OF_FILL_AREA_SET3_DATA, 461 PELEM_NUNI_BSP_CURVE, 462 PELEM_NUNI_BSP_SURF, 463 PELEM_CELL_ARRAY3_PLUS, 464 PELEM_TEXT_COLR, 465 PELEM_MARKER_COLR, 466 PELEM_EDGE_COLR, 467 PELEM_LINE_COLR, 468 PELEM_CURVE_APPROX_CRIT, 469 PELEM_LINE_SHAD_METH, 470 PELEM_INT_COLR, 471 PELEM_BACK_INT_COLR, 472 PELEM_BACK_INT_STYLE, 473 PELEM_BACK_INT_STYLE_IND, 474 PELEM_REFL_PROPS, 475 PELEM_BACK_REFL_PROPS, 476 PELEM_INT_SHAD_METH, 477 PELEM_BACK_INT_SHAD_METH, 478 PELEM_INT_REFL_EQN, 479 PELEM_BACK_INT_REFL_EQN, 480 PELEM_SURF_APPROX_CRIT, 481 PELEM_PARA_SURF_CHARACS, 482 PELEM_FACE_DISTING_MODE, 483 PELEM_FACE_CULL_MODE, 484 PELEM_LIGHT_SRC_STATE, 485 PELEM_DCUE_IND, 486 PELEM_COLR_MAP_IND, 487 PELEM_RENDERING_COLR_MODEL, 488 PELEM_NUM_EL_TYPES 489 } Pelem_type; 490 491 typedef enum { 492 PEDIT_INSERT, 493 PEDIT_REPLACE 494 } Pedit_mode; 495 496 typedef enum { 497 PFLAG_DEL, 498 PFLAG_KEEP 499 } Pref_flag; 500 501 typedef enum { 502 PERR_OFF, 503 PERR_ON 504 } Perr_mode; 505 506 typedef enum { 507 PDIR_BACKWARD, 508 PDIR_FORWARD 509 } Psearch_dir; 510 511 typedef enum { 512 PSEARCH_STATUS_FAILURE, 513 PSEARCH_STATUS_SUCCESS 514 } Psearch_status; 515 516 typedef enum { 517 PNON_RATIONAL = 0, 518 PRATIONAL = 1 519 } Prational; 520 521 typedef struct { 522 size_t size; /* sizeof data */ 523 #if NeedFunctionPrototypes 524 void *data; /* pointer to data */ 525 #else 526 char *data; /* pointer to data */ 527 #endif 528 } Pdata; 529 530 typedef struct { 531 Pfloat red; /* red, hue, etc */ 532 Pfloat green; /* green, saturation, lightness, etc */ 533 Pfloat blue; /* blue, value, saturation, etc */ 534 } Prgb; 535 536 typedef struct { 537 Pfloat cieluv_x; /* x coefficient */ 538 Pfloat cieluv_y; /* y coefficient */ 539 Pfloat cieluv_y_lum; /* y luminance */ 540 } Pcieluv; 541 542 typedef struct { 543 Pfloat hue; /* hue */ 544 Pfloat satur; /* saturation */ 545 Pfloat value; /* value */ 546 } Phsv; 547 548 typedef struct { 549 Pfloat hue; /* hue */ 550 Pfloat lightness; /* lightness; */ 551 Pfloat satur; /* saturation */ 552 } Phls; 553 554 typedef union { 555 Prgb rgb; 556 Pcieluv cieluv; 557 Phls hls; 558 Phsv hsv; 559 Pdata unsupp; 560 } Pcolr_rep; 561 562 typedef struct { 563 Pint size_x; 564 Pint size_y; 565 } Pint_size; 566 567 typedef struct { 568 Pint size_x; 569 Pint size_y; 570 Pint size_z; 571 } Pint_size3; 572 573 typedef struct { 574 Pfloat size_x; 575 Pfloat size_y; 576 } Pfloat_size; 577 578 typedef struct { 579 Pfloat size_x; 580 Pfloat size_y; 581 Pfloat size_z; 582 } Pfloat_size3; 583 584 typedef struct { 585 Pint num_ints; /* number of Pints in list */ 586 Pint *ints; /* list of integers */ 587 } Pint_list; 588 589 typedef struct { 590 Pint num_lists; /* number of Pintlists in list */ 591 Pint_list *lists; /* list of integer lists */ 592 } Pint_list_list; 593 594 typedef struct { 595 Pint num_floats; /* number of Pfloats in list */ 596 Pfloat *floats; /* list of floats */ 597 } Pfloat_list; 598 599 typedef struct { 600 Pint num_lists; /* number of lists in list */ 601 Pfloat_list *lists; /* list of float lists */ 602 } Pfloat_list_list; 603 604 typedef struct { 605 Pint id; /* GSE identifier */ 606 Pws_dep_ind ind; /* WS independent/dependent ind */ 607 } Pgse_id_dep; 608 609 typedef struct { 610 Pint num_id_facs; /* number of identifiers/dependency element */ 611 Pgse_id_dep *id_facs; /* list */ 612 } Pgse_id_dep_list; 613 614 typedef struct { 615 Pint id; /* archive file identifier */ 616 char *name; /* archive file name */ 617 } Par_file; 618 619 typedef struct { 620 Pint num_ar_files; /* number of archive files */ 621 Par_file *ar_files; /* list of archive files */ 622 } Par_file_list; 623 624 typedef struct { 625 Pint struct_id; /* structure identifier */ 626 Pint elem_pos; /* element number */ 627 } Pelem_ref; 628 629 typedef struct { 630 Pint num_elem_refs; /* number of execute refs */ 631 Pelem_ref *elem_refs; /* list of execute refs */ 632 } Pelem_ref_list; 633 634 typedef struct { 635 Pint num_elem_ref_lists; /* number of execute refs */ 636 Pelem_ref_list *elem_ref_lists; /* list of execute ref lists */ 637 } Pelem_ref_list_list; 638 639 typedef struct { 640 Pint_list incl_set; /* inclusion set */ 641 Pint_list excl_set; /* exclusion set */ 642 } Pfilter; 643 644 typedef struct { 645 Pint num_filters; /* number of filters */ 646 Pfilter *filters; /* list of filters */ 647 } Pfilter_list; 648 649 typedef struct { 650 Pint id; /* structure id */ 651 Pfloat disp_pri; /* structure disp_pri */ 652 } Pposted_struct; 653 654 typedef struct { 655 Pint num_postings; /* number of structure postings */ 656 Pposted_struct *postings; /* list of postings */ 657 } Pposted_struct_list; 658 659 typedef struct { 660 Pint num_strings; /* number of strings */ 661 char **strings; /* list of strings */ 662 } Pstring_list; 663 664 typedef struct { 665 Pfloat x; /* x coordinate */ 666 Pfloat y; /* y coordinate */ 667 } Ppoint; 668 669 typedef struct { 670 Pfloat x; /* x coordinate */ 671 Pfloat y; /* y coordinate */ 672 Pfloat z; /* z coordinate */ 673 } Ppoint3; 674 675 typedef struct { 676 Pfloat x; /* x coordinate */ 677 Pfloat y; /* y coordinate */ 678 Pfloat z; /* z coordinate */ 679 Pfloat w; /* w coordinate */ 680 } Ppoint4; 681 682 typedef struct { 683 Pfloat delta_x; /* x magnitude */ 684 Pfloat delta_y; /* y magnitude */ 685 } Pvec; 686 687 typedef struct { 688 Pfloat delta_x; /* x magnitude */ 689 Pfloat delta_y; /* y magnitude */ 690 Pfloat delta_z; /* z magnitude */ 691 } Pvec3; 692 693 typedef struct { 694 Ppoint point; /* point */ 695 Pvec norm; /* normal */ 696 } Phalf_space; 697 698 typedef struct { 699 Ppoint3 point; /* point */ 700 Pvec3 norm; /* normal */ 701 } Phalf_space3; 702 703 typedef struct { 704 Ppoint p; /* lower left */ 705 Ppoint q; /* upper right */ 706 } Prect; 707 708 typedef struct { 709 Ppoint3 p; /* point p */ 710 Ppoint3 q; /* point q */ 711 Ppoint3 r; /* point r */ 712 } Pparal; 713 714 typedef struct { 715 Pfloat x_min; /* x min */ 716 Pfloat x_max; /* x max */ 717 Pfloat y_min; /* y min */ 718 Pfloat y_max; /* y max */ 719 Pfloat z_min; /* z min */ 720 Pfloat z_max; /* z max */ 721 } Plimit3; 722 723 typedef struct { 724 Pfloat x_min; /* x min */ 725 Pfloat x_max; /* x max */ 726 Pfloat y_min; /* y min */ 727 Pfloat y_max; /* y max */ 728 } Plimit; 729 730 typedef struct { 731 Pint u_dim; /* dimension (number of divisions) along U */ 732 Pint v_dim; /* dimension (number of divisions) along V */ 733 } Ppcs_dims; 734 735 typedef struct { 736 Pint num_points; /* number of Ppoints in the list */ 737 Ppoint *points; /* list of points */ 738 } Ppoint_list; 739 740 typedef struct { 741 Pint num_points; /* number of Ppoint3s in the list */ 742 Ppoint3 *points; /* list of points */ 743 } Ppoint_list3; 744 745 typedef struct { 746 Pint num_points; /* number of Ppoint4s in the list */ 747 Ppoint4 *points; /* list of points */ 748 } Ppoint_list4; 749 750 typedef struct { /* list of 2D or 3D points */ 751 Pint num_points; /* number of points */ 752 union { 753 Ppoint *point2d; /* array of 2D points */ 754 Ppoint3 *point3d; /* array of 3D points */ 755 } points; 756 } Ppoint_list23; 757 758 typedef struct { /* list of 3D or 4D points */ 759 Pint num_points; 760 union { 761 Ppoint3 *point3d; /* array of 3D points */ 762 Ppoint4 *point4d; /* array of 4D points */ 763 } points; 764 } Ppoint_list34; 765 766 typedef struct { /* grid of 3D or 4D points, [u_dim][v_dim] */ 767 Ppcs_dims num_points; /* number of points in each dimension */ 768 union { 769 Ppoint3 *point3d; /* array of 3D points */ 770 Ppoint4 *point4d; /* array of 4D points */ 771 } points; 772 } Ppoint_grid34; 773 774 typedef struct { /* list of 2d point lists */ 775 Pint num_point_lists; /* number of point lists */ 776 Ppoint_list *point_lists; /* list of point lists */ 777 } Ppoint_list_list; 778 779 typedef struct { /* list of 3d point lists */ 780 Pint num_point_lists; /* number of point lists */ 781 Ppoint_list3 *point_lists; /* list of point lists */ 782 } Ppoint_list_list3; 783 784 typedef struct { 785 Pint num_half_spaces; /* number of half-spaces */ 786 Phalf_space3 *half_spaces; /* list of half-spaces */ 787 } Phalf_space_list3; 788 789 typedef struct { 790 Pint num_half_spaces;/* number of half spaces */ 791 Phalf_space *half_spaces; /* list of half-spaces */ 792 } Phalf_space_list; 793 794 typedef struct { 795 Pedge_flag visible; /* curve visibility flag */ 796 Prational rationality; /* rationality */ 797 Pint order; /* curve order */ 798 Pint approx_type; /* approximation type */ 799 Pfloat approx_val; /* approximation value */ 800 Pfloat_list knots; /* curve knot vector */ 801 Pfloat tmin, tmax; /* curve parameter range */ 802 Ppoint_list23 cpts; /* control points */ 803 } Ptrimcurve; 804 805 typedef struct { 806 Pint num_curves; /* number of trim curve in list */ 807 Ptrimcurve *curves; /* list of curves */ 808 } Ptrimcurve_list; 809 810 typedef struct { 811 Phor_text_align hor; /* horizontal component */ 812 Pvert_text_align vert; /* vertical component */ 813 } Ptext_align; 814 815 typedef union { 816 Pint ind; /* index in workstation colour bundle table */ 817 Pcolr_rep direct; /* direct colour components */ 818 } Pcoval; 819 820 typedef struct { 821 Pint num_colr_reps; /* number of colours */ 822 Pcolr_rep *colr_reps; /* array of colours */ 823 } Pcolr_rep_list; 824 825 typedef struct { 826 Pcoval colr; /* colour */ 827 Pvec3 norm; /* normal */ 828 } Pconorm3; /* colour and normal */ 829 830 typedef struct { 831 Ppoint3 point; /* point coordinates */ 832 Pcoval colr; /* colour */ 833 } Pptco3; /* point with colour */ 834 835 typedef struct { 836 Ppoint3 point; /* point coordinates */ 837 Pvec3 norm; /* normal */ 838 } Pptnorm3; 839 840 typedef struct { 841 Ppoint3 point; /* point coordinates */ 842 Pcoval colr; /* colour */ 843 Pvec3 norm; /* normal */ 844 } Pptconorm3; /* point with colour and normal */ 845 846 typedef union { 847 Ppoint3 *points; /* point */ 848 Pptco3 *ptcolrs; /* point and color */ 849 Pptnorm3 *ptnorms; /* point and normal */ 850 Pptconorm3 *ptconorms; /* point, color and normal */ 851 /* implementation dependent data pointer */ 852 } Pfacet_vdata_arr3; /* facet vertex data array */ 853 854 typedef struct { 855 Pint num_vertices; /* number of vertices */ 856 Pfacet_vdata_arr3 vertex_data; /* array of facet vertex data */ 857 } Pfacet_vdata_list3; /* facet vertex data list */ 858 859 typedef union { 860 Ppoint3 *points; /* points */ 861 Pptco3 *ptcolrs; /* points & colours */ 862 /* implementation dependent data */ 863 } Pline_vdata_arr3; /* line vertex data array */ 864 865 typedef struct { 866 Pint num_vertices; /* number of vertices */ 867 Pline_vdata_arr3 vertex_data; /* array of line vertex data */ 868 } Pline_vdata_list3; /* polyline vertex data */ 869 870 typedef union { 871 Pedge_flag *edges; /* edge flags */ 872 /* implementation dependent data */ 873 } Pedge_data_arr; 874 875 typedef struct { 876 Pint num_edges; /* number of edges */ 877 Pedge_data_arr edgedata; /* array of edge data */ 878 } Pedge_data_list; /* edge data list */ 879 880 typedef struct { 881 Pint num_lists; /* number of edges */ 882 Pedge_data_list *edgelist; /* list of edge data list */ 883 } Pedge_data_list_list; /* edge data list list */ 884 885 typedef union { 886 Pcoval colr; /* colour */ 887 Pvec3 norm; /* normal */ 888 Pconorm3 conorm; /* colour and normal */ 889 /* implementation dependent data pointer */ 890 } Pfacet_data3; /* array of facet data */ 891 892 typedef union { 893 Pcoval *colrs; /* colour */ 894 Pvec3 *norms; /* normal */ 895 Pconorm3 *conorms; /* colour and normal */ 896 /* implementation dependent data pointer */ 897 } Pfacet_data_arr3; /* array of facet data */ 898 899 typedef struct { 900 Pint type; /* indirect, RGB, CIE, HSV, HLS */ 901 union { 902 Pint ind; /* index in workstation colour bundle table */ 903 struct { 904 Pfloat x; /* red, hue, etc */ 905 Pfloat y; /* green, saturation, lightness, etc */ 906 Pfloat z; /* blue, value, saturation, etc */ 907 } general; 908 } val; 909 } Pgcolr; 910 911 typedef struct { 912 Pint type; /* line type */ 913 Pfloat width; /* linewidth scale factor */ 914 Pint colr_ind; /* colour index */ 915 } Pline_bundle; 916 917 typedef struct { 918 Pint type; /* line type */ 919 Pfloat width; /* linewidth scale factor */ 920 Pgcolr colr; /* polyline colour */ 921 Pint shad_meth; /* polyline shading method */ 922 Pint approx_type; /* curve approximation criteria */ 923 Pfloat approx_val; /* curve approximation criteria */ 924 } Pline_bundle_plus; 925 926 typedef struct { 927 Pint type; /* marker type */ 928 Pfloat size; /* marker size scale factor */ 929 Pint colr_ind; /* colour index */ 930 } Pmarker_bundle; 931 932 typedef struct { 933 Pint type; /* marker type */ 934 Pfloat size; /* marker size scale factor */ 935 Pgcolr colr; /* marker colour */ 936 } Pmarker_bundle_plus; 937 938 typedef struct { 939 Pint font; /* text font */ 940 Ptext_prec prec; /* text precision */ 941 Pfloat char_expan; /* character char_expansion factor */ 942 Pfloat char_space; /* character spacing */ 943 Pint colr_ind; /* text colour index */ 944 } Ptext_bundle; 945 946 typedef struct { 947 Pint font; /* text font */ 948 Ptext_prec prec; /* text precision */ 949 Pfloat char_expan; /* character char_expansion factor */ 950 Pfloat char_space; /* character spacing */ 951 Pgcolr colr; /* text colour */ 952 } Ptext_bundle_plus; 953 954 typedef struct { 955 Pint_style style; /* interior style */ 956 Pint style_ind; /* interior style index */ 957 Pint colr_ind; /* interior colour index */ 958 } Pint_bundle; 959 960 typedef struct { 961 Pfloat ambient_coef; /* ambient reflectance coefficient */ 962 Pfloat diffuse_coef; /* diffuse reflectance coefficient */ 963 Pfloat specular_coef; /* specular reflectance coefficient */ 964 Pgcolr specular_colr;/* specular colour */ 965 Pfloat specular_exp; /* specular exponent */ 966 } Prefl_props; 967 968 typedef struct { 969 Pint_style style; /* interior style */ 970 Pint style_ind; /* interior style index */ 971 Pgcolr colr; /* interior colour */ 972 Pint refl_eqn; /* reflectance equation */ 973 Pint shad_meth; /* shading method */ 974 Prefl_props refl_props; /* reflectance properties */ 975 Pint_style back_style; /* interior style */ 976 Pint back_style_ind; /* interior style index */ 977 Pgcolr back_colr; /* interior colour */ 978 Pint back_refl_eqn; /* back reflectance equation */ 979 Pint back_shad_meth; /* back shading method */ 980 Prefl_props back_refl_props; /* back reflectance properties */ 981 Pint approx_type; /* approximation meth */ 982 Pfloat approx_val[2]; /* approximation values, u and v */ 983 } Pint_bundle_plus; 984 985 typedef struct { 986 Pedge_flag flag; /* edge flag */ 987 Pint type; /* edgetype */ 988 Pfloat width; /* edgewidth scale factor */ 989 Pint colr_ind; /* edge colour index */ 990 } Pedge_bundle; 991 992 typedef struct { 993 Pedge_flag flag; /* edge flag */ 994 Pint type; /* edgetype */ 995 Pfloat width; /* edgewidth scale factor */ 996 Pgcolr colr; /* edge colour */ 997 } Pedge_bundle_plus; 998 999 typedef struct { 1000 Pint_size dims; /* pattern's dimensions */ 1001 Pint *colr_array; /* colour index array */ 1002 } Ppat_rep; 1003 1004 typedef struct { 1005 Pint_size dims; /* pattern's dimensions */ 1006 Pint type; /* colour type */ 1007 Pcoval *colr_array; /* array of colours */ 1008 } Ppat_rep_plus; 1009 1010 typedef struct { 1011 Pmatrix3 ori_matrix; /* orientation matrix */ 1012 Pmatrix3 map_matrix; /* mapping matrix */ 1013 Plimit3 clip_limit; /* clipping limits */ 1014 Pclip_ind xy_clip; /* X-Y clipping indicator */ 1015 Pclip_ind back_clip; /* back clipping indicator */ 1016 Pclip_ind front_clip; /* front clipping indicator */ 1017 } Pview_rep3; 1018 1019 typedef struct { 1020 Pmatrix ori_matrix; /* orientation matrix */ 1021 Pmatrix map_matrix; /* mapping matrix */ 1022 Plimit clip_limit; /* clipping limits */ 1023 Pclip_ind xy_clip; /* X-Y clipping ind */ 1024 } Pview_rep; 1025 1026 typedef struct { 1027 Plimit win; /* window limits */ 1028 Plimit3 proj_vp; /* viewport limits */ 1029 Pproj_type proj_type; /* projection type */ 1030 Ppoint3 proj_ref_point; /* projection reference point */ 1031 Pfloat view_plane; /* view plane distance */ 1032 Pfloat back_plane; /* back plane distance */ 1033 Pfloat front_plane; /* front plane distance */ 1034 } Pview_map3; 1035 1036 typedef struct { 1037 Plimit win; /* window limits */ 1038 Plimit proj_vp; /* viewport limits */ 1039 } Pview_map; 1040 1041 typedef struct { 1042 Pasf type_asf; /* line type asf */ 1043 Pasf width_asf; /* line width asf */ 1044 Pasf colr_ind_asf; /* line colour index asf */ 1045 Pint ind; /* line index */ 1046 Pline_bundle bundle; /* line bundle */ 1047 } Pline_attrs; 1048 1049 typedef struct { 1050 Pasf style_asf; /* interior asf */ 1051 Pasf style_ind_asf; /* interior style asf */ 1052 Pasf colr_ind_asf; /* interior colour index asf */ 1053 Pint ind; /* interior index */ 1054 Pint_bundle bundle; /* interior bundle */ 1055 } Pint_attrs; 1056 1057 typedef struct { 1058 Pasf flag_asf; /* edge flag asf */ 1059 Pasf type_asf; /* edge type asf */ 1060 Pasf width_asf; /* edge width asf */ 1061 Pasf colr_ind_asf; /* edge colour index asf */ 1062 Pint ind; /* edge index */ 1063 Pedge_bundle bundle; /* edge bundle */ 1064 } Pedge_attrs; 1065 1066 typedef struct { 1067 Pasf type_asf; /* marker type asf */ 1068 Pasf size_asf; /* marker style asf */ 1069 Pasf colr_ind_asf; /* marker colour index asf */ 1070 Pint ind; /* marker index */ 1071 Pmarker_bundle bundle; /* marker bundle */ 1072 } Pmarker_attrs; 1073 1074 typedef struct { 1075 Pgcolr colr; /* light source colour */ 1076 } Pamb_light_src_rec; 1077 1078 typedef struct { 1079 Pgcolr colr; /* light source colour */ 1080 Pvec3 dir; /* light source direction */ 1081 } Pdir_light_src_rec; 1082 1083 typedef struct { 1084 Pgcolr colr; /* light source colour */ 1085 Ppoint3 pos; /* light source position */ 1086 Pfloat coef[2]; /* attenuation coefficients */ 1087 } Ppos_light_src_rec; 1088 1089 typedef struct { 1090 Pgcolr colr; /* light source colour */ 1091 Ppoint3 pos; /* light source position */ 1092 Pvec3 dir; /* light source direction */ 1093 Pfloat exp; /* concentration exponent */ 1094 Pfloat coef[2]; /* attenuation coefficients */ 1095 Pfloat angle; /* spread angle */ 1096 } Pspot_light_src_rec; 1097 1098 typedef union { 1099 Pamb_light_src_rec ambient; 1100 Pdir_light_src_rec directional; 1101 Ppos_light_src_rec positional; 1102 Pspot_light_src_rec spot; 1103 } Plight_src_rec; 1104 1105 typedef struct { 1106 Pint type; /* light source type */ 1107 Plight_src_rec rec; /* light source data record */ 1108 } Plight_src_bundle; 1109 1110 typedef struct { 1111 Pint_list types; /* types of light source supported */ 1112 Pint max; /* max. no. of simultaneously active lights */ 1113 Pint num_pred_inds; /* number of predefined bundles */ 1114 } Plight_src_facs; 1115 1116 typedef struct { 1117 Pint struct_id; /* structure identifier */ 1118 Pint pick_id; /* hierarchical pick identifier */ 1119 Pint elem_pos; /* element sequence number */ 1120 } Ppick_path_elem; 1121 1122 typedef struct { 1123 Pint depth; /* pick path_list depth */ 1124 Ppick_path_elem *path_list; /* pick path */ 1125 } Ppick_path; 1126 1127 typedef struct { 1128 Pdc_units dc_units; /* device coordinate units */ 1129 Pfloat_size size_dc; /* device size in coordinate units */ 1130 Pint_size size_raster; /* device size in raster units */ 1131 } Pdisp_space_size; 1132 1133 typedef struct { 1134 Pdc_units dc_units; /* device coordinate units */ 1135 Pfloat_size3 size_dc; /* device volume in coordinate units */ 1136 Pint_size3 size_raster; /* device volume in raster units */ 1137 } Pdisp_space_size3; 1138 1139 typedef struct { 1140 Pdyn_mod line_bundle; /* polyline representation */ 1141 Pdyn_mod marker_bundle; /* polymarker representation */ 1142 Pdyn_mod text_bundle; /* text representation */ 1143 Pdyn_mod int_bundle; /* interior representation */ 1144 Pdyn_mod edge_bundle; /* edge representation */ 1145 Pdyn_mod pat_rep; /* pattern representation */ 1146 Pdyn_mod colr_rep; /* colour representation */ 1147 Pdyn_mod view_rep; /* view representation */ 1148 Pdyn_mod ws_tran; /* workstation transform */ 1149 Pdyn_mod highl_filter; /* highlight filter */ 1150 Pdyn_mod invis_filter; /* invisibility filter */ 1151 Pdyn_mod hlhsr_mode; /* HLHSR mode */ 1152 } Pdyns_ws_attrs; 1153 1154 typedef struct { 1155 Pdyn_mod light_src_rep; /* light source representation */ 1156 Pdyn_mod dcue_rep; /* depth cue representation */ 1157 Pdyn_mod colr_map_rep; /* colour mapping representation */ 1158 } Pdyns_ws_attrs_plus; 1159 1160 typedef struct { 1161 Pint_list types; /* list of line types */ 1162 Pint num_widths; /* number of available line widths */ 1163 Pfloat nom_width; /* nominal line width */ 1164 Pfloat min_width; /* min line width */ 1165 Pfloat max_width; /* max line width */ 1166 Pint num_pred_inds; /* number of predefined bundles */ 1167 } Pline_facs; 1168 1169 typedef struct { 1170 Pint_list types; /* list of line types */ 1171 Pint num_widths; /* number of available line widths */ 1172 Pfloat nom_width; /* nominal line width */ 1173 Pfloat min_width; /* min line width */ 1174 Pfloat max_width; /* max line width */ 1175 Pint num_pred_inds; /* number of predefined bundles */ 1176 Pint_list shads; /* list of shad_meth meths */ 1177 } Pline_facs_plus; 1178 1179 typedef struct { 1180 Pint_list types; /* list of marker types */ 1181 Pint num_sizes; /* number of available marker sizes */ 1182 Pfloat nom_size; /* nominal marker size */ 1183 Pfloat min_size; /* min marker size */ 1184 Pfloat max_size; /* max marker size */ 1185 Pint num_pred_inds; /* number of predefined bundles */ 1186 } Pmarker_facs; 1187 1188 typedef struct { 1189 Pint font; /* text font */ 1190 Ptext_prec prec; /* text precision */ 1191 } Ptext_font_prec; 1192 1193 typedef struct { 1194 Pint num_font_precs; /* number of fonts and precisions */ 1195 Ptext_font_prec *font_precs; /* list of fonts and precisions */ 1196 Pint num_char_hts; /* number of character heights */ 1197 Pfloat min_char_ht; /* minimum height */ 1198 Pfloat max_char_ht; /* maximum height */ 1199 Pint num_char_expans; /* number of character expansion factors */ 1200 Pfloat min_char_expan; /* minimum expansion factor */ 1201 Pfloat max_char_expan; /* maximum expansion factor */ 1202 Pint num_pred_inds; /* number of predefined bundles */ 1203 } Ptext_facs; 1204 1205 typedef struct { 1206 Pint num_int_styles; /* number of interior styles */ 1207 Pint_style int_styles[5]; /* list of available interior styles */ 1208 Pint_list hatch_styles; /* list of available hatch styles */ 1209 Pint num_pred_inds; /* number of predefined bundles */ 1210 } Pint_facs; 1211 1212 typedef struct { 1213 Pint num_int_styles; /* number of interior styles */ 1214 Pint_style *int_styles; /* list of available interior styles */ 1215 Pint_list hatch_styles; /* list of available hatch styles */ 1216 Pint num_pred_inds; /* number of predefined interior indices */ 1217 Pint_list refl_eqns; /* list of available reflectance equations */ 1218 Pint_list shad_meths; /* list of available shading methods */ 1219 } Pint_facs_plus; 1220 1221 typedef struct { 1222 Pint max_bsp_order; /* maximum B-spline order */ 1223 Pint max_tc_order; /* maximum trim curve order */ 1224 Pint_list cat_types; /* list of curve approx types */ 1225 Pint_list sat_types; /* list of surface approx types */ 1226 Pint_list tcat_types; /* list of trim curve approx types */ 1227 Pint_list psc_types; /* list of parametric surface 1228 characteristics */ 1229 } Pcurvsurf_facs; 1230 1231 typedef enum { 1232 PCP_UNIFORM, 1233 PCP_NON_UNIFORM 1234 } Pcurve_placement; 1235 1236 typedef union { 1237 struct { 1238 Pint unused; 1239 } psc_1; 1240 struct { 1241 Pint unused; 1242 } psc_2; 1243 struct { 1244 Pcurve_placement placement; 1245 Pint u_count; 1246 Pint v_count; 1247 } psc_3; 1248 struct { 1249 Ppoint3 origin; 1250 Pvec3 direction; 1251 Pfloat_list params; 1252 } psc_4; 1253 struct { 1254 Ppoint3 origin; 1255 Pvec3 direction; 1256 Pfloat_list params; 1257 } psc_5; 1258 } Ppara_surf_characs; 1259 1260 typedef struct { 1261 Pint_list types; /* list of edge types */ 1262 Pint num_widths; /* number of available edge widths */ 1263 Pfloat nom_width; /* nominal edge width */ 1264 Pfloat min_width; /* min edge width */ 1265 Pfloat max_width; /* max edge width */ 1266 Pint num_pred_inds; /* number of predefined bundles */ 1267 } Pedge_facs; 1268 1269 typedef struct { 1270 Pint num_colrs; /* number of colours */ 1271 Pcolr_avail colr_avail; /* colour availability */ 1272 Pint num_pred_inds; /* number of predefined bundles */ 1273 Pcieluv prim_colrs[3]; /* primary colours */ 1274 } Pcolr_facs; 1275 1276 typedef enum { 1277 PSUPPRESSED, 1278 PALLOWED 1279 } Pdcue_mode; 1280 1281 typedef struct { 1282 Pdcue_mode mode; /* depth cue mode */ 1283 Pfloat ref_planes[2]; /* depth cue ref planes */ 1284 Pfloat scaling[2]; /* depth cue scaling*/ 1285 Pgcolr colr; /* depth cue colour */ 1286 } Pdcue_bundle; 1287 1288 typedef union { 1289 /* method 1 has no data associated with it */ 1290 struct { 1291 Pint colr_model; 1292 Pfloat_list weights; 1293 Pcolr_rep_list colrs; 1294 } meth_r2; 1295 struct { 1296 Pint colr_model; 1297 Pfloat_list_list colr_lists; 1298 } meth_r3; 1299 } Pcolr_map_data; 1300 1301 typedef struct { 1302 Pint_list meths; 1303 Pint num_pred_inds; 1304 } Pcolr_map_facs; 1305 1306 typedef struct { 1307 Pint int_data; /* for map methods 1 and 2 */ 1308 } Pcolr_map_st; 1309 1310 typedef struct { 1311 Pint num_attrs; /* number of attributes in list */ 1312 Pattrs *attrs; /* list of attributes */ 1313 } Pattrs_list; 1314 1315 typedef struct { 1316 Pint line_bundles; /* polyline tables */ 1317 Pint mark_bundles; /* polymarker tables */ 1318 Pint text_bundles; /* text tables */ 1319 Pint int_bundles; /* interior tables */ 1320 Pint edge_bundles; /* edge tables */ 1321 Pint pat_reps; /* pattern tables */ 1322 Pint colr_reps; /* colour tables */ 1323 Pint view_reps; /* view tables */ 1324 } Pws_st_tables; 1325 1326 typedef struct { 1327 Pint line_bundles; /* polyline tables */ 1328 Pint mark_bundles; /* polymarker tables */ 1329 Pint text_bundles; /* text tables */ 1330 Pint int_bundles; /* interior tables */ 1331 Pint edge_bundles; /* edge tables */ 1332 Pint pat_reps; /* pattern tables */ 1333 Pint colr_reps; /* colour tables */ 1334 Pint view_reps; /* view tables */ 1335 Pint dcue_rep; /* depth cue tables */ 1336 Pint light_src_rep; /* light source tables */ 1337 Pint colr_map_rep; /* colour mapping tables */ 1338 } Pws_tables_plus; 1339 1340 typedef struct { 1341 Pdyn_mod content; /* structure content */ 1342 Pdyn_mod post; /* post structure */ 1343 Pdyn_mod unpost; /* unpost structure */ 1344 Pdyn_mod del; /* del structure */ 1345 Pdyn_mod ref; /* structure references */ 1346 } Pdyns_structs; 1347 1348 typedef struct { 1349 Pint loc; /* locators */ 1350 Pint stroke; /* strokes */ 1351 Pint val; /* valuators */ 1352 Pint choice; /* choices */ 1353 Pint pick; /* picks */ 1354 Pint string; /* strings */ 1355 } Pnum_in; 1356 1357 typedef struct { 1358 Pint num_elem_types; /* number of elements */ 1359 Pelem_type *elem_types; /* list of elements */ 1360 } Pelem_type_list; 1361 1362 typedef union { 1363 Pdata unsupp; /* unsupp Metafile item data */ 1364 } Pitem_data; 1365 1366 /* Plocator_data -- locator data record */ 1367 typedef struct { 1368 union { 1369 struct { 1370 Pint unused; 1371 } pet_r1; 1372 struct { 1373 Pint unused; 1374 } pet_r2; 1375 struct { 1376 Pint unused; 1377 } pet_r3; 1378 struct { 1379 Pline_attrs line_attrs; /* polyline attributes */ 1380 } pet_r4; 1381 struct { 1382 Pline_fill_ctrl_flag line_fill_ctrl_flag; 1383 union { 1384 Pline_attrs line_attrs; /* polyline attributes */ 1385 Pint_attrs int_attrs; /* interior attributes */ 1386 struct { 1387 Pint_attrs int_attrs; /* interior attributes */ 1388 Pedge_attrs edge_attrs; /* edge attributes */ 1389 } fill_set; 1390 } attrs; 1391 } pet_r5; 1392 } pets; 1393 } Ploc_data; 1394 1395 typedef Ploc_data Ploc_data3; 1396 1397 /* Pvaluator_data -- valuator data record */ 1398 typedef struct { 1399 Pfloat low; /* low range limit */ 1400 Pfloat high; /* high range limit */ 1401 union { 1402 struct { 1403 Pint unused; 1404 } pet_r1; 1405 struct { 1406 char *label; 1407 char *format; 1408 char *low_label; 1409 char *high_label; 1410 } pet_u1; 1411 } pets; 1412 } Pval_data; 1413 1414 typedef Pval_data Pval_data3; 1415 1416 /* Pchoice_data -- choice data record */ 1417 typedef struct { 1418 union { 1419 struct { 1420 Pint unused; 1421 } pet_r1; 1422 struct { 1423 Pint num_prompts; /* number of alternatives */ 1424 Ppr_switch *prompts; /* array of prompts */ 1425 } pet_r2; 1426 struct { 1427 Pint num_strings; /* number of choice strings */ 1428 char **strings; /* array of choice strings */ 1429 } pet_r3; 1430 struct { 1431 Pint num_strings; /* number of alternatives */ 1432 char **strings; /* array of strings */ 1433 } pet_r4; 1434 struct { 1435 Pint struct_id; /* struct identifier */ 1436 Pint num_pick_ids; /* number of alternatives */ 1437 Pint *pick_ids; /* array of pick identifiers */ 1438 } pet_r5; 1439 } pets; 1440 } Pchoice_data; 1441 1442 typedef Pchoice_data Pchoice_data3; 1443 1444 /* Ppick_data -- pick data record */ 1445 typedef struct { 1446 union { 1447 struct { 1448 Pint unused; 1449 } pet_r1; 1450 } pets; 1451 } Ppick_data; 1452 1453 typedef Ppick_data Ppick_data3; 1454 1455 /* Pstroke_data -- stroke data record */ 1456 typedef struct { 1457 Pint buffer_size; /* input buffer size */ 1458 Pint init_pos; /* initial editing position */ 1459 Pfloat x_interval; /* x interval */ 1460 Pfloat y_interval; /* y interval */ 1461 Pfloat time_interval; /* time interval */ 1462 union { 1463 struct { 1464 Pint unused; 1465 } pet_r1; 1466 struct { 1467 Pint unused; 1468 } pet_r2; 1469 struct { 1470 Pmarker_attrs marker_attrs; /* marker attributes */ 1471 } pet_r3; 1472 struct { 1473 Pline_attrs line_attrs; /* line attributes */ 1474 } pet_r4; 1475 } pets; 1476 } Pstroke_data; 1477 1478 /* Pstroke_data3 -- stroke data record 3 */ 1479 typedef struct { 1480 Pint buffer_size; /* input buffer size */ 1481 Pint init_pos; /* initial editing position */ 1482 Pfloat x_interval; /* x interval */ 1483 Pfloat y_interval; /* y interval */ 1484 Pfloat z_interval; /* z interval */ 1485 Pfloat time_interval; /* time interval */ 1486 union { 1487 struct { 1488 Pint unused; 1489 } pet_r1; 1490 struct { 1491 Pint unused; 1492 } pet_r2; 1493 struct { 1494 Pmarker_attrs marker_attrs; /* marker attributes */ 1495 } pet_r3; 1496 struct { 1497 Pline_attrs line_attrs; /* marker attributes */ 1498 } pet_r4; 1499 } pets; 1500 } Pstroke_data3; 1501 1502 /* Pstring_data -- string data record */ 1503 typedef struct { 1504 Pint buffer_size; /* input buffer size */ 1505 Pint init_pos; /* initial editing position */ 1506 union { 1507 struct { 1508 Pint unused; 1509 } pet_r1; 1510 } pets; 1511 } Pstring_data; 1512 1513 typedef Pstring_data Pstring_data3; 1514 1515 1516 /* Pgdp_data -- gdp data record */ 1517 typedef union { 1518 struct { 1519 Pint unused; 1520 } gdp_r1; 1521 Pdata unsupp; /* unsupp GDP data record */ 1522 /* implementation dependent */ 1523 } Pgdp_data; 1524 1525 /* Pgdp_data3 -- gdp data record 3 */ 1526 typedef union { 1527 struct { 1528 Pint unused; 1529 } gdp3_r1; 1530 Pdata unsupp; /* nusupported GDP data record */ 1531 /* implementation dependent */ 1532 } Pgdp_data3; 1533 1534 /* Pgse_data -- gse data record */ 1535 typedef union { 1536 struct { 1537 Pint unused; 1538 } gse_r1; 1539 Pdata unsupp; /* unsupp GSE data record */ 1540 /* implementation dependent */ 1541 } Pgse_data; 1542 1543 typedef enum { 1544 PERRSYNC_OFF = 0, 1545 PERRSYNC_ON = 1 1546 } Perrsync; 1547 1548 /* Pescape_in_data -- escape in data record */ 1549 typedef union { 1550 struct { 1551 Perrsync sync_on; 1552 } escape_in_u1; 1553 struct { 1554 Pint ws_id; 1555 } escape_in_u2; 1556 struct { 1557 Pint ignore_DC_errors; /* ignore errors if non-zero */ 1558 } escape_in_u3; 1559 struct { 1560 Pint ws_id; 1561 Ppoint point; /* a drawable point -- not DC */ 1562 Pfloat ap_size; /* aperture size, DC length */ 1563 Ppath_order order; 1564 Pint depth; /* depth of path to return */ 1565 Pint pet; 1566 Pecho_switch echo_switch; 1567 Plimit3 echo_volume; 1568 Pfilter filter; /* detectibility filter */ 1569 } escape_in_u4; /* drawable point to pick */ 1570 struct { 1571 Pint ws_id; 1572 Ppoint_list3 points; /* x,y are drawable coords, z is DC*/ 1573 } escape_in_u5; /* drawable points to WC */ 1574 struct { 1575 Pint ws_id; 1576 Pint num_regions; 1577 XRectangle *regions; 1578 } escape_in_u6; /* redraw regions */ 1579 struct { 1580 Pint ws_id; 1581 } escape_in_u7; /* ws synch */ 1582 } Pescape_in_data; 1583 1584 /* Pescape_out_data -- escape out data record */ 1585 typedef union { 1586 struct { 1587 Pint err_ind; 1588 Display *display; /* may be returned as NULL */ 1589 XID drawable_id; 1590 XID input_overlay_id; /* will be 0 if category not OUTIN */ 1591 char *display_name; 1592 } escape_out_u2; 1593 struct { 1594 Pin_status status; 1595 Ppick_path pick; 1596 } escape_out_u4; 1597 struct { 1598 Pint view_index; 1599 Ppoint_list3 points; 1600 } escape_out_u5; 1601 } Pescape_out_data; 1602 1603 typedef union { 1604 Pint int_data; /* integer valued data */ 1605 Pfloat float_data; /* float valued data */ 1606 Ppoint_list3 point_list3; /* list of 3d points */ 1607 Ppoint_list point_list; /* list of 2d points */ 1608 Ppoint_list_list3 point_list_list3; /* list of 3d point lists */ 1609 Ppoint_list_list point_list_list; /* list of 2d point lists */ 1610 struct { 1611 Ppoint3 pos; /* text pt */ 1612 Pvec3 dir[2]; /* direction vectors */ 1613 char *char_string; /* text string */ 1614 } text3; 1615 struct { 1616 Ppoint pos; /* text pt */ 1617 char *char_string; /* text string */ 1618 } text; 1619 struct { 1620 Ppoint3 ref_point; /* reference pt */ 1621 Pvec3 offset; /* anno. pt/offset */ 1622 char *char_string; /* text string */ 1623 } anno_text_rel3; 1624 struct { 1625 Ppoint ref_point; /* reference pt */ 1626 Pvec offset; /* anno. pt/offset */ 1627 char *char_string; /* text string */ 1628 } anno_text_rel; 1629 struct { 1630 Pparal paral; /* parallelogram */ 1631 Ppat_rep colr_array; /* colour array */ 1632 } cell_array3; 1633 struct { 1634 Prect rect; /* rectangle */ 1635 Ppat_rep colr_array; /* colour array */ 1636 } cell_array; 1637 struct { 1638 Pint id; /* GDP3 id */ 1639 Ppoint_list3 point_list; /* pts */ 1640 Pgdp_data3 data; /* data record */ 1641 } gdp3; 1642 struct { 1643 Pint id; /* GDP id */ 1644 Ppoint_list point_list; /* pts */ 1645 Pgdp_data data; /* data record */ 1646 } gdp; 1647 Ptext_prec text_prec; /* text precision */ 1648 Pvec char_up_vec; /* char up vector */ 1649 Ptext_path text_path; /* text path */ 1650 Ptext_align text_align; /* text alignment */ 1651 Pint_style int_style; /* interior style */ 1652 Pedge_flag edge_flag; /* edge flag */ 1653 Ppoint pat_ref_point; /* pat ref pt */ 1654 Pfloat_size pat_size; /* pattern size */ 1655 struct { 1656 Ppoint3 ref_point; /* pattern ref. pt */ 1657 Pvec3 ref_vec[2]; /* vectors */ 1658 } pat_ref_point_vecs; 1659 Pint_list names; /* name sets */ 1660 struct { 1661 Paspect id; /* attribute id */ 1662 Pasf source; /* asf */ 1663 } asf; 1664 struct { 1665 Pcompose_type compose_type; /* composition type */ 1666 Pmatrix3 matrix; /* transformation matrix */ 1667 } local_tran3; 1668 struct { 1669 Pcompose_type compose_type; /* composition type */ 1670 Pmatrix matrix; /* transformation matrix */ 1671 } local_tran; 1672 Pmatrix3 global_tran3; /* global transform3 */ 1673 Pmatrix global_tran; /* global transform */ 1674 struct { 1675 Pint op; /* operator */ 1676 Phalf_space_list3 half_spaces; /* half-space list */ 1677 } model_clip3; 1678 struct { 1679 Pint op; /* operator */ 1680 Phalf_space_list half_spaces; /* half-space list */ 1681 } model_clip; 1682 Pclip_ind clip_ind; /* clipping indicator */ 1683 Pdata appl_data; /* application data */ 1684 struct { 1685 Pint id; /* GSE id */ 1686 Pgse_data data; /* GSE data record */ 1687 } gse; 1688 1689 /* PHIGS PLUS structure elements */ 1690 struct { 1691 Pint order; 1692 Pfloat_list knots; 1693 Prational rationality; 1694 Ppoint_list34 cpts; 1695 Pfloat min; 1696 Pfloat max; 1697 } nurb_curve; 1698 struct { 1699 Pint type; 1700 Pfloat value; 1701 } curv_approx; 1702 struct { 1703 Pint u_order; 1704 Pint v_order; 1705 Prational rationality; 1706 Pfloat_list uknots; 1707 Pfloat_list vknots; 1708 Ppoint_grid34 grid; 1709 Pint num_trim_loops; 1710 Ptrimcurve_list *trim_loops; 1711 } nurb_surf; 1712 struct { 1713 Pint type; 1714 Pfloat u_val; 1715 Pfloat v_val; 1716 } surf_approx; 1717 struct { 1718 Pint vflag; 1719 Pint colr_model; 1720 Pint npl; 1721 Pline_vdata_list3 *vdata; 1722 } plsd3; 1723 struct { 1724 Pint fflag; 1725 Pint eflag; 1726 Pint vflag; 1727 Pint colr_model; 1728 Pfacet_data3 fdata; 1729 Pint nfa; 1730 Pedge_data_list *edata; 1731 Pfacet_vdata_list3 *vdata; 1732 } fasd3; 1733 struct { 1734 Pint fflag; 1735 Pint vflag; 1736 Pint colr_model; 1737 Pint nv; /* number of vertices */ 1738 Pfacet_data_arr3 fdata; 1739 Pfacet_vdata_arr3 vdata; 1740 } tsd3; 1741 struct { 1742 Pint fflag; 1743 Pint vflag; 1744 Pint colr_model; 1745 Pint_size dim; 1746 Pfacet_data_arr3 fdata; 1747 Pfacet_vdata_arr3 vdata; 1748 } qmd3; 1749 struct { 1750 Pint fflag; 1751 Pint eflag; 1752 Pint vflag; 1753 Pint colr_model; 1754 Pint num_sets; 1755 Pfacet_data_arr3 fdata; 1756 Pedge_data_list_list *edata; 1757 Pint_list_list *vlist; 1758 Pfacet_vdata_list3 vdata; 1759 } sofas3; 1760 struct { 1761 Pparal paral; /* parallelogram */ 1762 Ppat_rep_plus colr_array; /* colour array */ 1763 } cell_array_plus; 1764 Pgcolr colr; 1765 Prefl_props props; 1766 struct { 1767 Pint_list activation; 1768 Pint_list deactivation; 1769 } lss; 1770 Pcull_mode cull_mode; /* culling mode */ 1771 Pdisting_mode disting_mode; /* distinguishing mode */ 1772 struct { 1773 Pint type; 1774 Ppara_surf_characs data; 1775 } para_surf_characs; /* parametric surface characteristics */ 1776 } Pelem_data; 1777 1778 /* Explicitly defined portions of unbounded ranges. */ 1779 1780 /* Colour models */ 1781 #define PINDIRECT (0) 1782 #define PMODEL_RGB (1) 1783 #define PMODEL_CIELUV (2) 1784 #define PMODEL_HSV (3) 1785 #define PMODEL_HLS (4) 1786 1787 /* Rendering colour models */ 1788 #define PRCM_WS_DEP (0) 1789 #define PRCM_RGB (PMODEL_RGB) 1790 #define PRCM_CIE (PMODEL_CIELUV) 1791 #define PRCM_HSV (PMODEL_HSV) 1792 #define PRCM_HLS (PMODEL_HLS) 1793 1794 /* Vertex data flags */ 1795 #define PVERT_COORD (0) 1796 #define PVERT_COORD_COLOUR (1) 1797 #define PVERT_COORD_NORMAL (2) 1798 #define PVERT_COORD_COLOUR_NORMAL (3) 1799 1800 /* Edge data flags */ 1801 #define PEDGE_NONE (0) 1802 #define PEDGE_VISIBILITY (1) 1803 1804 /* Facet data flags */ 1805 #define PFACET_NONE (0) 1806 #define PFACET_COLOUR (1) 1807 #define PFACET_NORMAL (2) 1808 #define PFACET_COLOUR_NORMAL (3) 1809 1810 /* Line types */ 1811 #define PLINE_SOLID (1) 1812 #define PLINE_DASH (2) 1813 #define PLINE_DOT (3) 1814 #define PLINE_DASH_DOT (4) 1815 1816 /* Marker types */ 1817 #define PMARKER_DOT (1) 1818 #define PMARKER_PLUS (2) 1819 #define PMARKER_ASTERISK (3) 1820 #define PMARKER_CIRCLE (4) 1821 #define PMARKER_CROSS (5) 1822 1823 /* Annotation styles */ 1824 #define PANNO_STYLE_UNCONNECTED (1) 1825 #define PANNO_STYLE_LEAD_LINE (2) 1826 1827 /* Prompt and echo types */ 1828 #define PLOC_DEF (1) 1829 #define PLOC_CROSS_HAIR (2) 1830 #define PLOC_TRACK_CROSS (3) 1831 #define PLOC_RUB_BAND (4) 1832 #define PLOC_RECT (5) 1833 #define PLOC_DIGIT (6) 1834 1835 #define PSTROKE_DEF (1) 1836 #define PSTROKE_DIGIT (2) 1837 #define PSTROKE_MARKER (3) 1838 #define PSTROKE_LINE (4) 1839 1840 #define PVAL_DEF (1) 1841 #define PVAL_GRAPH (2) 1842 #define PVAL_DIGIT (3) 1843 1844 #define PCHOICE_DEF (1) 1845 #define PCHOICE_PR_ECHO (2) 1846 #define PCHOICE_STRING_PR (3) 1847 #define PCHOICE_STRING_IN (4) 1848 #define PCHOICE_STRUCT (5) 1849 1850 #define PPICK_DEF (1) 1851 #define PPICK_GROUP_HIGHL (2) 1852 #define PPICK_STRUCT_NETWORK (3) 1853 1854 #define PSTRING_DEF (1) 1855 1856 /* Modelling clip operator */ 1857 #define PMC_REPLACE (1) 1858 #define PMC_INTERSECT (2) 1859 1860 /* curve approximation methods */ 1861 #define PCURV_WS_DEP (1) 1862 #define PCURV_CONSTANT_PARAMETRIC_BETWEEN_KNOTS (2) 1863 #define PCURV_CHORDAL_SIZE_WC (3) 1864 #define PCURV_CHORDAL_SIZE_NPC (4) 1865 #define PCURV_CHORDAL_SIZE_DC (5) 1866 #define PCURV_CHORDAL_DEVIATION_WC (6) 1867 #define PCURV_CHORDAL_DEVIATION_NPC (7) 1868 #define PCURV_CHORDAL_DEVIATION_DC (8) 1869 1870 /* surface approximation methods */ 1871 #define PSURF_WS_DEP (1) 1872 #define PSURF_CONSTANT_PARAMETRIC_BETWEEN_KNOTS (2) 1873 #define PSURF_CHORDAL_SIZE_WC (3) 1874 #define PSURF_CHORDAL_SIZE_NPC (4) 1875 #define PSURF_CHORDAL_SIZE_DC (5) 1876 #define PSURF_PLANAR_DEVIATION_WC (6) 1877 #define PSURF_PLANAR_DEVIATION_NPC (7) 1878 #define PSURF_PLANAR_DEVIATION_DC (8) 1879 1880 /* Polyline shading methods */ 1881 #define PSD_NONE (1) 1882 #define PSD_COLOUR (2) 1883 1884 /* Additional shading method constants for interior shading method */ 1885 #define PSD_DOT_PRODUCT (3) 1886 #define PSD_NORMAL (4) 1887 1888 /* Parametric surface characteristics types */ 1889 #define PSC_NONE (1) 1890 #define PSC_WS_DEP (2) 1891 #define PSC_ISOPARAMETRIC_CURVES (3) 1892 #define PSC_LEVEL_CURVES_MC (4) 1893 #define PSC_LEVEL_CURVES_WC (5) 1894 1895 /* Reflectance Equation Constants */ 1896 #define PREFL_NONE (1) /* No reflectance calculation */ 1897 #define PREFL_AMBIENT (2) /* Use ambient term */ 1898 #define PREFL_AMB_DIFF (3) /* Use ambient and diffuse terms */ 1899 #define PREFL_AMB_DIFF_SPEC (4) /* Use ambient, diffuse & spec. terms */ 1900 1901 /* Light Source Types */ 1902 #define PLIGHT_AMBIENT (1) 1903 #define PLIGHT_DIRECTIONAL (2) 1904 #define PLIGHT_POSITIONAL (3) 1905 #define PLIGHT_SPOT (4) 1906 1907 /* Colour Mapping Methods */ 1908 #define PCOLR_MAP_TRUE (1) 1909 #define PCOLR_MAP_PSEUDO (2) 1910 #define PCOLR_MAP_PSEUDO_N (3) 1911 1912 1913 /* Global to hold specified X server */ 1914 extern char *phg_x_server_name; 1915 1916 /* Preferred argument to OPEN PHIGS */ 1917 #define PDEF_MEM_SIZE ((size_t) (-1)) 1918 #define PDEF_ERR_FILE ((char *) (0)) 1919 1920 #define PHIGS_MAX_NAME_LEN (255) 1921 1922 /* Character set numbers */ 1923 #define PCS_ASCII (0) 1924 1925 /* Font numbers */ 1926 #define PFONT_MONO (1) 1927 1928 /* Implementation dependent escape numbers */ 1929 #define PUESC_ERRSYNC (-1) 1930 #define PUESC_DPYINFO (-2) 1931 #define PUESC_IGNORE_DC_ERRORS (-3) 1932 #define PUESC_DRAWABLE_POINT_TO_PICK (-4) 1933 #define PUESC_DRAWABLE_POINTS_TO_WC (-5) 1934 #define PUESC_REDRAW_REGIONS (-6) 1935 #define PUESC_WS_SYNCH (-7) 1936 1937 /* HLHSR constants */ 1938 #define PHIGS_HLHSR_MODE_NONE (0) 1939 #define PHIGS_HLHSR_MODE_ZBUFF (1) 1940 #define PHIGS_HLHSR_MODE_PAINTERS (2) 1941 #define PHIGS_HLHSR_MODE_SCANLINE (3) 1942 #define PHIGS_HLHSR_MODE_LINE_ONLY (4) 1943 1944 #define PHIGS_HLHSR_ID_OFF (0) 1945 #define PHIGS_HLHSR_ID_ON (1) 1946 1947 /* Multi-buffering constants. */ 1948 #define PHIGS_BUF_SINGLE (0) 1949 #define PHIGS_BUF_DOUBLE (1) 1950 1951 typedef enum { 1952 PHIGS_X_TOOL, 1953 PHIGS_X_DRAWABLE 1954 } Phigs_base_name; 1955 1956 typedef enum { 1957 PHIGS_DC_LIMITS_FIXED, 1958 PHIGS_DC_LIMITS_ADJUST_TO_WINDOW 1959 } Phigs_DC_model; 1960 1961 #define ATTR_PKG_PHIGS (PHG_ATTR_PKG_UNUSED_FIRST + 1) 1962 #define PHIGS_FIRST_ATTR (1) 1963 1964 #define PHIGS_DEFAULT_DC_DEPTH (1.0) 1965 #define PHIGS_DEFAULT_TOOL_X (50) 1966 #define PHIGS_DEFAULT_TOOL_Y (50) 1967 #define PHIGS_DEFAULT_TOOL_WIDTH (600) 1968 #define PHIGS_DEFAULT_TOOL_HEIGHT (600) 1969 #define PHIGS_DEFAULT_TOOL_LABEL ("PHIGS Workstation") 1970 #define PHIGS_DEFAULT_TOOL_ICON_LABEL ("") 1971 #define PHIGS_DEFAULT_TOOL_BORDER_WIDTH (0) 1972 1973 #define PHIGS_ATTR( type, ordinal) \ 1974 PHG_ATTR( ATTR_PKG_PHIGS, type, ordinal) 1975 1976 #define PHIGS_ATTR_ORDINAL( attr ) \ 1977 PHG_ATTR_ORDINAL((attr)) - PHIGS_FIRST_ATTR 1978 1979 typedef enum { 1980 /* generic attributes start at 1 */ 1981 PHG_BASE_NAME = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 5), 1982 #define PHIGS_BASE_NAME (char *)PHG_BASE_NAME 1983 1984 /* generic X attributes start at 25 */ 1985 /* PHIGS_X_DISPLAY can only be set. Only the name is remembered. */ 1986 PHG_X_DISPLAY = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 25), 1987 #define PHIGS_X_DISPLAY (char *)PHG_X_DISPLAY 1988 PHG_X_DISPLAY_NAME= PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 26), 1989 #define PHIGS_X_DISPLAY_NAME (char *)PHG_X_DISPLAY_NAME 1990 PHG_X_DISPLAY_WINDOW= PHIGS_ATTR( PHG_ATTR_INT_PAIR, PHIGS_FIRST_ATTR + 27), 1991 #define PHIGS_X_DISPLAY_WINDOW (char *)PHG_X_DISPLAY_WINDOW 1992 PHG_X_BUF_MODE = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 29), 1993 #define PHIGS_X_BUF_MODE (char *)PHG_X_BUF_MODE 1994 PHG_X_HANDLE_EXPOSE = PHIGS_ATTR( PHG_ATTR_BOOLEAN, PHIGS_FIRST_ATTR + 31), 1995 #define PHIGS_X_HANDLE_EXPOSE (char *)PHG_X_HANDLE_EXPOSE 1996 PHG_X_HANDLE_DESTROY = PHIGS_ATTR( PHG_ATTR_BOOLEAN, PHIGS_FIRST_ATTR + 32), 1997 #define PHIGS_X_HANDLE_DESTROY (char *)PHG_X_HANDLE_DESTROY 1998 PHG_DC_MODEL = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 33), 1999 #define PHIGS_DC_MODEL (char *)PHG_DC_MODEL 2000 PHG_X_CMAP_PROP_ATOM = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 34), 2001 #define PHIGS_X_CMAP_PROP_ATOM (char *)PHG_X_CMAP_PROP_ATOM 2002 2003 /* tool attributes start at 50 */ 2004 PHG_TOOL_WIDTH = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 50), 2005 #define PHIGS_TOOL_WIDTH (char *)PHG_TOOL_WIDTH 2006 PHG_TOOL_HEIGHT = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 51), 2007 #define PHIGS_TOOL_HEIGHT (char *)PHG_TOOL_HEIGHT 2008 PHG_TOOL_X = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 52), 2009 #define PHIGS_TOOL_X (char *)PHG_TOOL_X 2010 PHG_TOOL_Y = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 53), 2011 #define PHIGS_TOOL_Y (char *)PHG_TOOL_Y 2012 PHG_TOOL_LABEL = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 54), 2013 #define PHIGS_TOOL_LABEL (char *)PHG_TOOL_LABEL 2014 PHG_TOOL_ICON_LABEL = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 55), 2015 #define PHIGS_TOOL_ICON_LABEL (char *)PHG_TOOL_ICON_LABEL 2016 PHG_TOOL_BORDER_WIDTH = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 56), 2017 #define PHIGS_TOOL_BORDER_WIDTH (char *)PHG_TOOL_BORDER_WIDTH 2018 2019 /* Phigs attributes start at 150 */ 2020 PHG_WS_CATEGORY = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 150) 2021 #define PHIGS_WS_CATEGORY (char *)PHG_WS_CATEGORY 2022 2023 } Phigs_ws_type_attr; 2024 2025 /* Pxphigs_info_mask values */ 2026 #define PXPHIGS_INFO_DISPLAY (1L << 0) 2027 #define PXPHIGS_INFO_RMDB (1L << 1) 2028 #define PXPHIGS_INFO_APPL_ID (1L << 2) 2029 #define PXPHIGS_INFO_ARGS (1L << 3) 2030 #define PXPHIGS_INFO_FLAGS_NO_MON (1L << 4) 2031 #define PXPHIGS_INFO_FLAGS_CLIENT_SS (1L << 5) 2032 2033 typedef struct { 2034 Display *display; /* valid display pointer. */ 2035 XrmDatabase rmdb; /* a valid database */ 2036 struct { 2037 char *name; 2038 char *class_name; 2039 } appl_id; /* for resolving database attributes */ 2040 struct { 2041 int *argc_p; 2042 char **argv; 2043 } args; /* for merging args into specified database */ 2044 struct { 2045 unsigned no_monitor: 1; /* 1 ==> monitor will not be executed */ 2046 unsigned force_client_SS; /* 1 ==> always use client-side CSS */ 2047 } flags; 2048 } Pxphigs_info; 2049 2050 /* These are declared here because they return types defined here. */ 2051 extern Pint phigs_ws_type_create( 2052 #if NeedVarargsPrototypes 2053 Pint, ... 2054 #endif 2055 ); 2056 #if NeedVarargsPrototypes 2057 typedef struct _Wst *_PxphigsWst; /* kludge! */ 2058 #endif 2059 extern caddr_t phigs_ws_type_set( 2060 #if NeedVarargsPrototypes 2061 _PxphigsWst, ... 2062 #endif 2063 ); 2064 extern caddr_t phigs_ws_type_get(); 2065 2066 #endif 2067