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