home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / cplus / os2h / pmord.h__ / pmord.h
Encoding:
C/C++ Source or Header  |  1993-04-29  |  27.4 KB  |  930 lines

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