home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / IBMH / PMORD.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  29KB  |  938 lines

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