Annotation of pmsdk/include/pmord.h, revision 1.1.1.1

1.1       root        1: /****************************** Module Header ******************************\
                      2: *
                      3: * Module Name: PMORD.H
                      4: *
                      5: * This is the include file which defines all the structures and constants
                      6: * that can be used to build or intepret GOCA orders for the GPI
                      7: *
                      8: * Copyright (c) 1988  Microsoft Corporation
                      9: * Copyright (c) 1988  IBM Corporation
                     10: *
                     11: * ==========================================================================
                     12: *
                     13: * The orders fall into 4 categories :-
                     14: *
                     15: * 1) 1-byte orders
                     16: *
                     17: * 2) 2-byte orders    - second byte contains the value
                     18: *
                     19: * 3) Long orders      - second byte gives the order length, subsequent bytes
                     20: *                       contain the values (up to 256 bytes long)
                     21: *
                     22: * 4) Very long orders - third and fourth bytes gives the order length,
                     23: *                       subsequent bytes contain the values (up to 64K long)
                     24: *
                     25: \***************************************************************************/
                     26:  
                     27: /***************************************************************************\
                     28: *
                     29: * Miscellaneous structures used in this file
                     30: *
                     31: \***************************************************************************/
                     32:  
                     33: /* form of RECTL with shorts instead of longs */
                     34: typedef struct _RECT1S {      /* rcs */
                     35:     SHORT xLeft;
                     36:     SHORT yBottom;
                     37:     SHORT xRight;
                     38:     SHORT yTop;
                     39: } RECT1S;
                     40:  
                     41: /* form of POINTL with shorts instead of longs */
                     42: typedef struct _POINTS {        /* pts */
                     43:   SHORT  x;
                     44:   SHORT  y;
                     45: } POINTS;
                     46:  
                     47: /* form of POINTL with 1 byte offsets instead of longs */
                     48: typedef struct _ODPOINT {       /* odpt */
                     49:   CHAR   dx;
                     50:   CHAR   dy;
                     51: } ODPOINT;
                     52:  
                     53: /* form of SIZEL with shorts instead of longs */
                     54: typedef struct _SIZES {         /* sizs */
                     55:   SHORT  cx;
                     56:   SHORT  cy;
                     57: } SIZES;
                     58:  
                     59: /* unsigned two-byte swapped integer */
                     60: typedef struct _SWPUSHORT {     /* swpus */
                     61:   UCHAR  HiByte;
                     62:   UCHAR  LoByte;
                     63: } SWPUSHORT;
                     64:  
                     65: /***************************************************************************\
                     66: *
                     67: * 1-byte orders
                     68: *
                     69: \***************************************************************************/
                     70:  
                     71: /* macro to tell whether this is a 1-byte order */
                     72: #define BYTE_ORDER(oc)   ((oc)==OCODE_GNOP1 || (oc)==OCODE_GESD)
                     73:  
                     74: /* 1-byte order codes */
                     75: #define OCODE_GNOP1    0x00            /* No-operation                */
                     76: #define OCODE_GESD     0xFF            /* End symbol definition       */
                     77:  
                     78: /***************************************************************************\
                     79: *
                     80: * 2-byte orders
                     81: *
                     82: \***************************************************************************/
                     83:  
                     84: /* definitions to help determine whether an order code is a 2-byte order */
                     85: #define OCODE2_1       0x80
                     86: #define OCODE2_2       0x88
                     87:  
                     88: #define SHORT_ORDER(oc)  ((((oc)^OCODE2_1)&OCODE2_2)==OCODE2_2)
                     89:  
                     90: /* General 2-byte order structure */
                     91: typedef struct _ORDER {         /* ord */
                     92:   UCHAR  idCode;
                     93:   UCHAR  uchData;
                     94: } ORDER;
                     95:  
                     96: /* 2-byte order codes */
                     97: #define OCODE_GBAR     0x68            /* Begin area                  */
                     98: #define OCODE_GCFIG    0x7D            /* Close figure                */
                     99: #define OCODE_GEEL     0x49            /* End element                 */
                    100: #define OCODE_GEPTH    0x7F            /* End path                    */
                    101: #define OCODE_GEPROL   0x3E            /* End prologue                */
                    102: #define OCODE_GPOP     0x3F            /* Pop                         */
                    103: #define OCODE_GSBMX    0x0D            /* Set background mix          */
                    104: #define OCODE_GPSBMX   0x4D            /* Push & set b/g mix          */
                    105: #define OCODE_GSCD     0x3A            /* Set char direction          */
                    106: #define OCODE_GPSCD    0x7A            /* Push & set char direction   */
                    107: #define OCODE_GSCR     0x39            /* Set char precision          */
                    108: #define OCODE_GPSCR    0x79            /* Push & set char precision   */
                    109: #define OCODE_GSCS     0x38            /* Set char set                */
                    110: #define OCODE_GPSCS    0x78            /* Push & set char set         */
                    111: #define OCODE_GSCOL    0x0A            /* Set color                   */
                    112: #define OCODE_GPSCOL   0x4A            /* Push & set color            */
                    113: #define OCODE_GSLE     0x1A            /* Set line end                */
                    114: #define OCODE_GPSLE    0x5A            /* Push & set line end         */
                    115: #define OCODE_GSLJ     0x1B            /* Set line join               */
                    116: #define OCODE_GPSLJ    0x5B            /* Push & set line join        */
                    117: #define OCODE_GSLT     0x18            /* Set line type               */
                    118: #define OCODE_GPSLT    0x58            /* Push & set line type        */
                    119: #define OCODE_GSLW     0x19            /* Set line width              */
                    120: #define OCODE_GPSLW    0x59            /* Push & set line width       */
                    121: #define OCODE_GSMP     0x3B            /* Set marker precision        */
                    122: #define OCODE_GPSMP    0x7B            /* Push & set marker precision */
                    123: #define OCODE_GSMS     0x3C            /* Set marker set              */
                    124: #define OCODE_GPSMS    0x7C            /* Push & set marker set       */
                    125: #define OCODE_GSMT     0x29            /* Set marker symbol           */
                    126: #define OCODE_GPSMT    0x69            /* Push & set marker symbol    */
                    127: #define OCODE_GSMX     0x0C            /* Set mix                     */
                    128: #define OCODE_GPSMX    0x4C            /* Push & set mix              */
                    129: #define OCODE_GSPS     0x08            /* Set pattern set             */
                    130: #define OCODE_GPSPS    0x48            /* Push & set pattern set      */
                    131: #define OCODE_GSPT     0x28            /* Set pattern symbol          */
                    132: #define OCODE_GPSPT    0x09            /* Push & set pattern symbol   */
                    133:  
                    134: /* constants for 2-byte orders */
                    135:  
                    136: /* Begin area */
                    137: #define GBAR_RESERVED   0x80
                    138: #define GBAR_BOUNDARY   0xC0
                    139: #define GBAR_NOBOUNDARY 0x80
                    140: #define GBAR_WINDING    0xA0
                    141: #define GBAR_ALTERNATE  0x80
                    142:  
                    143: /* Set Character Precision */
                    144: #define GSCR_NOADJUST   0x80
                    145: #define GSCR_ADJUST     0x00
                    146: #define GSCR_PRESERVE   0x40
                    147: #define GSCR_NOPRESERVE 0x00
                    148: #define GSCR_PRECISION  0x0F
                    149:  
                    150: /***************************************************************************\
                    151: *
                    152: * Long orders
                    153: *
                    154: \***************************************************************************/
                    155:  
                    156: /* definitions to help determine whether an order code is a long order */
                    157:  
                    158: #define OCODE_VLONG    0xFE
                    159:  
                    160: #define LONG_ORDER(oc) (!((oc)==OCODE_VLONG||BYTE_ORDER(oc)||SHORT_ORDER(oc)))
                    161:  
                    162: /* long order structure */
                    163: #define LORDER_ML 253
                    164: typedef struct _LORDER {        /* lord */
                    165:   UCHAR  idCode;
                    166:   UCHAR  uchLength;
                    167:   UCHAR  uchData[LORDER_ML];
                    168: } LORDER;
                    169:  
                    170: /* Long orders for which the length of data is normally zero */
                    171: #define OCODE_GEAR     0x60            /* End Area                    */
                    172: #define OCODE_GEIMG    0x93            /* End Image                   */
                    173:  
                    174: /* Long orders for which the data is contained in a type already defined */
                    175:  
                    176: /* Character String */
                    177: #define OCODE_GCCHST   0x83            /* char string at curr posn    */
                    178: #define GCCHST_MC      255             /* Max len of string in bytes  */
                    179:  
                    180: #define OCODE_GCHST    0xC3            /* char string at given pos    */
                    181: #define GCHST_SMC      251             /* Max len of string (S)       */
                    182: #define GCHST_LMC      247             /* Max len of string (L)       */
                    183:  
                    184: /* Character String Move */
                    185: #define OCODE_GCCHSTM  0xB1            /* char string move at c.p.    */
                    186: #define GCCHSTM_MC     255             /* Max len of string in byte   */
                    187:  
                    188: #define OCODE_GCHSTM   0xF1            /* char string move at g.p.    */
                    189: #define GCHSTM_SMC     251             /* Max len of string (S)       */
                    190: #define GCHSTM_LMC     247             /* Max len of string (L)       */
                    191:  
                    192: /* Comment */
                    193: #define OCODE_GCOMT    0x01            /* Comment                     */
                    194: #define GCOMT_ML       255             /* Maximum len of comment data */
                    195:  
                    196: /* Image */
                    197: #define OCODE_GIMD     0x92            /* Image data                  */
                    198: #define GIMD_ML        255             /* Maximum len of image data   */
                    199:  
                    200: /* Delete Path */
                    201: #define OCODE_GDPTH    0xDA            /* Delete path                 */
                    202:  
                    203: /* Fill Path */
                    204: #define OCODE_GFPTH    0xD7            /* Fill path                   */
                    205:  
                    206: /* Outline Path */
                    207: #define OCODE_GOPTH    0xd6            /* Outline path                */
                    208:  
                    209: /* Select Clip Path */
                    210: #define OCODE_GSCPTH   0xD9            /* Select clip path            */
                    211:  
                    212: /* Full Arc */
                    213: #define OCODE_GCFARC   0x87            /* full arc at current posn    */
                    214: #define OCODE_GFARC    0xC7            /* full arc at given posn      */
                    215:  
                    216: /* Label */
                    217: #define OCODE_GLABL    0xD3            /* Label                       */
                    218:  
                    219: /* Set Current Position */
                    220: #define OCODE_GSCP     0x21            /* Set current position        */
                    221: #define OCODE_GPSCP    0x61            /* Push and set curr posn      */
                    222:  
                    223: /* Bezier spline */
                    224: #define OCODE_GCBEZ    0xA5            /* Bezier spline at curr pos   */
                    225: #define GCBEZ_SMB      21              /* Max number of splines (S)   */
                    226: #define GCBEZ_LMB      10              /* Max number of splines (L)   */
                    227:  
                    228: #define OCODE_GBEZ     0xE5            /* Bezier spline at given pos  */
                    229: #define GBEZ_SMB       20              /* Max number of splines (S)   */
                    230: #define GBEZ_LMB       10              /* Max number of splines (L)   */
                    231:  
                    232: /* Fillet */
                    233: #define OCODE_GCFLT    0x85            /* fillet at current posn      */
                    234: #define GCFLT_SMP      63              /* Max number of points (S)    */
                    235: #define GCFLT_LMP      31              /* Max number of points (L)    */
                    236:  
                    237: #define OCODE_GFLT     0xC5            /* fillet at given position    */
                    238: #define GFLT_SMP       62              /* Max number of points (S)    */
                    239: #define GFLT_LMP       30              /* Max number of points (L)    */
                    240:  
                    241: /* Polyline */
                    242: #define OCODE_GCLINE   0x81            /* polyline at current posn    */
                    243: #define GCLINE_SMP     63              /* Max number of points (S)    */
                    244: #define GCLINE_LMP     31              /* Max number of points (L)    */
                    245:  
                    246: #define OCODE_GLINE    0xC1            /* polyline at given posn      */
                    247: #define GLINE_SMP      62              /* Max number of points (S)    */
                    248: #define GLINE_LMP      30              /* Max number of points (L)    */
                    249:  
                    250: /* Polymarker */
                    251: #define OCODE_GCMRK    0x82            /* marker at current posn      */
                    252: #define GCMRK_SMP      63              /* Max number of points (S)    */
                    253: #define GCMRK_LMP      31              /* Max number of points (L)    */
                    254:  
                    255: #define OCODE_GMRK     0xC2            /* marker at given posn        */
                    256: #define GMRK_SMP       62              /* Max number of points (S)    */
                    257: #define GMRK_LMP       30              /* Max number of points (L)    */
                    258:  
                    259: /* Relative Line */
                    260: #define OCODE_GCRLINE  0xA1            /* Relative line at curr pos   */
                    261: #define GCRLINE_MP     127             /* Max number of points        */
                    262:  
                    263: #define OCODE_GRLINE   0xE1            /* Relative line at givn pos   */
                    264: #define GRLINE_SMP     125             /* Max number of points (S)    */
                    265: #define GRLINE_LMP     123             /* Max number of points (L)    */
                    266:  
                    267: /* Set Background Color */
                    268: #define OCODE_GSBCOL   0x25            /* Set background color        */
                    269: #define OCODE_GPSBCOL  0x65            /* Push and set b/g color      */
                    270:  
                    271: /* Set Extended Color */
                    272: #define OCODE_GSECOL   0x26            /* Set extended color          */
                    273: #define OCODE_GPSECOL  0x66            /* Push and set ext color      */
                    274:  
                    275: /* Extended Color values */
                    276: #define SECOL_DEFAULT0  0x0000
                    277: #define SECOL_DEFAULT1  0xFF00
                    278: #define SECOL_NEUTRAL   0xFF07
                    279: #define SECOL_RESET     0xFF08
                    280: #define SECOL_ALLONES   0xFF09
                    281: #define SECOL_ALLZEROES 0xFF0A
                    282:  
                    283: /* Set Character Angle */
                    284: #define OCODE_GSCA     0x34            /* Set character angle         */
                    285: #define OCODE_GPSCA    0x74            /* Push and set char angle     */
                    286:  
                    287: /* Set Character Shear */
                    288: #define OCODE_GSCH     0x35            /* Set character shear         */
                    289: #define OCODE_GPSCH    0x75            /* Push and set char shear     */
                    290:  
                    291: /* Set Fractional Line Width */
                    292: #define OCODE_GSFLW    0x11            /* Set fractional line width   */
                    293: #define OCODE_GPSFLW   0x51            /* Push and set frac l width   */
                    294:  
                    295: /* Set Pick Identifier */
                    296: #define OCODE_GSPIK    0x43            /* Set pick identifier         */
                    297: #define OCODE_GPSPIK   0x23            /* Push and set pick id        */
                    298:  
                    299:  
                    300: /* Long Orders for which a structure can be defined for the data */
                    301:  
                    302: /* Arc */
                    303: #define OCODE_GCARC    0x86            /* Arc at Current Position     */
                    304: #define OCODE_GARC     0xC6            /* Arc at Given Position       */
                    305:  
                    306: typedef struct _ORDERS_GCARC {  /* osgcarc */
                    307:   POINTS ptInter;
                    308:   POINTS ptEnd;
                    309: } ORDERS_GCARC;
                    310:  
                    311: typedef struct _ORDERL_GCARC {  /* olgcarc */
                    312:   POINTL ptInter;
                    313:   POINTL ptEnd;
                    314: } ORDERL_GCARC;
                    315:  
                    316: /* Begin Element */
                    317: #define OCODE_GBEL     0xD2            /* Begin Element               */
                    318:  
                    319: #define GBEL_DL        251
                    320: typedef struct _ORDER_GBEL {    /* ogbel */
                    321:   LONG   lElementType;
                    322:   CHAR   achDesc[GBEL_DL];
                    323: } ORDER_GBEL;
                    324:  
                    325: /* Begin Image */
                    326: #define OCODE_GCBIMG   0x91            /* Begin Image at curr posn    */
                    327: #define OCODE_GBIMG    0xD1            /* Begin Image at given posn   */
                    328:  
                    329: typedef struct _ORDER_GCBIMG {  /* ogbimg */
                    330:   UCHAR     uchFormat;
                    331:   UCHAR     uchReserved;
                    332:   SWPUSHORT cx;
                    333:   SWPUSHORT cy;
                    334: } ORDER_GCBIMG;
                    335:  
                    336: /* Begin Path */
                    337: #define OCODE_GBPTH    0xD0            /* Begin Path                  */
                    338:  
                    339: typedef struct _ORDER_GBPTH {   /* ogbpth */
                    340:   LONG   idPath;
                    341:   UCHAR  cmdMode;
                    342: } ORDER_GBPTH;
                    343:  
                    344: #define GBPTH_1D          0x00
                    345: #define GBPTH_2DALTERNATE 0x01
                    346: #define GBPTH_2DWINDING   0x02
                    347:  
                    348: /* Box */
                    349: #define OCODE_GCBOX    0x80            /* Box at current position     */
                    350: #define OCODE_GBOX     0xC0            /* Box at given position       */
                    351:  
                    352: typedef struct _ORDERS_GCBOX {  /* osgcbox */
                    353:   UCHAR  fbFlags;
                    354:   UCHAR  uchReserved;
                    355:   POINTS ptCorner;
                    356:   SHORT  hAxis;
                    357:   SHORT  vAxis;
                    358: } ORDERS_GCBOX;
                    359:  
                    360: typedef struct _ORDERL_GCBOX {  /* olgcbox */
                    361:   UCHAR  fbFlags;
                    362:   UCHAR  uchReserved;
                    363:   POINTL ptCorner;
                    364:   LONG   hAxis;
                    365:   LONG   vAxis;
                    366: } ORDERL_GCBOX;
                    367:  
                    368: #define GCBOX_FILL     0x40
                    369: #define GCBOX_BOUNDARY 0x20
                    370:  
                    371: /* Call Segment */
                    372: #define OCODE_GCALLS   0x07            /* call segment                */
                    373:  
                    374: typedef struct _ORDER_GCALLS {  /* ogcalls */
                    375:   USHORT sReserved;
                    376:   LONG   idSegment;
                    377: } ORDER_GCALLS;
                    378:  
                    379: /* Combine Paths */
                    380: #define OCODE_GCPTH    0xD4            /* Combine paths               */
                    381:  
                    382: typedef struct _ORDER_GCPTH {   /* ogcpth */
                    383:   LONG   idSrc1Path;
                    384:   LONG   idSrc2Path;
                    385:   LONG   idDestPath;
                    386:   UCHAR  cmdMode;
                    387: } ORDER_GCPTH;
                    388:  
                    389: #define GCPTH_OR       0x01
                    390: #define GCPTH_COPY     0x02
                    391: #define GCPTH_XOR      0x04
                    392: #define GCPTH_AND      0x06
                    393: #define GCPTH_DIFF     0x07
                    394:  
                    395: /* Modify Path */
                    396: #define OCODE_GMPTH 0xD4               /* modify path                 */
                    397:  
                    398: typedef struct _ORDER_GMPTH {   /* ogmpth */
                    399:   LONG   idPath;
                    400:   UCHAR  cmdMode;
                    401: } ORDER_GMPTH;
                    402:  
                    403: #define GMPTH_BOUNDARY  0x00
                    404: #define GMPTH_INVERT    0x01
                    405: #define GMPTH_CLIP      0x02
                    406: #define GMPTH_WINDING   0x03
                    407: #define GMPTH_ALTERNATE 0x04
                    408: #define GMPTH_STROKE    0x05
                    409:  
                    410: /* Partial Arc */
                    411: #define OCODE_GCPARC   0xA3            /* Partial arc at curr posn    */
                    412: #define OCODE_GPARC    0xE3            /* Partial arc at given posn   */
                    413:  
                    414: typedef struct _ORDERS_GCPARC { /* osgcparc */
                    415:   POINTS   ptCenter;
                    416:   FIXED    ufxMultiplier;
                    417:   USHORT   usStartAngle;
                    418:   USHORT   usSweepAngle;
                    419: } ORDERS_GCPARC;
                    420:  
                    421: typedef struct _ORDERL_GCPARC { /* olgcparc */
                    422:   POINTL   ptCenter;
                    423:   FIXED    ufxMultiplier;
                    424:   USHORT   usStartAngle;
                    425:   USHORT   usSweepAngle;
                    426: } ORDERL_GCPARC;
                    427:  
                    428: /* Set Arc Parameters */
                    429: #define OCODE_GSAP     0x22            /* Set arc parameters          */
                    430: #define OCODE_GPSAP    0x62            /* Push and set arc params     */
                    431:  
                    432: typedef struct _ORDERS_GSAP {   /* osgsap */
                    433:   SHORT  p;
                    434:   SHORT  q;
                    435:   SHORT  r;
                    436:   SHORT  s;
                    437: } ORDERS_GSAP;
                    438:  
                    439: typedef struct _ORDERL_GSAP {   /* olgsap */
                    440:   LONG   p;
                    441:   LONG   q;
                    442:   LONG   r;
                    443:   LONG   s;
                    444: } ORDERL_GSAP;
                    445:  
                    446: /* Set Background Indexed Color */
                    447: #define OCODE_GSBICOL  0xA7            /* Set b/g indexed color       */
                    448: #define OCODE_GPSBICOL 0xE7            /* Push and set b/g ind color  */
                    449: #define OCODE_GSICOL   0xA6            /* Set indexed color           */
                    450: #define OCODE_GPSICOL  0xE6            /* Push and set indexd color   */
                    451:  
                    452: typedef struct _ORDER_GSBICOL { /* ogbicol */
                    453:   UCHAR  fbFlags;
                    454:   UCHAR  auchColor[3];
                    455: } ORDER_GSBICOL;
                    456:  
                    457: #define SICOL_SPECIFY  0x00
                    458: #define SICOL_SPECIAL  0x01
                    459: #define SICOL_DEFAULT  0x80
                    460:  
                    461: /* Set Character Cell */
                    462: #define OCODE_GSCC     0x33            /* Set character cell          */
                    463: #define OCODE_GPSCC    0x03            /* Push and set char cell      */
                    464:  
                    465: typedef struct _ORDERS_GSCC {   /* osgscc */
                    466:   SHORT  cxInt;
                    467:   SHORT  cyInt;
                    468:   USHORT cxFract;
                    469:   USHORT cyFract;
                    470:   UCHAR  fbFlags;
                    471:   UCHAR  uchReserved;
                    472: } ORDERS_GSCC;
                    473:  
                    474: typedef struct _ORDERL_GSCC {   /* olgscc */
                    475:   LONG   cxInt;
                    476:   LONG   cyInt;
                    477:   USHORT cxFract;
                    478:   USHORT cyFract;
                    479:   UCHAR  fbFlags;
                    480:   UCHAR  uchReserved;
                    481: } ORDERL_GSCC;
                    482:  
                    483: #define GSCC_ZERODEF   0x00
                    484: #define GSCC_ZEROZERO  0x80
                    485:  
                    486: /* Set Marker Cell */
                    487: #define OCODE_GSMC     0x37            /* Set marker cell             */
                    488: #define OCODE_GPSMC    0x77            /* Push and set marker cell    */
                    489:  
                    490: typedef struct _ORDERS_GSMC {   /* osgsmc */
                    491:   SHORT  cx;
                    492:   SHORT  cy;
                    493:   UCHAR  fbFlags;
                    494:   UCHAR  uchReserved;
                    495: } ORDERS_GSMC;
                    496:  
                    497: typedef struct _ORDERL_GSMC {   /* olgsmc */
                    498:   LONG   cx;
                    499:   LONG   cy;
                    500:   UCHAR  fbFlags;
                    501:   UCHAR  uchReserved;
                    502: } ORDERL_GSMC;
                    503:  
                    504: #define GSMC_ZERODEF   0x00
                    505: #define GSMC_ZEROZERO  0x80
                    506:  
                    507: /* Set Pattern Reference Point */
                    508: #define OCODE_GSPRP    0xA0            /* Set pattern ref point       */
                    509: #define OCODE_GPSPRP   0xE0            /* Push and set patt ref pt    */
                    510:  
                    511: typedef struct _ORDERS_GSPRP {  /* osgsprp */
                    512:   POINTS ptPos;
                    513:   UCHAR fbFlags;
                    514:   UCHAR uchReserved;
                    515: } ORDERS_GSPRP;
                    516:  
                    517: typedef struct _ORDERL_GSPRP {  /* olgsprp */
                    518:   POINTL ptPos;
                    519:   UCHAR fbFlags;
                    520:   UCHAR uchReserved;
                    521: } ORDERL_GSPRP;
                    522:  
                    523: #define GSPRP_DEFAULT  0x80
                    524: #define GSPRP_SPECIFY  0x00
                    525:  
                    526:  
                    527: /* Set Individual Attribute */
                    528: #define OCODE_GSIA     0x14            /* Set individual attribute    */
                    529: #define OCODE_GPSIA    0x54            /* Push and set ind attr       */
                    530:  
                    531: #define GSIA_VL 3
                    532: typedef struct _ORDER_GSIA {    /* ogsia */
                    533:   UCHAR  uchAttrType;
                    534:   UCHAR  uchPrimType;
                    535:   UCHAR  fbFlags;
                    536:   UCHAR  auchValue[GSIA_VL];
                    537: } ORDER_GSIA;
                    538:  
                    539: #define GSIA_COLOR     0x01
                    540: #define GSIA_BCOLOR    0x02
                    541: #define GSIA_MIX       0x03
                    542: #define GSIA_BMIX      0x04
                    543: #define GSIA_LINE      0x01
                    544: #define GSIA_CHAR      0x02
                    545: #define GSIA_MARKER    0x03
                    546: #define GSIA_PATTERN   0x04
                    547: #define GSIA_IMAGE     0x05
                    548: #define GSIA_SPECIFY   0x00
                    549: #define GSIA_DEFAULT   0x80
                    550:  
                    551:  
                    552: /* Set Model /Viewing Transform */
                    553: #define OCODE_GSTM     0x24            /* Set model transform         */
                    554: #define OCODE_GPSTM    0x64            /* Push and set model tfm      */
                    555:  
                    556: #define OCODE_GSTV     0x31            /* Set Viewing Transform       */
                    557: #define OCODE_GPSTV    0x30            /* Push and set viewing tfm    */
                    558:  
                    559: #define GSTM_ML        16
                    560: typedef struct _ORDER_GSTM {    /* ogstm */
                    561:   UCHAR  uchReserved;
                    562:   UCHAR  fbFlags;
                    563:   USHORT fsMask;
                    564:   LONG   alMatrix[GSTM_ML];
                    565: } ORDER_GSTM;
                    566:  
                    567: #define GSTM_M11     0x8000
                    568: #define GSTM_M12     0x4000
                    569: #define GSTM_M13     0x2000
                    570: #define GSTM_M14     0x1000
                    571: #define GSTM_M21     0x0800
                    572: #define GSTM_M22     0x0400
                    573: #define GSTM_M23     0x0200
                    574: #define GSTM_M24     0x0100
                    575: #define GSTM_M31     0x0080
                    576: #define GSTM_M32     0x0040
                    577: #define GSTM_M33     0x0020
                    578: #define GSTM_M34     0x0010
                    579: #define GSTM_M41     0x0008
                    580: #define GSTM_M42     0x0004
                    581: #define GSTM_M43     0x0002
                    582: #define GSTM_M44     0x0001
                    583:  
                    584: #define GSTM_UNITY     0x00
                    585: #define GSTM_AFTER     0x01
                    586: #define GSTM_BEFORE    0x02
                    587: #define GSTM_OVERWRITE 0x03
                    588:  
                    589: #define GSTV_AFTER     0x00
                    590: #define GSTV_OVERWRITE 0x04
                    591:  
                    592: /* Set Segment Boundary, Viewing Window */
                    593:  
                    594: #define OCODE_GSSB     0x32            /* Set segment boundary        */
                    595: #define OCODE_GSVW     0x27            /* Set viewing window          */
                    596: #define OCODE_GPSVW    0x67            /* Push and set view window    */
                    597:  
                    598: #define GSSB_ML        4
                    599: typedef struct _ORDERS_GSSB {   /* osgssb */
                    600:   UCHAR  fbFlags;
                    601:   UCHAR  fbMask;
                    602:   SHORT  alMatrix[GSSB_ML];
                    603: } ORDERS_GSSB;
                    604:  
                    605: typedef struct _ORDERL_GSSB {   /* olgssb */
                    606:   UCHAR  fbFLags;
                    607:   UCHAR  fbMask;
                    608:   LONG   alMatrix[GSSB_ML];
                    609: } ORDERL_GSSB;
                    610:  
                    611: #define GSSB_XLEFT     0x20
                    612: #define GSSB_XRIGHT    0x10
                    613: #define GSSB_YBOTTOM   0x08
                    614: #define GSSB_YTOP      0x04
                    615:  
                    616: #define GSVW_INTERSECT 0x00
                    617: #define GSVW_REPLACE   0x80
                    618:  
                    619: /* Set Segment Characteristics */
                    620: #define OCODE_GSGCH    0x04            /* Set segment characterstc   s*/
                    621:  
                    622: #define GSGCH_ML       254
                    623: typedef struct _ORDER_GSGCH {   /* ogsgch */
                    624:   UCHAR  uchIdent;
                    625:   UCHAR  auchData[GSGCH_ML];
                    626: } ORDER_GSGCH;
                    627:  
                    628: /* Set Stroke Line Type */
                    629: #define OCODE_GSSLT    0x16            /* Set stroke line type        */
                    630: #define OCODE_GPSSLT   0x56            /* Push and set stroke l type  */
                    631:  
                    632: #define GSSLT_SND      126
                    633: typedef struct _ORDERS_GSSLT {  /* osgsslt */
                    634:   UCHAR  fbFlags;
                    635:   UCHAR  uchReserved;
                    636:   SHORT  aDashLengths[GSSLT_SND];
                    637: } ORDERS_GSSLT;
                    638:  
                    639: #define GSSLT_LND      63
                    640: typedef struct _ORDERL_GSSLT {  /* olgsslt */
                    641:   UCHAR  fbFlags;
                    642:   UCHAR  uchReserved;
                    643:   LONG   aDashLengths[GSSLT_LND];
                    644: } ORDERL_GSSLT;
                    645:  
                    646: #define GSSLT_DEFAULT   0x80
                    647: #define GSSLT_SPECIFY   0x00
                    648: #define GSSLT_FIRSTON   0x40
                    649: #define GSSLT_FIRSTOFF  0x00
                    650: #define GSSLT_REPSECOND 0x20
                    651: #define GSSLT_REPFIRST  0x00
                    652:  
                    653: /* Set Stroke Line Width */
                    654: #define OCODE_GSSLW    0x15            /* Set stroke line width       */
                    655: #define OCODE_GPSSLW   0x55            /* Push and set strk l width   */
                    656:  
                    657: typedef struct _ORDERS_GSSLW {  /* osgsslw */
                    658:   UCHAR  fbFlags;
                    659:   UCHAR  uchReserved;
                    660:   SHORT  LineWidth;
                    661: } ORDERS_GSSLW;
                    662:  
                    663: typedef struct _ORDERL_GSSLW {  /* olgsslw */
                    664:   UCHAR  fbFlags;
                    665:   UCHAR  uchReserved;
                    666:   LONG   LineWidth;
                    667: } ORDERL_GSSLW;
                    668:  
                    669: #define GSSLW_DEFAULT  0x80
                    670: #define GSSLW_SPECIFY  0x00
                    671:  
                    672: /* Sharp Fillet at Current Position */
                    673: #define OCODE_GCSFLT   0xA4            /* Sharp fillet at curr pos    */
                    674: #define OCODE_GSFLT    0xE4            /* Sharp fillet at given pos   */
                    675:  
                    676: #define GCSFLT_SMF     21
                    677: #define GSFLT_SMF      20
                    678:  
                    679: typedef struct _ORDERS_GCSFLT { /* osgcsflt */
                    680:   POINTS apt[2*GCSFLT_SMF];
                    681:   FIXED  afxSharpness[GCSFLT_SMF];
                    682: } ORDERS_GCSFLT;
                    683:  
                    684: #define GCSFLT_LMF     12
                    685: #define GSFLT_LMF      12
                    686:  
                    687: typedef struct _ORDERL_GCSFLT { /* olgcsflt */
                    688:   POINTL apt[2*GCSFLT_SMF];
                    689:   FIXED  afxSharpness[GCSFLT_SMF];
                    690: } ORDERL_GCSFLT;
                    691:  
                    692: /* Bitblt */
                    693: #define OCODE_GBBLT    0xD6            /* Bitblt                      */
                    694:  
                    695: typedef struct _ORDERS_GBBLT {   /* osgbblt */
                    696:   USHORT  fsFlags;
                    697:   USHORT  usMix;
                    698:   HBITMAP hbmSrc;
                    699:   LONG    lOptions;
                    700:   RECT1S  rcsTargetRect;
                    701:   RECTL   rclSourceRect;
                    702: } ORDERS_GBBLT;
                    703:  
                    704: typedef struct _ORDERL_GBBLT {   /* olgbblt */
                    705:   USHORT  fsFlags;
                    706:   USHORT  usMix;
                    707:   HBITMAP hbmSrc;
                    708:   LONG    lOptions;
                    709:   RECTL   rclTargetRect;
                    710:   RECTL   rclSourceRect;
                    711: } ORDERL_GBBLT;
                    712:  
                    713: /* Escape */
                    714: #define OCODE_GESCP    0xD5            /* Escape                      */
                    715:  
                    716: /*
                    717:  * type describes type of escape order, identifier gives the escape
                    718:  * order if the type is registered
                    719:  */
                    720: #define GESCP_ML       253
                    721: typedef struct _ORDER_GESCP {   /* ogescp */
                    722:   UCHAR  uchType;
                    723:   UCHAR  uchIdent;
                    724:   UCHAR  auchData[GESCP_ML];           /* Escape data                 */
                    725: } ORDER_GESCP;
                    726:  
                    727: #define GESCP_REG      0x80            /* identifier is registered    */
                    728:  
                    729: /* Escape (Bitblt) */
                    730: #define GEBB_REGID     0x02            /* uchIdent - Bitblt          */
                    731:  
                    732: #define ETYPE_GEBB          0x000200D5L
                    733:  
                    734: #define GEBB_LMP       29
                    735: typedef struct _ORDERL_GEBB {   /* olgebb */
                    736:   UCHAR   fbFlags;
                    737:   USHORT  usMix;
                    738:   UCHAR   cPoints;
                    739:   HBITMAP hbmSrc;
                    740:   LONG    lReserved;
                    741:   LONG    lOptions;
                    742:   POINTL  aptPoints[GEBB_LMP];
                    743: } ORDERL_GEBB;
                    744:  
                    745: /* Escape (Set Pel) */
                    746: #define GEPEL_REGID    0x01            /* uchIdent - Set Pel          */
                    747:  
                    748: #define ETYPE_GEPEL         0x000100D5L
                    749:  
                    750: /* Element Types for attribute bundles
                    751: #define ETYPE_LINEBUNDLE    0x0000FD01L
                    752: #define ETYPE_CHARBUNDLE    0x0000FD02L
                    753: #define ETYPE_MARKERBUNDLE  0x0000FD03L
                    754: #define ETYPE_AREABUNDLE    0x0000FD04L
                    755: #define ETYPE_IMAGEBUNDLE   0x0000FD05L
                    756:  
                    757: /***************************************************************************\
                    758: *
                    759: * Very long orders
                    760: *
                    761: \***************************************************************************/
                    762:  
                    763: /* macro to tell whether this is a very long order */
                    764: #define VLONG_ORDER(oc)  ((oc)==OCODE_VLONG)
                    765:  
                    766: /* Very long order structure */
                    767: #define VORDER_ML 65531
                    768: typedef struct _VORDER {        /* vord */
                    769:   UCHAR     idCode;
                    770:   UCHAR     uchQualifier;
                    771:   SWPUSHORT uchLength;
                    772:   UCHAR     uchData[VORDER_ML];
                    773: } VORDER;
                    774:  
                    775: /* Character String Extended */
                    776: #define OCODEQ_GCCHSTE  0xB0           /* Qualifier - current posn    */
                    777: #define OCODEQ_GCHSTE   0xF0           /* Qualifier - given position  */
                    778:  
                    779: #define ETYPE_GCCHSTE       0x0000FEB0L
                    780: #define ETYPE_GCHSTE        0x0000FEF0L
                    781:  
                    782: typedef struct _ORDERS_GCCHSTE { /* osgcchste */
                    783:   UCHAR     fbFlags;
                    784:   UCHAR     uchReserved;
                    785:   POINTS    ptRect[2];
                    786:   SWPUSHORT cchString;
                    787:   CHAR      achString[1];
                    788:   SHORT     adx[1];
                    789: } ORDERS_GCCHSTE;
                    790:  
                    791: typedef struct _ORDERL_GCCHSTE { /* olgcchste */
                    792:   UCHAR     fbFlags;
                    793:   UCHAR     uchReserved;
                    794:   POINTL    ptRect[2];
                    795:   SWPUSHORT cchString;
                    796:   CHAR      achString[1];
                    797:   LONG      adx[1];
                    798: } ORDERL_GCCHSTE;
                    799:  
                    800: #define GCCHSTE_DRAWRECT      0x80
                    801: #define GCCHSTE_NORECT        0x00
                    802: #define GCCHSTE_CLIP          0x40
                    803: #define GCCHSTE_NOCLIP        0x00
                    804: #define GCCHSTE_DEEMPHASIZE   0x20
                    805: #define GCCHSTE_NODEEMPHASIZE 0x00
                    806: #define GCCHSTE_LEAVEPOS      0x10
                    807: #define GCCHSTE_MOVEPOS       0x00
                    808:  
                    809: /* Extended Escape */
                    810: #define OCODEQ_GEESCP   0xD5           /* Qualifier - extended escape */
                    811:  
                    812: #define GEESCP_ML      65533
                    813: typedef struct _ORDER_GEESCP {  /* ogeescp */
                    814:   UCHAR  uchType;
                    815:   UCHAR  uchIdent;
                    816:   UCHAR  auchData[GEESCP_ML];
                    817: } ORDER_GEESCP;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.