home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 7.ddi / INC11 / PMGPI.H$ / PMGPI.bin
Encoding:
Text File  |  1990-01-09  |  52.9 KB  |  1,566 lines

  1. /**************************************************************************\
  2. *
  3. * Module Name: PMGPI.H
  4. *
  5. * OS/2 Presentation Manager GPI constants, types and function declarations
  6. *
  7. * Copyright (c) 1989-1990, Microsoft Corporation. All rights reserved.
  8. *
  9. * ==========================================================================
  10. *
  11. * The following symbols are used in this file for conditional sections.
  12. *
  13. *   INCL_GPI                Include all of the GPI
  14. *   INCL_GPICONTROL         Basic PS control
  15. *   INCL_GPICORRELATION     Picking, Boundary and Correlation
  16. *   INCL_GPISEGMENTS        Segment Control and Drawing
  17. *   INCL_GPISEGEDITING      Segment Editing via Elements
  18. *   INCL_GPITRANSFORMS      Transform and Transform Conversion
  19. *   INCL_GPIPATHS           Paths and Clipping with Paths
  20. *   INCL_GPILOGCOLORTABLE   Logical Color Tables
  21. *   INCL_GPIPRIMITIVES      Drawing Primitives and Primitive Attributes
  22. *   INCL_GPILCIDS           Phyical and Logical Fonts with Lcids
  23. *   INCL_GPIBITMAPS         Bitmaps and Pel Operations
  24. *   INCL_GPIREGIONS         Regions and Clipping with Regions
  25. *   INCL_GPIMETAFILES       Metafiles
  26. *   INCL_GPIERRORS          defined if INCL_ERRORS defined
  27. *
  28. * There is a symbol used in this file called INCL_DDIDEFS. This is used to
  29. * include only the definitions for the DDI. The programmer using the GPI
  30. * can ignore this symbol
  31. *
  32. * There is a symbol used in this file called INCL_SAADEFS. This is used to
  33. * include only the definitions for the SAA. The programmer using the GPI
  34. * can ignore this symbol
  35. *
  36. \**************************************************************************/
  37.  
  38. #ifdef INCL_GPI /* include whole of the GPI */
  39.     #define INCL_GPICONTROL
  40.     #define INCL_GPICORRELATION
  41.     #define INCL_GPISEGMENTS
  42.     #define INCL_GPISEGEDITING
  43.     #define INCL_GPITRANSFORMS
  44.     #define INCL_GPIPATHS
  45.     #define INCL_GPILOGCOLORTABLE
  46.     #define INCL_GPIPRIMITIVES
  47.     #define INCL_GPILCIDS
  48.     #define INCL_GPIBITMAPS
  49.     #define INCL_GPIREGIONS
  50.     #define INCL_GPIMETAFILES
  51. #endif /* INCL_GPI */
  52.  
  53. #ifdef INCL_ERRORS /* if errors are required then allow GPI errors */
  54.     #define INCL_GPIERRORS
  55. #endif /* INCL_ERRORS */
  56.  
  57. #ifdef INCL_DDIDEFS /* if only DDI required then enable DDI part of GPI */
  58.     #define INCL_GPITRANSFORMS
  59.     #define INCL_GPIPATHS
  60.     #define INCL_GPILOGCOLORTABLE
  61.     #define INCL_GPIPRIMITIVES
  62.     #define INCL_GPILCIDS
  63.     #define INCL_GPIBITMAPS
  64.     #define INCL_GPIREGIONS
  65.     #define INCL_GPIERRORS
  66. #endif /* INCL_DDIDEFS */
  67.  
  68. #ifdef INCL_SAADEFS /* if only SAA required then enable SAA part of GPI */
  69.     #define INCL_GPICONTROL
  70.     #define INCL_GPICORRELATION
  71.     #define INCL_GPISEGMENTS
  72.     #define INCL_GPISEGEDITING
  73.     #define INCL_GPITRANSFORMS
  74.     #define INCL_GPIPATHS
  75.     #define INCL_GPILOGCOLORTABLE
  76.     #define INCL_GPIPRIMITIVES
  77.     #define INCL_GPILCIDS
  78.     #define INCL_GPIBITMAPS
  79.     #define INCL_GPIREGIONS
  80.     #define INCL_GPIMETAFILES
  81.     #define INCL_GPIERRORS
  82. #endif /* INCL_SAADEFS */
  83.  
  84. /* General GPI return values */
  85. #define GPI_ERROR     0L
  86. #define GPI_OK        1L
  87. #define GPI_ALTERROR  (-1L)
  88.  
  89. /* fixed point number - implicit binary point between 2 and 3 hex digits */
  90. typedef  LONG FIXED;     /* fx */
  91. typedef  FIXED FAR *PFIXED;
  92.  
  93. /* fixed point number - implicit binary point between 1st and 2nd hex digits */
  94. typedef  USHORT FIXED88;  /* fx88 */
  95.  
  96. /* fixed point signed number - implicit binary point between bits 14 and 13. */
  97. /*                             Bit 15 is the sign bit.                       */
  98. /*                             Thus 1.0 is represented by 16384 (0x4000)     */
  99. /*                             and -1.0 is represented by -16384 (0xc000)    */
  100. typedef  USHORT FIXED114; /* fx114 */
  101.  
  102. /* make FIXED number from SHORT integer part and USHORT fractional part */
  103. #define MAKEFIXED(intpart,fractpart) MAKELONG(fractpart,intpart)
  104. /* extract fractional part from a fixed quantity */
  105. #define FIXEDFRAC(fx)                (LOUSHORT(fx))
  106. /* extract integer part from a fixed quantity */
  107. #define FIXEDINT(fx)                 ((SHORT)HIUSHORT(fx))
  108.  
  109. /* structure for size parameters e.g. for GpiCreatePS */
  110. typedef struct _SIZEL {         /* sizl */
  111.     LONG cx;
  112.     LONG cy;
  113. } SIZEL;
  114. typedef SIZEL FAR *PSIZEL;
  115.  
  116. /* return code on GpiQueryLogColorTable,GpiQueryRealColors and GpiQueryPel */
  117. #define CLR_NOINDEX  (-254L)
  118.  
  119. #if (defined(INCL_GPICONTROL) || !defined(INCL_NOCOMMON))
  120.  
  121. /* units for GpiCreatePS and others */
  122. #define PU_ARBITRARY    0x0004L
  123. #define PU_PELS         0x0008L
  124. #define PU_LOMETRIC     0x000CL
  125. #define PU_HIMETRIC     0x0010L
  126. #define PU_LOENGLISH    0x0014L
  127. #define PU_HIENGLISH    0x0018L
  128. #define PU_TWIPS        0x001CL
  129.  
  130. /* format for GpiCreatePS */
  131. #define GPIF_DEFAULT    0L
  132. #ifndef INCL_SAADEFS
  133. #define GPIF_SHORT      0x0100L
  134. #define GPIF_LONG       0x0200L
  135. #endif /* no INCL_SAADEFS */
  136.  
  137. /* PS type for GpiCreatePS */
  138. #define GPIT_NORMAL     0L
  139. #ifndef INCL_SAADEFS
  140. #define GPIT_MICRO      0x1000L
  141. #endif /* no INCL_SAADEFS */
  142.  
  143. /* implicit associate flag for GpiCreatePS */
  144. #define GPIA_NOASSOC    0L
  145. #define GPIA_ASSOC      0x4000L
  146.  
  147. #ifndef INCL_SAADEFS
  148. /* return error for GpiQueryDevice */
  149. #define HDC_ERROR        ((HDC)-1L)
  150. #endif /* no INCL_SAADEFS */
  151.  
  152. /*** common GPICONTROL functions */
  153. HPS   APIENTRY GpiCreatePS(HAB, HDC, PSIZEL, ULONG);
  154. BOOL  APIENTRY GpiDestroyPS(HPS);
  155. BOOL  APIENTRY GpiAssociate(HPS, HDC);
  156. BOOL APIENTRY GpiRestorePS(HPS, LONG);
  157. LONG APIENTRY GpiSavePS(HPS);
  158. BOOL APIENTRY GpiErase(HPS);
  159.  
  160. #ifndef INCL_SAADEFS
  161. HDC  APIENTRY GpiQueryDevice(HPS);
  162. #endif /* no INCL_SAADEFS */
  163.  
  164. #endif /* common GPICONTROL */
  165. #ifdef INCL_GPICONTROL
  166.  
  167. /* options for GpiResetPS */
  168. #define GRES_ATTRS      0x0001L
  169. #define GRES_SEGMENTS   0x0002L
  170. #define GRES_ALL        0x0004L
  171.  
  172. /* option masks for PS options used by GpiQueryPs */
  173. #define PS_UNITS        0x00FCL
  174. #define PS_FORMAT       0x0F00L
  175. #define PS_TYPE         0x1000L
  176. #define PS_MODE         0x2000L
  177. #define PS_ASSOCIATE    0x4000L
  178.  
  179. /* error context returned by GpiErrorSegmentData */
  180. #define GPIE_SEGMENT    0L
  181. #define GPIE_ELEMENT    1L
  182. #define GPIE_DATA       2L
  183.  
  184. #ifndef INCL_SAADEFS
  185.  
  186. /* control parameter for GpiSetDrawControl */
  187. #define DCTL_ERASE            1L
  188. #define DCTL_DISPLAY          2L
  189. #define DCTL_BOUNDARY         3L
  190. #define DCTL_DYNAMIC          4L
  191. #define DCTL_CORRELATE        5L
  192.  
  193. /* constants for GpiSet/QueryDrawControl */
  194. #define DCTL_ERROR (-1L)
  195. #define DCTL_OFF     0L
  196. #define DCTL_ON      1L
  197.  
  198. /* constants for GpiSet/QueryStopDraw */
  199. #define SDW_ERROR (-1L)
  200. #define SDW_OFF     0L
  201. #define SDW_ON      1L
  202.  
  203. #endif /* no INCL_SAADEFS */
  204.  
  205. /* drawing for GpiSet/QueryDrawingMode */
  206. #define DM_ERROR         0L
  207. #define DM_DRAW          1L
  208. #define DM_RETAIN        2L
  209. #define DM_DRAWANDRETAIN 3L
  210.  
  211. /*** other GPICONTROL functions */
  212. BOOL  APIENTRY GpiResetPS(HPS, ULONG);
  213.  
  214. #ifndef INCL_SAADEFS
  215.  
  216. BOOL  APIENTRY GpiSetPS(HPS, PSIZEL, ULONG);
  217.  
  218. #endif /* no INCL_SAADEFS */
  219.  
  220. ULONG APIENTRY GpiQueryPS(HPS, PSIZEL);
  221. LONG APIENTRY GpiErrorSegmentData(HPS, PLONG, PLONG);
  222.  
  223. #ifndef INCL_SAADEFS
  224.  
  225. LONG APIENTRY GpiQueryDrawControl(HPS, LONG);
  226. BOOL APIENTRY GpiSetDrawControl(HPS, LONG, LONG);
  227.  
  228. #endif /* no INCL_SAADEFS */
  229.  
  230. LONG APIENTRY GpiQueryDrawingMode(HPS);
  231. BOOL APIENTRY GpiSetDrawingMode(HPS, LONG);
  232.  
  233. #ifndef INCL_SAADEFS
  234.  
  235. LONG APIENTRY GpiQueryStopDraw(HPS);
  236. BOOL APIENTRY GpiSetStopDraw(HPS, LONG);
  237.  
  238. #endif /* no INCL_SAADEFS */
  239.  
  240. #endif /* non-common GPICONTROL */
  241. #ifdef INCL_GPICORRELATION
  242.  
  243. /* options for GpiSetPickApertureSize */
  244. #define PICKAP_DEFAULT          0L
  245. #define PICKAP_REC              2L
  246.  
  247. /* type of correlation for GpiCorrelateChain */
  248. #define PICKSEL_VISIBLE         0L
  249. #define PICKSEL_ALL             1L
  250.  
  251. /* return code to indicate correlate hit(s) */
  252. #define GPI_HITS    2L
  253.  
  254. /*** picking,  correlation and boundary functions */
  255. LONG APIENTRY GpiCorrelateChain( HPS, LONG, PPOINTL, LONG, LONG, PLONG);
  256. BOOL APIENTRY GpiQueryTag(HPS, PLONG);
  257. BOOL APIENTRY GpiSetTag(HPS, LONG);
  258. BOOL APIENTRY GpiQueryPickApertureSize(HPS, PSIZEL);
  259. BOOL APIENTRY GpiSetPickApertureSize(HPS, LONG, PSIZEL);
  260.  
  261. #ifndef INCL_SAADEFS
  262.  
  263. BOOL APIENTRY GpiQueryPickAperturePosition(HPS, PPOINTL);
  264. BOOL APIENTRY GpiSetPickAperturePosition(HPS, PPOINTL);
  265. BOOL APIENTRY GpiQueryBoundaryData(HPS, PRECTL);
  266. BOOL APIENTRY GpiResetBoundaryData(HPS);
  267.  
  268. #endif /* no INCL_SAADEFS */
  269.  
  270. LONG APIENTRY GpiCorrelateFrom(HPS, LONG, LONG, LONG, PPOINTL, LONG, LONG,
  271.                                PLONG);
  272. LONG APIENTRY GpiCorrelateSegment(HPS, LONG, LONG, PPOINTL, LONG, LONG,
  273.                                   PLONG);
  274.  
  275. #endif /* non-common_GPICORRELATION */
  276. #ifdef INCL_GPISEGMENTS
  277.  
  278. /* data formats for GpiPutData and GpiGetData */
  279. #define DFORM_NOCONV    0L
  280.  
  281. #ifndef INCL_SAADEFS
  282.  
  283. #define DFORM_S370SHORT 1L
  284. #define DFORM_PCSHORT   2L
  285. #define DFORM_PCLONG    4L
  286.  
  287. #endif /* no INCL_SAADEFS */
  288.  
  289. /* segment attributes used by GpiSet/QuerySegmentAttrs and others */
  290. #define ATTR_ERROR           (-1L)
  291. #define ATTR_DETECTABLE      1L
  292. #define ATTR_VISIBLE         2L
  293. #define ATTR_CHAINED         6L
  294.  
  295. #ifndef INCL_SAADEFS
  296.  
  297. #define ATTR_DYNAMIC         8L
  298.  
  299. #endif /* no INCL_SAADEFS */
  300.  
  301. #define ATTR_FASTCHAIN       9L
  302. #define ATTR_PROP_DETECTABLE 10L
  303. #define ATTR_PROP_VISIBLE    11L
  304.  
  305. /* attribute on/off values */
  306. #define ATTR_OFF  0L
  307. #define ATTR_ON   1L
  308.  
  309. /* segment priority used by GpiSetSegmentPriority and others */
  310. #define LOWER_PRI       (-1L)
  311. #define HIGHER_PRI      1L
  312.  
  313. /*** segment control functions */
  314. BOOL APIENTRY GpiOpenSegment(HPS, LONG);
  315. BOOL APIENTRY GpiCloseSegment(HPS);
  316. BOOL APIENTRY GpiDeleteSegment(HPS, LONG);
  317. LONG APIENTRY GpiQueryInitialSegmentAttrs(HPS, LONG);
  318. BOOL APIENTRY GpiSetInitialSegmentAttrs(HPS, LONG, LONG);
  319. LONG APIENTRY GpiQuerySegmentAttrs(HPS, LONG, LONG);
  320. BOOL APIENTRY GpiSetSegmentAttrs(HPS, LONG, LONG, LONG);
  321. LONG APIENTRY GpiQuerySegmentPriority(HPS, LONG, LONG);
  322. BOOL APIENTRY GpiSetSegmentPriority(HPS, LONG, LONG, LONG);
  323. BOOL APIENTRY GpiDeleteSegments(HPS, LONG, LONG);
  324. LONG APIENTRY GpiQuerySegmentNames(HPS, LONG, LONG, LONG, PLONG);
  325.  
  326. /*** draw functions for segments */
  327. LONG APIENTRY GpiGetData(HPS, LONG, PLONG, LONG, LONG, PBYTE);
  328. LONG APIENTRY GpiPutData(HPS, LONG, PLONG, PBYTE);
  329. BOOL APIENTRY GpiDrawChain(HPS);
  330. BOOL APIENTRY GpiDrawFrom(HPS, LONG, LONG);
  331. BOOL APIENTRY GpiDrawSegment(HPS, LONG);
  332.  
  333. #ifndef INCL_SAADEFS
  334.  
  335. BOOL APIENTRY GpiDrawDynamics(HPS);
  336. BOOL APIENTRY GpiRemoveDynamics(HPS, LONG, LONG);
  337.  
  338. #endif /* no INCL_SAADEFS */
  339.  
  340. #endif /* non-common GPISEGMENTS */
  341. #ifdef INCL_GPISEGEDITING
  342.  
  343. /* edit modes used by GpiSet/QueryEditMode */
  344. #define SEGEM_ERROR     0L
  345. #define SEGEM_INSERT    1L
  346. #define SEGEM_REPLACE   2L
  347.  
  348. /*** segment editing by element functions */
  349. BOOL APIENTRY GpiBeginElement(HPS, LONG, PSZ);
  350. BOOL APIENTRY GpiEndElement(HPS);
  351. BOOL APIENTRY GpiLabel(HPS, LONG);
  352. LONG APIENTRY GpiElement(HPS, LONG, PSZ, LONG, PBYTE);
  353. LONG APIENTRY GpiQueryElement(HPS, LONG, LONG, PBYTE);
  354. BOOL APIENTRY GpiDeleteElement(HPS);
  355. BOOL APIENTRY GpiDeleteElementRange(HPS, LONG, LONG);
  356. BOOL APIENTRY GpiDeleteElementsBetweenLabels(HPS, LONG, LONG);
  357. LONG APIENTRY GpiQueryEditMode(HPS);
  358. BOOL APIENTRY GpiSetEditMode(HPS, LONG);
  359. LONG APIENTRY GpiQueryElementPointer(HPS);
  360. BOOL APIENTRY GpiSetElementPointer(HPS, LONG);
  361. BOOL APIENTRY GpiOffsetElementPointer(HPS, LONG);
  362. LONG APIENTRY GpiQueryElementType(HPS, PLONG, LONG, PSZ);
  363. BOOL APIENTRY GpiSetElementPointerAtLabel(HPS, LONG);
  364.  
  365. #endif /* non-common GPISEGEDITING */
  366. #ifdef INCL_GPITRANSFORMS
  367.  
  368. /* co-ordinates space for GpiConvert */
  369. #define CVTC_WORLD              1L
  370. #define CVTC_MODEL              2L
  371. #define CVTC_DEFAULTPAGE        3L
  372. #define CVTC_PAGE               4L
  373. #define CVTC_DEVICE             5L
  374.  
  375. /* type of transformation for GpiSetSegmentTransformMatrix */
  376. #define TRANSFORM_REPLACE       0L
  377. #define TRANSFORM_ADD           1L
  378. #define TRANSFORM_PREEMPT       2L
  379.  
  380. /* transform matrix */
  381. typedef struct _MATRIXLF {     /* matlf */
  382.     FIXED fxM11;
  383.     FIXED fxM12;
  384.     LONG  lM13;
  385.     FIXED fxM21;
  386.     FIXED fxM22;
  387.     LONG  lM23;
  388.     LONG  lM31;
  389.     LONG  lM32;
  390.     LONG  lM33;
  391. } MATRIXLF;
  392. typedef MATRIXLF FAR *PMATRIXLF;
  393.  
  394. #ifndef INCL_DDIDEFS
  395.  
  396. /*** transform and transform conversion functions */
  397. BOOL APIENTRY GpiQuerySegmentTransformMatrix(HPS, LONG, LONG, PMATRIXLF);
  398. BOOL APIENTRY GpiSetSegmentTransformMatrix(HPS, LONG, LONG, PMATRIXLF,
  399.                                            LONG);
  400. BOOL APIENTRY GpiConvert(HPS, LONG, LONG, LONG, PPOINTL);
  401. BOOL APIENTRY GpiQueryModelTransformMatrix(HPS, LONG, PMATRIXLF);
  402. BOOL APIENTRY GpiSetModelTransformMatrix(HPS, LONG, PMATRIXLF, LONG);
  403. LONG APIENTRY GpiCallSegmentMatrix(HPS, LONG, LONG, PMATRIXLF, LONG);
  404. BOOL APIENTRY GpiQueryDefaultViewMatrix(HPS, LONG, PMATRIXLF);
  405. BOOL APIENTRY GpiSetDefaultViewMatrix(HPS, LONG, PMATRIXLF, LONG);
  406. BOOL APIENTRY GpiQueryPageViewport(HPS, PRECTL);
  407. BOOL APIENTRY GpiSetPageViewport(HPS, PRECTL);
  408. BOOL APIENTRY GpiQueryViewingTransformMatrix(HPS, LONG, PMATRIXLF);
  409. BOOL APIENTRY GpiSetViewingTransformMatrix(HPS, LONG, PMATRIXLF, LONG);
  410.  
  411. /*** general clipping functions */
  412. BOOL APIENTRY GpiSetGraphicsField(HPS, PRECTL);
  413. BOOL APIENTRY GpiQueryGraphicsField(HPS, PRECTL);
  414. BOOL APIENTRY GpiSetViewingLimits(HPS, PRECTL);
  415. BOOL APIENTRY GpiQueryViewingLimits(HPS, PRECTL);
  416.  
  417. #endif /* no INCL_DDIDEFS */
  418.  
  419. #endif /* non-common GPITRANSFORMS */
  420. #ifdef INCL_GPIPATHS
  421.  
  422. /* modes for GpiModifyPath */
  423. #define MPATH_STROKE            6L
  424.  
  425. /* modes for GpiFillPath */
  426. #define FPATH_ALTERNATE         0L
  427. #define FPATH_WINDING           2L
  428.  
  429. /* modes for GpiSetClipPath */
  430. #define SCP_ALTERNATE           0L
  431. #define SCP_WINDING             2L
  432. #define SCP_AND                 4L
  433. #define SCP_RESET               0L
  434.  
  435. #ifndef INCL_DDIDEFS
  436.  
  437. /*** Path and Clip Path functions */
  438. BOOL APIENTRY GpiBeginPath(HPS, LONG);
  439. BOOL APIENTRY GpiEndPath(HPS);
  440. BOOL APIENTRY GpiCloseFigure(HPS);
  441. BOOL APIENTRY GpiModifyPath(HPS, LONG, LONG);
  442. LONG APIENTRY GpiFillPath(HPS, LONG, LONG);
  443. BOOL APIENTRY GpiSetClipPath(HPS, LONG, LONG);
  444.  
  445. #ifndef INCL_SAADEFS
  446.  
  447. LONG APIENTRY GpiStrokePath(HPS, LONG, ULONG);
  448.  
  449. #endif /* no INCL_SAADEFS */
  450.  
  451. #endif /* no INCL_DDIDEFS */
  452.  
  453. #endif /* non-common GPIPATHS */
  454. #ifdef INCL_GPILOGCOLORTABLE
  455.  
  456. /* options for GpiCreateLogColorTable and others */
  457. #define LCOL_RESET              0x0001L
  458. #define LCOL_REALIZABLE         0x0002L
  459. #define LCOL_PURECOLOR          0x0004L
  460.  
  461. /* format of logical lColor table for GpiCreateLogColorTable and others */
  462. #define LCOLF_DEFAULT           0L
  463. #define LCOLF_INDRGB            1L
  464. #define LCOLF_CONSECRGB         2L
  465. #define LCOLF_RGB               3L
  466.  
  467. /* options for GpiQueryRealColors and others */
  468. #define LCOLOPT_REALIZED        0x0001L
  469. #define LCOLOPT_INDEX           0x0002L
  470.  
  471. #ifndef INCL_SAADEFS
  472.  
  473. /* return codes from GpiQueryLogColorTable to indicate it is in RGB mode */
  474. #define QLCT_ERROR   (-1L)
  475. #define QLCT_RGB     (-2L)
  476.  
  477. /* GpiQueryLogColorTable index returned for colors not explicitly loaded */
  478. #define QLCT_NOTLOADED (-1L)
  479.  
  480. #endif /* no INCL_SAADEFS */
  481.  
  482. /* return codes for GpiQueryColorData */
  483. #define QCD_LCT_FORMAT    0L
  484. #define QCD_LCT_LOINDEX   1L
  485. #define QCD_LCT_HIINDEX   2L
  486.  
  487. #ifndef INCL_DDIDEFS
  488.  
  489. /*** logical lColor table functions */
  490. BOOL APIENTRY GpiCreateLogColorTable(HPS, ULONG, LONG, LONG, LONG, PLONG);
  491. BOOL APIENTRY GpiRealizeColorTable(HPS);
  492. BOOL APIENTRY GpiUnrealizeColorTable(HPS);
  493. BOOL APIENTRY GpiQueryColorData(HPS, LONG, PLONG);
  494.  
  495. #ifndef INCL_SAADEFS
  496.  
  497. LONG APIENTRY GpiQueryLogColorTable(HPS, ULONG, LONG, LONG, PLONG);
  498.  
  499. #endif /* no INCL_SAADEFS */
  500.  
  501. LONG APIENTRY GpiQueryRealColors(HPS, ULONG, LONG, LONG, PLONG);
  502. LONG APIENTRY GpiQueryNearestColor(HPS, ULONG, LONG);
  503. LONG APIENTRY GpiQueryColorIndex(HPS, ULONG, LONG);
  504. LONG APIENTRY GpiQueryRGBColor(HPS, ULONG, LONG);
  505.  
  506. #endif /* no INCL_DDIDEFS */
  507.  
  508. #endif /* non-common GPILOGCOLORTABLE */
  509. #if (defined(INCL_GPIPRIMITIVES) || !defined(INCL_NOCOMMON))
  510.  
  511. /* default color table indices */
  512.  
  513. #define CLR_FALSE               (-5L)
  514. #define CLR_TRUE                (-4L)
  515.  
  516. #define CLR_ERROR               (-255L)
  517. #define CLR_DEFAULT             (-3L)
  518. #define CLR_WHITE               (-2L)
  519. #define CLR_BLACK               (-1L)
  520. #define CLR_BACKGROUND          0L
  521. #define CLR_BLUE                1L
  522. #define CLR_RED                 2L
  523. #define CLR_PINK                3L
  524. #define CLR_GREEN               4L
  525. #define CLR_CYAN                5L
  526. #define CLR_YELLOW              6L
  527. #define CLR_NEUTRAL             7L
  528.  
  529. #define CLR_DARKGRAY            8L
  530. #define CLR_DARKBLUE            9L
  531. #define CLR_DARKRED            10L
  532. #define CLR_DARKPINK           11L
  533. #define CLR_DARKGREEN          12L
  534. #define CLR_DARKCYAN           13L
  535. #define CLR_BROWN              14L
  536. #define CLR_PALEGRAY           15L
  537.  
  538. /* rgb colors */
  539. #define RGB_ERROR               (-255L)
  540. #define RGB_BLACK               0x00000000L
  541. #define RGB_BLUE                0x000000FFL
  542. #define RGB_GREEN               0x0000FF00L
  543. #define RGB_CYAN                0x0000FFFFL
  544. #define RGB_RED                 0x00FF0000L
  545. #define RGB_PINK                0x00FF00FFL
  546. #define RGB_YELLOW              0x00FFFF00L
  547. #define RGB_WHITE               0x00FFFFFFL
  548.  
  549. /* control flags used by GpiBeginArea */
  550. #define BA_NOBOUNDARY   0L
  551. #define BA_BOUNDARY     0x0001L
  552.  
  553. #ifndef INCL_SAADEFS
  554. #define BA_ALTERNATE    0L
  555. #define BA_WINDING      0x0002L
  556.  
  557. #endif /* no INCL_SAADEFS */
  558.  
  559. /* fill options for GpiBox/GpiFullArc */
  560. #define DRO_FILL        1L
  561. #define DRO_OUTLINE     2L
  562. #define DRO_OUTLINEFILL 3L
  563.  
  564. /* basic pattern symbols */
  565. #define PATSYM_ERROR           (-1L)
  566. #define PATSYM_DEFAULT         0L
  567. #define PATSYM_DENSE1          1L
  568. #define PATSYM_DENSE2          2L
  569. #define PATSYM_DENSE3          3L
  570. #define PATSYM_DENSE4          4L
  571. #define PATSYM_DENSE5          5L
  572. #define PATSYM_DENSE6          6L
  573. #define PATSYM_DENSE7          7L
  574. #define PATSYM_DENSE8          8L
  575. #define PATSYM_VERT            9L
  576. #define PATSYM_HORIZ           10L
  577. #define PATSYM_DIAG1           11L
  578. #define PATSYM_DIAG2           12L
  579. #define PATSYM_DIAG3           13L
  580. #define PATSYM_DIAG4           14L
  581. #define PATSYM_NOSHADE         15L
  582. #define PATSYM_SOLID           16L
  583. #define PATSYM_BLANK           64L
  584. #ifndef INCL_SAADEFS
  585. #define PATSYM_HALFTONE        17L
  586. #endif /* no INCL_SAADEFS */
  587.  
  588. /* lcid values for GpiSet/QueryPattern and others */
  589. #define LCID_ERROR             (-1L)
  590. #define LCID_DEFAULT           0L
  591.  
  592. #ifndef INCL_DDIDEFS
  593.  
  594. /*** global primitive functions */
  595. BOOL APIENTRY GpiSetColor(HPS, LONG);
  596. LONG APIENTRY GpiQueryColor(HPS);
  597.  
  598. /*** line primitive functions */
  599. LONG APIENTRY GpiBox(HPS, LONG, PPOINTL, LONG, LONG);
  600.  
  601. BOOL APIENTRY GpiMove(HPS, PPOINTL);
  602. LONG APIENTRY GpiLine(HPS, PPOINTL);
  603. LONG APIENTRY GpiPolyLine(HPS, LONG, PPOINTL);
  604.  
  605. /*** area primitive functions */
  606. BOOL APIENTRY GpiSetPattern(HPS, LONG);
  607. LONG APIENTRY GpiQueryPattern(HPS);
  608. BOOL APIENTRY GpiBeginArea(HPS, ULONG);
  609. LONG APIENTRY GpiEndArea(HPS);
  610.  
  611. /*** character primitive functions */
  612. LONG APIENTRY GpiCharString(HPS, LONG, PCH);
  613. LONG APIENTRY GpiCharStringAt(HPS, PPOINTL, LONG, PCH);
  614.  
  615. #endif /* no INCL_DDIDEFS */
  616.  
  617. #endif /* common GPIPRIMTIVES */
  618. #ifdef INCL_GPIPRIMITIVES
  619.  
  620. /* mode for GpiSetAttrMode */
  621. #define AM_ERROR          (-1L)
  622. #define AM_PRESERVE       0L
  623. #define AM_NOPRESERVE     1L
  624.  
  625. /* foreground mixes */
  626. #define FM_ERROR               (-1L)
  627. #define FM_DEFAULT             0L
  628. #define FM_OR                  1L
  629. #define FM_OVERPAINT           2L
  630. #define FM_LEAVEALONE          5L
  631.  
  632. #ifndef INCL_SAADEFS
  633.  
  634. #define FM_XOR                 4L
  635. #define FM_AND                 6L
  636. #define FM_SUBTRACT            7L
  637. #define FM_MASKSRCNOT          8L
  638. #define FM_ZERO                9L
  639. #define FM_NOTMERGESRC         10L
  640. #define FM_NOTXORSRC           11L
  641. #define FM_INVERT              12L
  642. #define FM_MERGESRCNOT         13L
  643. #define FM_NOTCOPYSRC          14L
  644. #define FM_MERGENOTSRC         15L
  645. #define FM_NOTMASKSRC          16L
  646. #define FM_ONE                 17L
  647.  
  648. #endif /* no INCL_SAADEFS */
  649.  
  650. /* background mixes */
  651. #define BM_ERROR               (-1L)
  652. #define BM_DEFAULT             0L
  653. #define BM_OVERPAINT           2L
  654. #define BM_LEAVEALONE          5L
  655.  
  656. #ifndef INCL_SAADEFS
  657. #define BM_OR                  1L
  658. #define BM_XOR                 4L
  659. #endif /* no INCL_SAADEFS */
  660.  
  661. /* basic line type styles */
  662. #define LINETYPE_ERROR          (-1L)
  663. #define LINETYPE_DEFAULT        0L
  664. #define LINETYPE_DOT            1L
  665. #define LINETYPE_SHORTDASH      2L
  666. #define LINETYPE_DASHDOT        3L
  667. #define LINETYPE_DOUBLEDOT      4L
  668. #define LINETYPE_LONGDASH       5L
  669. #define LINETYPE_DASHDOUBLEDOT  6L
  670. #define LINETYPE_SOLID          7L
  671. #define LINETYPE_INVISIBLE      8L
  672. #ifndef INCL_SAADEFS
  673. #define LINETYPE_ALTERNATE      9L
  674. #endif /* no INCL_SAADEFS */
  675.  
  676. /* cosmetic line widths */
  677. #define LINEWIDTH_ERROR         (-1L)
  678. #define LINEWIDTH_DEFAULT       0L
  679. #define LINEWIDTH_NORMAL        0x00010000L   /* MAKEFIXED(1,0) */
  680.  
  681. /* actual line widths */
  682. #define LINEWIDTHGEOM_ERROR     (-1L)
  683.  
  684. /* line end styles */
  685. #define LINEEND_ERROR           (-1L)
  686. #define LINEEND_DEFAULT         0L
  687. #define LINEEND_FLAT            1L
  688. #define LINEEND_SQUARE          2L
  689. #define LINEEND_ROUND           3L
  690.  
  691. /* line join styles */
  692. #define LINEJOIN_ERROR          (-1L)
  693. #define LINEJOIN_DEFAULT        0L
  694. #define LINEJOIN_BEVEL          1L
  695. #define LINEJOIN_ROUND          2L
  696. #define LINEJOIN_MITRE          3L
  697.  
  698. /* character directions */
  699. #define CHDIRN_ERROR            (-1L)
  700. #define CHDIRN_DEFAULT          0L
  701. #define CHDIRN_LEFTRIGHT        1L
  702. #define CHDIRN_TOPBOTTOM        2L
  703. #define CHDIRN_RIGHTLEFT        3L
  704. #define CHDIRN_BOTTOMTOP        4L
  705.  
  706. /* character modes */
  707. #define CM_ERROR                (-1L)
  708. #define CM_DEFAULT              0L
  709. #define CM_MODE1                1L
  710. #define CM_MODE2                2L
  711. #define CM_MODE3                3L
  712.  
  713. /* basic marker symbols */
  714. #define MARKSYM_ERROR           (-1L)
  715. #define MARKSYM_DEFAULT         0L
  716. #define MARKSYM_CROSS           1L
  717. #define MARKSYM_PLUS            2L
  718. #define MARKSYM_DIAMOND         3L
  719. #define MARKSYM_SQUARE          4L
  720. #define MARKSYM_SIXPOINTSTAR    5L
  721. #define MARKSYM_EIGHTPOINTSTAR  6L
  722. #define MARKSYM_SOLIDDIAMOND    7L
  723. #define MARKSYM_SOLIDSQUARE     8L
  724. #define MARKSYM_DOT             9L
  725. #define MARKSYM_SMALLCIRCLE     10L
  726. #define MARKSYM_BLANK           64L
  727.  
  728. /* formatting options for GpiCharStringPosAt */
  729. #define CHS_OPAQUE              0x0001L
  730. #define CHS_VECTOR              0x0002L
  731. #define CHS_LEAVEPOS            0x0008L
  732. #define CHS_CLIP                0x0010L
  733.  
  734. /* bundle codes for GpiSetAttributes and GpiQueryAttributes */
  735. #define PRIM_LINE               1L
  736. #define PRIM_CHAR               2L
  737. #define PRIM_MARKER             3L
  738. #define PRIM_AREA               4L
  739. #define PRIM_IMAGE              5L
  740.  
  741. /* line bundle mask bits */
  742. #define LBB_COLOR               0x0001L
  743. #define LBB_MIX_MODE            0x0004L
  744. #define LBB_WIDTH               0x0010L
  745. #define LBB_GEOM_WIDTH          0x0020L
  746. #define LBB_TYPE                0x0040L
  747. #define LBB_END                 0x0080L
  748. #define LBB_JOIN                0x0100L
  749.  
  750. /* character bundle mask bits */
  751. #define CBB_COLOR               0x0001L
  752. #define CBB_BACK_COLOR          0x0002L
  753. #define CBB_MIX_MODE            0x0004L
  754. #define CBB_BACK_MIX_MODE       0x0008L
  755. #define CBB_SET                 0x0010L
  756. #define CBB_MODE                0x0020L
  757. #define CBB_BOX                 0x0040L
  758. #define CBB_ANGLE               0x0080L
  759. #define CBB_SHEAR               0x0100L
  760. #define CBB_DIRECTION           0x0200L
  761.  
  762. /* marker bundle mask bits */
  763. #define MBB_COLOR               0x0001L
  764. #define MBB_BACK_COLOR          0x0002L
  765. #define MBB_MIX_MODE            0x0004L
  766. #define MBB_BACK_MIX_MODE       0x0008L
  767. #define MBB_SET                 0x0010L
  768. #define MBB_SYMBOL              0x0020L
  769. #define MBB_BOX                 0x0040L
  770.  
  771. /* pattern bundle mask bits */
  772. #define ABB_COLOR               0x0001L
  773. #define ABB_BACK_COLOR          0x0002L
  774. #define ABB_MIX_MODE            0x0004L
  775. #define ABB_BACK_MIX_MODE       0x0008L
  776. #define ABB_SET                 0x0010L
  777. #define ABB_SYMBOL              0x0020L
  778. #define ABB_REF_POINT           0x0040L
  779.  
  780. /* image bundle mask bits */
  781. #define IBB_COLOR               0x0001L
  782. #define IBB_BACK_COLOR          0x0002L
  783. #define IBB_MIX_MODE            0x0004L
  784. #define IBB_BACK_MIX_MODE       0x0008L
  785.  
  786. /* structure for GpiSetArcParams and GpiQueryArcParams */
  787. typedef struct _ARCPARAMS {    /* arcp */
  788.     LONG lP;
  789.     LONG lQ;
  790.     LONG lR;
  791.     LONG lS;
  792. } ARCPARAMS;
  793. typedef ARCPARAMS FAR *PARCPARAMS;
  794.  
  795. /* variation of SIZE used for FIXEDs */
  796. typedef struct _SIZEF {       /* sizfx */
  797.     FIXED cx;
  798.     FIXED cy;
  799. } SIZEF;
  800. typedef SIZEF FAR *PSIZEF;
  801.  
  802. /* structure for gradient parameters e.g. for GpiSetCharAngle */
  803. typedef struct _GRADIENTL {     /* gradl */
  804.     LONG x;
  805.     LONG y;
  806. } GRADIENTL;
  807. typedef GRADIENTL FAR *PGRADIENTL;
  808.  
  809. /* line bundle for GpiSetAttributes and GpiQueryAttributes */
  810. typedef struct _LINEBUNDLE {    /* lbnd */
  811.     LONG    lColor;
  812.     LONG    lReserved;
  813.     USHORT  usMixMode;
  814.     USHORT  usReserved;
  815.     FIXED   fxWidth;
  816.     LONG    lGeomWidth;
  817.     USHORT  usType;
  818.     USHORT  usEnd;
  819.     USHORT  usJoin;
  820. } LINEBUNDLE;
  821.  
  822. /* character bundle for GpiSetAttributes and GpiQueryAttributes */
  823. typedef struct _CHARBUNDLE {    /* cbnd */
  824.     LONG      lColor;
  825.     LONG      lBackColor;
  826.     USHORT    usMixMode;
  827.     USHORT    usBackMixMode;
  828.     USHORT    usSet;
  829.     USHORT    usPrecision;
  830.     SIZEF     sizfxCell;
  831.     POINTL    ptlAngle;
  832.     POINTL    ptlShear;
  833.     USHORT    usDirection;
  834. } CHARBUNDLE;
  835.  
  836. /* marker bundle for GpiSetAttributes and GpiQueryAttributes */
  837. typedef struct _MARKERBUNDLE {  /* mbnd */
  838.     LONG   lColor;
  839.     LONG   lBackColor;
  840.     USHORT usMixMode;
  841.     USHORT usBackMixMode;
  842.     USHORT usSet;
  843.     USHORT usSymbol;
  844.     SIZEF  sizfxCell;
  845. } MARKERBUNDLE;
  846.  
  847. /* pattern bundle for GpiSetAttributes and GpiQueryAttributes */
  848. typedef struct _AREABUNDLE { /* pbnd */
  849.     LONG   lColor;
  850.     LONG   lBackColor;
  851.     USHORT usMixMode;
  852.     USHORT usBackMixMode;
  853.     USHORT usSet;
  854.     USHORT usSymbol;
  855.     POINTL ptlRefPoint ;
  856. } AREABUNDLE;
  857.  
  858. /* image bundle for GpiSetAttributes and GpiQueryAttributes */
  859. typedef struct _IMAGEBUNDLE {   /* ibmd */
  860.     LONG   lColor;
  861.     LONG   lBackColor;
  862.     USHORT usMixMode;
  863.     USHORT usBackMixMode;
  864. } IMAGEBUNDLE;
  865.  
  866. /* pointer to any bundle used by GpiSet/QueryAttrs */
  867. typedef PVOID PBUNDLE;
  868.  
  869. /* array indices for GpiQueryTextBox */
  870. #define TXTBOX_TOPLEFT      0L
  871. #define TXTBOX_BOTTOMLEFT   1L
  872. #define TXTBOX_TOPRIGHT     2L
  873. #define TXTBOX_BOTTOMRIGHT  3L
  874. #define TXTBOX_CONCAT       4L
  875. /* array count for GpiQueryTextBox */
  876. #define TXTBOX_COUNT        5L
  877.  
  878. /* return codes for GpiPtVisible */
  879. #define PVIS_ERROR       0L
  880. #define PVIS_INVISIBLE   1L
  881. #define PVIS_VISIBLE     2L
  882.  
  883. /* return codes for GpiRectVisible */
  884. #define RVIS_ERROR       0L
  885. #define RVIS_INVISIBLE   1L
  886. #define RVIS_PARTIAL     2L
  887. #define RVIS_VISIBLE     3L
  888.  
  889. #ifndef INCL_DDIDEFS
  890.  
  891. /*** attribute mode functions */
  892. BOOL APIENTRY GpiSetAttrMode(HPS, LONG);
  893. LONG APIENTRY GpiQueryAttrMode(HPS);
  894. /*** bundle primitive functions */
  895. BOOL APIENTRY GpiSetAttrs(HPS, LONG, ULONG, ULONG, PBUNDLE);
  896. #ifndef INCL_SAADEFS
  897.  
  898. LONG APIENTRY GpiQueryAttrs(HPS, LONG, ULONG, PBUNDLE);
  899.  
  900. #endif /* no INCL_SAADEFS */
  901.  
  902. /*** global primitive functions */
  903. BOOL APIENTRY GpiSetBackColor(HPS, LONG);
  904. LONG APIENTRY GpiQueryBackColor(HPS);
  905. BOOL APIENTRY GpiSetMix(HPS, LONG);
  906. LONG APIENTRY GpiQueryMix(HPS);
  907. BOOL APIENTRY GpiSetBackMix(HPS, LONG);
  908. LONG APIENTRY GpiQueryBackMix(HPS);
  909.  
  910. /*** line primitive functions */
  911. BOOL  APIENTRY GpiSetLineType(HPS, LONG);
  912. LONG  APIENTRY GpiQueryLineType(HPS);
  913. BOOL  APIENTRY GpiSetLineWidth(HPS, FIXED);
  914. FIXED APIENTRY GpiQueryLineWidth(HPS);
  915.  
  916. BOOL APIENTRY GpiSetLineWidthGeom(HPS, LONG);
  917. LONG APIENTRY GpiQueryLineWidthGeom(HPS);
  918. BOOL APIENTRY GpiSetLineEnd(HPS, LONG);
  919. LONG APIENTRY GpiQueryLineEnd(HPS);
  920. BOOL APIENTRY GpiSetLineJoin(HPS, LONG);
  921. LONG APIENTRY GpiQueryLineJoin(HPS);
  922.  
  923. BOOL APIENTRY GpiSetCurrentPosition(HPS, PPOINTL);
  924. BOOL APIENTRY GpiQueryCurrentPosition(HPS, PPOINTL);
  925.  
  926. /*** arc primitive functions */
  927. BOOL APIENTRY GpiSetArcParams(HPS, PARCPARAMS);
  928. BOOL APIENTRY GpiQueryArcParams(HPS, PARCPARAMS);
  929.  
  930. #ifndef INCL_SAADEFS
  931.  
  932. LONG APIENTRY GpiPointArc(HPS, PPOINTL);
  933.  
  934. #endif /* no INCL_SAADEFS */
  935.  
  936. LONG APIENTRY GpiFullArc(HPS, LONG, FIXED);
  937. LONG APIENTRY GpiPartialArc(HPS, PPOINTL, FIXED, FIXED, FIXED);
  938. LONG APIENTRY GpiPolyFilletSharp(HPS, LONG, PPOINTL, PFIXED);
  939. LONG APIENTRY GpiPolySpline(HPS, LONG, PPOINTL);
  940. LONG APIENTRY GpiPolyFillet(HPS, LONG, PPOINTL);
  941.  
  942. /*** area primitive functions */
  943. BOOL APIENTRY GpiSetPatternSet(HPS, LONG);
  944. LONG APIENTRY GpiQueryPatternSet(HPS);
  945. BOOL APIENTRY GpiSetPatternRefPoint(HPS, PPOINTL);
  946. BOOL APIENTRY GpiQueryPatternRefPoint(HPS, PPOINTL);
  947.  
  948. /*** character primitive functions */
  949.  
  950. BOOL APIENTRY GpiQueryCharStringPos(HPS, ULONG, LONG, PCH, PLONG, PPOINTL);
  951. BOOL APIENTRY GpiQueryCharStringPosAt(HPS, PPOINTL, ULONG, LONG, PCH, PLONG,
  952.                                       PPOINTL);
  953. BOOL APIENTRY GpiQueryTextBox(HPS, LONG, PCH, LONG, PPOINTL);
  954. BOOL APIENTRY GpiQueryDefCharBox(HPS, PSIZEL);
  955. BOOL APIENTRY GpiSetCharSet(HPS, LONG);
  956. LONG APIENTRY GpiQueryCharSet(HPS);
  957. BOOL APIENTRY GpiSetCharBox(HPS, PSIZEF);
  958. BOOL APIENTRY GpiQueryCharBox(HPS, PSIZEF);
  959. BOOL APIENTRY GpiSetCharAngle(HPS, PGRADIENTL);
  960. BOOL APIENTRY GpiQueryCharAngle(HPS, PGRADIENTL);
  961. BOOL APIENTRY GpiSetCharShear(HPS, PPOINTL);
  962. BOOL APIENTRY GpiQueryCharShear(HPS, PPOINTL);
  963. BOOL APIENTRY GpiSetCharDirection(HPS, LONG);
  964. LONG APIENTRY GpiQueryCharDirection(HPS);
  965. BOOL APIENTRY GpiSetCharMode(HPS, LONG);
  966. LONG APIENTRY GpiQueryCharMode(HPS);
  967. LONG APIENTRY GpiCharStringPos(HPS, PRECTL, ULONG, LONG, PCH, PLONG);
  968. LONG APIENTRY GpiCharStringPosAt(HPS, PPOINTL, PRECTL, ULONG, LONG, PCH,
  969.                                  PLONG);
  970.  
  971. /*** marker primitive functions */
  972. BOOL APIENTRY GpiSetMarkerSet(HPS, LONG);
  973. LONG APIENTRY GpiQueryMarkerSet(HPS);
  974. BOOL APIENTRY GpiSetMarker(HPS, LONG);
  975. LONG APIENTRY GpiQueryMarker(HPS);
  976. BOOL APIENTRY GpiSetMarkerBox(HPS, PSIZEF);
  977. BOOL APIENTRY GpiQueryMarkerBox(HPS, PSIZEF);
  978. LONG APIENTRY GpiMarker(HPS, PPOINTL);
  979. LONG APIENTRY GpiPolyMarker(HPS, LONG, PPOINTL);
  980.  
  981. /*** image primitive functions */
  982. LONG APIENTRY GpiImage(HPS, LONG, PSIZEL, LONG, PBYTE);
  983.  
  984. /*** miscellaneous primitive functions */
  985. BOOL  APIENTRY GpiPop(HPS, LONG);
  986. LONG APIENTRY GpiPtVisible(HPS, PPOINTL);
  987. LONG APIENTRY GpiRectVisible(HPS, PRECTL);
  988. BOOL  APIENTRY GpiComment(HPS, LONG, PBYTE);
  989.  
  990. #endif /* no INCL_DDIDEFS */
  991.  
  992. #endif /* non-common GPIPRIMITIVES */
  993. #ifdef INCL_GPILCIDS
  994.  
  995. /* return codes from GpiCreateLogFont */
  996. #define FONT_DEFAULT     1L
  997. #define FONT_MATCH       2L
  998.  
  999. /* lcid type for GpiQuerySetIds */
  1000. #define LCIDT_FONT       6L
  1001.  
  1002. #ifndef INCL_SAADEFS
  1003. #define LCIDT_BITMAP     7L
  1004.  
  1005. /* constant used to delete all lcids by GpiDeleteSetId */
  1006. #define LCID_ALL         (-1L)
  1007. #endif /* no INCL_SAADEFS */
  1008.  
  1009. /* kerning data returned by GpiQueryKerningPairs */
  1010. typedef struct _KERNINGPAIRS {  /* krnpr */
  1011.     SHORT sFirstChar;
  1012.     SHORT sSecondChar;
  1013.     SHORT sKerningAmount;
  1014. } KERNINGPAIRS;
  1015. typedef KERNINGPAIRS FAR *PKERNINGPAIRS;
  1016.  
  1017. #ifndef INCL_SAADEFS
  1018.  
  1019. /* options for GpiQueryFonts */
  1020. #define QF_PUBLIC               0x0001L
  1021. #define QF_PRIVATE              0x0002L
  1022.  
  1023. /* font file descriptions for GpiQueryFontFileDescriptions */
  1024. typedef CHAR FFDESCS[2][FACESIZE]; /* ffdescs */
  1025. typedef FFDESCS FAR *PFFDESCS;
  1026.  
  1027. #endif /* no INCL_SAADEFS */
  1028.  
  1029. #ifndef INCL_DDIDEFS
  1030.  
  1031. /*** physical and logical font functions */
  1032. BOOL APIENTRY GpiDeleteSetId(HPS, LONG);
  1033. LONG APIENTRY GpiQueryNumberSetIds(HPS);
  1034. BOOL APIENTRY GpiQuerySetIds(HPS, LONG, PLONG, PSTR8, PLONG);
  1035. BOOL APIENTRY GpiLoadFonts(HAB, PSZ);
  1036. BOOL APIENTRY GpiUnloadFonts(HAB, PSZ);
  1037. LONG APIENTRY GpiCreateLogFont(HPS, PSTR8, LONG, PFATTRS);
  1038. LONG APIENTRY GpiQueryFonts(HPS, ULONG, PSZ, PLONG, LONG, PFONTMETRICS);
  1039. BOOL APIENTRY GpiQueryFontMetrics(HPS, LONG, PFONTMETRICS);
  1040. LONG APIENTRY GpiQueryKerningPairs(HPS, LONG, PKERNINGPAIRS);
  1041. BOOL APIENTRY GpiQueryWidthTable(HPS, LONG, LONG, PLONG);
  1042. #ifndef INCL_SAADEFS
  1043. BOOL   APIENTRY GpiSetCp(HPS, USHORT);
  1044. USHORT APIENTRY GpiQueryCp(HPS);
  1045. LONG   APIENTRY GpiQueryFontFileDescriptions(HAB, PSZ, PLONG, PFFDESCS);
  1046. #endif /* no INCL_SAADEFS */
  1047.  
  1048. #endif /* no INCL_DDIDEFS */
  1049.  
  1050. #endif /* non-common GPILCIDS */
  1051. #if (defined(INCL_GPIBITMAPS) || !defined(INCL_NOCOMMON))
  1052.  
  1053. /* rastor operations defined for GpiBitBlt */
  1054. #define ROP_SRCCOPY             0x00CCL
  1055. #define ROP_SRCPAINT            0x00EEL
  1056. #define ROP_SRCAND              0x0088L
  1057. #define ROP_SRCINVERT           0x0066L
  1058. #define ROP_SRCERASE            0x0044L
  1059. #define ROP_NOTSRCCOPY          0x0033L
  1060. #define ROP_NOTSRCERASE         0x0011L
  1061. #define ROP_MERGECOPY           0x00C0L
  1062. #define ROP_MERGEPAINT          0x00BBL
  1063. #define ROP_PATCOPY             0x00F0L
  1064. #define ROP_PATPAINT            0x00FBL
  1065. #define ROP_PATINVERT           0x005AL
  1066. #define ROP_DSTINVERT           0x0055L
  1067. #define ROP_ZERO                0x0000L
  1068. #define ROP_ONE                 0x00FFL
  1069.  
  1070. /* Blt options for GpiBitBlt */
  1071. #define BBO_OR              0L
  1072. #define BBO_AND             1L
  1073. #define BBO_IGNORE          2L
  1074.  
  1075. /* error return for GpiSetBitmap */
  1076. #define HBM_ERROR               ((HBITMAP)-1L)
  1077.  
  1078. #ifndef INCL_DDIDEFS
  1079.  
  1080. /*** bitmap and pel functions */
  1081. HBITMAP APIENTRY GpiLoadBitmap(HPS, HMODULE, USHORT, LONG, LONG);
  1082. BOOL    APIENTRY GpiDeleteBitmap(HBITMAP);
  1083. HBITMAP APIENTRY GpiSetBitmap(HPS, HBITMAP);
  1084. LONG    APIENTRY GpiBitBlt(HPS, HPS, LONG, PPOINTL, LONG, ULONG);
  1085. LONG    APIENTRY GpiWCBitBlt(HPS, HBITMAP, LONG, PPOINTL, LONG, ULONG);
  1086.  
  1087. #endif /* no INCL_DDIDEFS */
  1088.  
  1089. #endif /* common GPIBITMAPS */
  1090. #ifdef INCL_GPIBITMAPS
  1091.  
  1092. /* usage flags for GpiCreateBitmap */
  1093. #define CBM_INIT        0x0004L
  1094.  
  1095. /* bitmap parameterization used by GpiCreateBitmap and others */
  1096. typedef struct _BITMAPINFOHEADER {      /* bmp */
  1097.     ULONG  cbFix;
  1098.     USHORT cx;
  1099.     USHORT cy;
  1100.     USHORT cPlanes;
  1101.     USHORT cBitCount;
  1102. } BITMAPINFOHEADER;
  1103. typedef BITMAPINFOHEADER FAR *PBITMAPINFOHEADER;
  1104.  
  1105. /* RGB data for _BITMAPINFO struct */
  1106. typedef struct _RGB {           /* rgb */
  1107.     BYTE bBlue;
  1108.     BYTE bGreen;
  1109.     BYTE bRed;
  1110. } RGB;
  1111.  
  1112. /* bitmap data used by GpiSetBitmapBits and others */
  1113. typedef struct _BITMAPINFO {    /* bmi */
  1114.     ULONG  cbFix;
  1115.     USHORT cx;
  1116.     USHORT cy;
  1117.     USHORT cPlanes;
  1118.     USHORT cBitCount;
  1119.     RGB    argbColor[1];
  1120. } BITMAPINFO;
  1121. typedef BITMAPINFO FAR *PBITMAPINFO;
  1122.  
  1123. /* error return code for GpiSet/QueryBitmapBits */
  1124. #define BMB_ERROR       (-1L)
  1125.  
  1126. #ifndef INCL_DDIDEFS
  1127.  
  1128. /*** bitmap and pel functions */
  1129. HBITMAP APIENTRY GpiCreateBitmap(HPS, PBITMAPINFOHEADER, ULONG, PBYTE,
  1130.                                  PBITMAPINFO);
  1131. BOOL    APIENTRY GpiSetBitmapDimension(HBITMAP, PSIZEL);
  1132. BOOL    APIENTRY GpiQueryBitmapDimension(HBITMAP, PSIZEL);
  1133. BOOL    APIENTRY GpiQueryDeviceBitmapFormats(HPS, LONG, PLONG);
  1134. BOOL    APIENTRY GpiQueryBitmapParameters(HBITMAP, PBITMAPINFOHEADER);
  1135. LONG    APIENTRY GpiQueryBitmapBits(HPS, LONG, LONG, PBYTE, PBITMAPINFO);
  1136. LONG    APIENTRY GpiSetBitmapBits(HPS, LONG, LONG, PBYTE, PBITMAPINFO);
  1137. LONG    APIENTRY GpiSetPel(HPS, PPOINTL);
  1138. LONG    APIENTRY GpiQueryPel(HPS, PPOINTL);
  1139. BOOL    APIENTRY GpiSetBitmapId(HPS, HBITMAP, LONG);
  1140. HBITMAP APIENTRY GpiQueryBitmapHandle(HPS, LONG);
  1141.  
  1142. #endif /* no INCL_DDIDEFS */
  1143.  
  1144. #endif /* non-common GPIBITMAPS */
  1145. #ifdef INCL_GPIREGIONS
  1146.  
  1147. /* options for GpiCombineRegion */
  1148. #define CRGN_OR                 1L
  1149. #define CRGN_COPY               2L
  1150. #define CRGN_XOR                4L
  1151. #define CRGN_AND                6L
  1152. #define CRGN_DIFF               7L
  1153.  
  1154. /* usDirection of returned region data for GpiQueryRegionRects */
  1155. #define RECTDIR_LFRT_TOPBOT     1L
  1156. #define RECTDIR_RTLF_TOPBOT     2L
  1157. #define RECTDIR_LFRT_BOTTOP     3L
  1158. #define RECTDIR_RTLF_BOTTOP     4L
  1159.  
  1160. /* control data for GpiQueryRegionRects */
  1161. typedef struct _RGNRECT {       /* rgnrc */
  1162.     USHORT ircStart;
  1163.     USHORT crc;
  1164.     USHORT crcReturned;
  1165.     USHORT usDirection;
  1166. } RGNRECT;
  1167. typedef RGNRECT FAR *PRGNRECT;
  1168.  
  1169. /* return code to indicate type of region for GpiCombineRegion and others */
  1170. #define RGN_ERROR       0L
  1171. #define RGN_NULL        1L
  1172. #define RGN_RECT        2L
  1173. #define RGN_COMPLEX     3L
  1174.  
  1175. /* return codes for GpiPtInRegion */
  1176. #define PRGN_ERROR      0L
  1177. #define PRGN_OUTSIDE    1L
  1178. #define PRGN_INSIDE     2L
  1179.  
  1180. /* return codes for GpiRectInRegion */
  1181. #define RRGN_ERROR      0L
  1182. #define RRGN_OUTSIDE    1L
  1183. #define RRGN_PARTIAL    2L
  1184. #define RRGN_INSIDE     3L
  1185.  
  1186. /* return codes for GpiEqualRegion */
  1187. #define EQRGN_ERROR     0L
  1188. #define EQRGN_NOTEQUAL  1L
  1189. #define EQRGN_EQUAL     2L
  1190.  
  1191. /* error return code for GpiSetRegion */
  1192. #define HRGN_ERROR      ((HRGN)-1L)
  1193.  
  1194. #ifndef INCL_DDIDEFS
  1195.  
  1196. /*** main region functions */
  1197. HRGN APIENTRY GpiCreateRegion(HPS, LONG, PRECTL);
  1198. BOOL APIENTRY GpiSetRegion(HPS, HRGN, LONG, PRECTL);
  1199. BOOL APIENTRY GpiDestroyRegion(HPS, HRGN);
  1200. LONG APIENTRY GpiCombineRegion(HPS, HRGN, HRGN, HRGN, LONG);
  1201. LONG APIENTRY GpiEqualRegion(HPS, HRGN, HRGN);
  1202. BOOL APIENTRY GpiOffsetRegion(HPS, HRGN, PPOINTL);
  1203. LONG APIENTRY GpiPtInRegion(HPS, HRGN, PPOINTL);
  1204. LONG APIENTRY GpiRectInRegion(HPS, HRGN, PRECTL);
  1205. LONG APIENTRY GpiQueryRegionBox(HPS, HRGN, PRECTL);
  1206. BOOL APIENTRY GpiQueryRegionRects(HPS, HRGN, PRECTL, PRGNRECT, PRECTL);
  1207. LONG APIENTRY GpiPaintRegion(HPS, HRGN);
  1208.  
  1209. /*** clip region functions */
  1210. LONG APIENTRY GpiSetClipRegion(HPS, HRGN, PHRGN);
  1211.  
  1212. #ifndef INCL_SAADEFS
  1213.  
  1214. HRGN APIENTRY GpiQueryClipRegion(HPS);
  1215. LONG APIENTRY GpiQueryClipBox(HPS, PRECTL);
  1216.  
  1217. #endif /* no INCL_SAADEFS */
  1218.  
  1219. LONG APIENTRY GpiIntersectClipRectangle(HPS, PRECTL);
  1220. LONG APIENTRY GpiExcludeClipRectangle(HPS, PRECTL);
  1221.  
  1222. #ifndef INCL_SAADEFS
  1223.  
  1224. LONG APIENTRY GpiOffsetClipRegion(HPS, PPOINTL);
  1225.  
  1226. #endif /* no INCL_SAADEFS */
  1227.  
  1228. #endif /* no INCL_DDIDEFS */
  1229.  
  1230. #endif /* non-common GPIREGIONS */
  1231. #ifdef INCL_GPIMETAFILES
  1232.  
  1233. #ifndef INCL_DDIDEFS
  1234.  
  1235. /* constants for index values of options array for GpiPlayMetafile */
  1236. #define PMF_SEGBASE            0
  1237. #define PMF_LOADTYPE           1
  1238. #define PMF_RESOLVE            2
  1239. #define PMF_LCIDS              3
  1240. #define PMF_RESET              4
  1241. #define PMF_SUPPRESS           5
  1242. #define PMF_COLORTABLES        6
  1243. #define PMF_COLORREALIZABLE    7
  1244.  
  1245. /* options for GpiPlayMetafile */
  1246. #define RS_DEFAULT      0L
  1247. #define RS_NODISCARD    1L
  1248. #define LC_DEFAULT      0L
  1249. #define LC_NOLOAD       1L
  1250. #define LC_LOADDISC     3L
  1251. #define LT_DEFAULT      0L
  1252. #define LT_NOMODIFY     1L
  1253.  
  1254. #ifndef INCL_SAADEFS
  1255.  
  1256. #define LT_ORIGINALVIEW 4L
  1257. #define RES_DEFAULT     0L
  1258. #define RES_NORESET     1L
  1259. #define RES_RESET       2L
  1260. #define SUP_DEFAULT     0L
  1261. #define SUP_NOSUPPRESS  1L
  1262. #define SUP_SUPPRESS    2L
  1263. #define CTAB_DEFAULT    0L
  1264. #define CTAB_NOMODIFY   1L
  1265. #define CTAB_REPLACE    3L
  1266. #define CREA_DEFAULT    0L
  1267. #define CREA_REALIZE    1L
  1268. #define CREA_NOREALIZE  2L
  1269. #define RSP_DEFAULT     0L
  1270. #define RSP_NODISCARD   1L
  1271.  
  1272. #endif /* no INCL_SAADEFS */
  1273.  
  1274. /*** metafile functions */
  1275. HMF   APIENTRY GpiLoadMetaFile(HAB, PSZ);
  1276. LONG  APIENTRY GpiPlayMetaFile(HPS, HMF, LONG, PLONG, PLONG, LONG, PSZ);
  1277. BOOL  APIENTRY GpiSaveMetaFile(HMF, PSZ);
  1278. BOOL  APIENTRY GpiDeleteMetaFile(HMF);
  1279.  
  1280. HMF   APIENTRY GpiCopyMetaFile(HMF);
  1281. LONG  APIENTRY GpiQueryMetaFileLength(HMF);
  1282. BOOL  APIENTRY GpiQueryMetaFileBits(HMF, LONG, LONG, PBYTE);
  1283.  
  1284. #ifndef INCL_SAADEFS
  1285.  
  1286. BOOL  APIENTRY GpiSetMetaFileBits(HMF, LONG, LONG, PBYTE);
  1287.  
  1288. #endif /* no INCL_SAADEFS */
  1289.  
  1290. #endif /* no INCL_DDIDEFS */
  1291.  
  1292. #endif /* non-common GPIMETAFILES */
  1293.  
  1294. #ifdef INCL_GPIERRORS
  1295.  
  1296. /* AAB error codes for the GPI */
  1297. #define PMERR_OK                           0x0000
  1298. #define PMERR_ALREADY_IN_AREA              0x2001
  1299. #define PMERR_ALREADY_IN_ELEMENT           0x2002
  1300. #define PMERR_ALREADY_IN_PATH              0x2003
  1301. #define PMERR_ALREADY_IN_SEG               0x2004
  1302. #define PMERR_AREA_INCOMPLETE              0x2005
  1303. #define PMERR_BASE_ERROR                   0x2006
  1304. #define PMERR_BITBLT_LENGTH_EXCEEDED       0x2007
  1305. #define PMERR_BITMAP_IN_USE                0x2008
  1306. #define PMERR_BITMAP_IS_SELECTED           0x2009
  1307. #define PMERR_BITMAP_NOT_FOUND             0x200A
  1308. #define PMERR_BITMAP_NOT_SELECTED          0x200B
  1309. #define PMERR_BOUNDS_OVERFLOW              0x200C
  1310. #define PMERR_CALLED_SEG_IS_CHAINED        0x200D
  1311. #define PMERR_CALLED_SEG_IS_CURRENT        0x200E
  1312. #define PMERR_CALLED_SEG_NOT_FOUND         0x200F
  1313. #define PMERR_CANNOT_DELETE_ALL_DATA       0x2010
  1314. #define PMERR_CANNOT_REPLACE_ELEMENT_0     0x2011
  1315. #define PMERR_COL_TABLE_NOT_REALIZABLE     0x2012
  1316. #define PMERR_COL_TABLE_NOT_REALIZED       0x2013
  1317. #define PMERR_COORDINATE_OVERFLOW          0x2014
  1318. #define PMERR_CORR_FORMAT_MISMATCH         0x2015
  1319. #define PMERR_DATA_TOO_LONG                0x2016
  1320. #define PMERR_DC_IS_ASSOCIATED             0x2017
  1321. #define PMERR_DESC_STRING_TRUNCATED        0x2018
  1322. #define PMERR_DEVICE_DRIVER_ERROR_1        0x2019
  1323. #define PMERR_DEVICE_DRIVER_ERROR_2        0x201A
  1324. #define PMERR_DEVICE_DRIVER_ERROR_3        0x201B
  1325. #define PMERR_DEVICE_DRIVER_ERROR_4        0x201C
  1326. #define PMERR_DEVICE_DRIVER_ERROR_5        0x201D
  1327. #define PMERR_DEVICE_DRIVER_ERROR_6        0x201E
  1328. #define PMERR_DEVICE_DRIVER_ERROR_7        0x201F
  1329. #define PMERR_DEVICE_DRIVER_ERROR_8        0x2020
  1330. #define PMERR_DEVICE_DRIVER_ERROR_9        0x2021
  1331. #define PMERR_DEVICE_DRIVER_ERROR_10       0x2022
  1332. #define PMERR_DEV_FUNC_NOT_INSTALLED       0x2023
  1333. #define PMERR_DOSOPEN_FAILURE              0x2024
  1334. #define PMERR_DOSREAD_FAILURE              0x2025
  1335. #define PMERR_DRIVER_NOT_FOUND             0x2026
  1336. #define PMERR_DUP_SEG                      0x2027
  1337. #define PMERR_DYNAMIC_SEG_SEQ_ERROR        0x2028
  1338. #define PMERR_DYNAMIC_SEG_ZERO_INV         0x2029
  1339. #define PMERR_ELEMENT_INCOMPLETE           0x202A
  1340. #define PMERR_ESC_CODE_NOT_SUPPORTED       0x202B
  1341. #define PMERR_EXCEEDS_MAX_SEG_LENGTH       0x202C
  1342. #define PMERR_FONT_AND_MODE_MISMATCH       0x202D
  1343. #define PMERR_FONT_FILE_NOT_LOADED         0x202E
  1344. #define PMERR_FONT_NOT_LOADED              0x202F
  1345. #define PMERR_FONT_TOO_BIG                 0x2030
  1346. #define PMERR_HARDWARE_INIT_FAILURE        0x2031
  1347. #define PMERR_HBITMAP_BUSY                 0x2032
  1348. #define PMERR_HDC_BUSY                     0x2033
  1349. #define PMERR_HRGN_BUSY                    0x2034
  1350. #define PMERR_HUGE_FONTS_NOT_SUPPORTED     0x2035
  1351. #define PMERR_ID_HAS_NO_BITMAP             0x2036
  1352. #define PMERR_IMAGE_INCOMPLETE             0x2037
  1353. #define PMERR_INCOMPAT_COLOR_FORMAT        0x2038
  1354. #define PMERR_INCOMPAT_COLOR_OPTIONS       0x2039
  1355. #define PMERR_INCOMPATIBLE_BITMAP          0x203A
  1356. #define PMERR_INCOMPATIBLE_METAFILE        0x203B
  1357. #define PMERR_INCORRECT_DC_TYPE            0x203C
  1358. #define PMERR_INSUFFICIENT_DISK_SPACE      0x203D
  1359. #define PMERR_INSUFFICIENT_MEMORY          0x203E
  1360. #define PMERR_INV_ANGLE_PARM               0x203F
  1361. #define PMERR_INV_ARC_CONTROL              0x2040
  1362. #define PMERR_INV_AREA_CONTROL             0x2041
  1363. #define PMERR_INV_ARC_POINTS               0x2042
  1364. #define PMERR_INV_ATTR_MODE                0x2043
  1365. #define PMERR_INV_BACKGROUND_COL_ATTR      0x2044
  1366. #define PMERR_INV_BACKGROUND_MIX_ATTR      0x2045
  1367. #define PMERR_INV_BITBLT_MIX               0x2046
  1368. #define PMERR_INV_BITBLT_STYLE             0x2047
  1369. #define PMERR_INV_BITMAP_DIMENSION         0x2048
  1370. #define PMERR_INV_BOX_CONTROL              0x2049
  1371. #define PMERR_INV_BOX_ROUNDING_PARM        0x204A
  1372. #define PMERR_INV_CHAR_ANGLE_ATTR          0x204B
  1373. #define PMERR_INV_CHAR_DIRECTION_ATTR      0x204C
  1374. #define PMERR_INV_CHAR_MODE_ATTR           0x204D
  1375. #define PMERR_INV_CHAR_POS_OPTIONS         0x204E
  1376. #define PMERR_INV_CHAR_SET_ATTR            0x204F
  1377. #define PMERR_INV_CHAR_SHEAR_ATTR          0x2050
  1378. #define PMERR_INV_CLIP_PATH_OPTIONS        0x2051
  1379. #define PMERR_INV_CODEPAGE                 0x2052
  1380. #define PMERR_INV_COLOR_ATTR               0x2053
  1381. #define PMERR_INV_COLOR_DATA               0x2054
  1382. #define PMERR_INV_COLOR_FORMAT             0x2055
  1383. #define PMERR_INV_COLOR_INDEX              0x2056
  1384. #define PMERR_INV_COLOR_OPTIONS            0x2057
  1385. #define PMERR_INV_COLOR_START_INDEX        0x2058
  1386. #define PMERR_INV_COORD_OFFSET             0x2059
  1387. #define PMERR_INV_COORD_SPACE              0x205A
  1388. #define PMERR_INV_COORDINATE               0x205B
  1389. #define PMERR_INV_CORRELATE_DEPTH          0x205C
  1390. #define PMERR_INV_CORRELATE_TYPE           0x205D
  1391. #define PMERR_INV_CURSOR_BITMAP            0x205E
  1392. #define PMERR_INV_DC_DATA                  0x205F
  1393. #define PMERR_INV_DC_TYPE                  0x2060
  1394. #define PMERR_INV_DEVICE_NAME              0x2061
  1395. #define PMERR_INV_DEV_MODES_OPTIONS        0x2062
  1396. #define PMERR_INV_DRAW_CONTROL             0x2063
  1397. #define PMERR_INV_DRAW_VALUE               0x2064
  1398. #define PMERR_INV_DRAWING_MODE             0x2065
  1399. #define PMERR_INV_DRIVER_DATA              0x2066
  1400. #define PMERR_INV_DRIVER_NAME              0x2067
  1401. #define PMERR_INV_DRAW_BORDER_OPTION       0x2068
  1402. #define PMERR_INV_EDIT_MODE                0x2069
  1403. #define PMERR_INV_ELEMENT_OFFSET           0x206A
  1404. #define PMERR_INV_ELEMENT_POINTER          0x206B
  1405. #define PMERR_INV_END_PATH_OPTIONS         0x206C
  1406. #define PMERR_INV_ESC_CODE                 0x206D
  1407. #define PMERR_INV_ESCAPE_DATA              0x206E
  1408. #define PMERR_INV_EXTENDED_LCID            0x206F
  1409. #define PMERR_INV_FILL_PATH_OPTIONS        0x2070
  1410. #define PMERR_INV_FIRST_CHAR               0x2071
  1411. #define PMERR_INV_FONT_ATTRS               0x2072
  1412. #define PMERR_INV_FONT_FILE_DATA           0x2073
  1413. #define PMERR_INV_FOR_THIS_DC_TYPE         0x2074
  1414. #define PMERR_INV_FORMAT_CONTROL           0x2075
  1415. #define PMERR_INV_FORMS_CODE               0x2076
  1416. #define PMERR_INV_FONTDEF                  0x2077
  1417. #define PMERR_INV_GEOM_LINE_WIDTH_ATTR     0x2078
  1418. #define PMERR_INV_GETDATA_CONTROL          0x2079
  1419. #define PMERR_INV_GRAPHICS_FIELD           0x207A
  1420. #define PMERR_INV_HBITMAP                  0x207B
  1421. #define PMERR_INV_HDC                      0x207C
  1422. #define PMERR_INV_HJOURNAL                 0x207D
  1423. #define PMERR_INV_HMF                      0x207E
  1424. #define PMERR_INV_HPS                      0x207F
  1425. #define PMERR_INV_HRGN                     0x2080
  1426. #define PMERR_INV_ID                       0x2081
  1427. #define PMERR_INV_IMAGE_DATA_LENGTH        0x2082
  1428. #define PMERR_INV_IMAGE_DIMENSION          0x2083
  1429. #define PMERR_INV_IMAGE_FORMAT             0x2084
  1430. #define PMERR_INV_IN_AREA                  0x2085
  1431. #define PMERR_INV_IN_CALLED_SEG            0x2086
  1432. #define PMERR_INV_IN_CURRENT_EDIT_MODE     0x2087
  1433. #define PMERR_INV_IN_DRAW_MODE             0x2088
  1434. #define PMERR_INV_IN_ELEMENT               0x2089
  1435. #define PMERR_INV_IN_IMAGE                 0x208A
  1436. #define PMERR_INV_IN_PATH                  0x208B
  1437. #define PMERR_INV_IN_RETAIN_MODE           0x208C
  1438. #define PMERR_INV_IN_SEG                   0x208D
  1439. #define PMERR_INV_IN_VECTOR_SYMBOL         0x208E
  1440. #define PMERR_INV_INFO_TABLE               0x208F
  1441. #define PMERR_INV_JOURNAL_OPTION           0x2090
  1442. #define PMERR_INV_KERNING_FLAGS            0x2091
  1443. #define PMERR_INV_LENGTH_OR_COUNT          0x2092
  1444. #define PMERR_INV_LINE_END_ATTR            0x2093
  1445. #define PMERR_INV_LINE_JOIN_ATTR           0x2094
  1446. #define PMERR_INV_LINE_TYPE_ATTR           0x2095
  1447. #define PMERR_INV_LINE_WIDTH_ATTR          0x2096
  1448. #define PMERR_INV_LOGICAL_ADDRESS          0x2097
  1449. #define PMERR_INV_MARKER_BOX_ATTR          0x2098
  1450. #define PMERR_INV_MARKER_SET_ATTR          0x2099
  1451. #define PMERR_INV_MARKER_SYMBOL_ATTR       0x209A
  1452. #define PMERR_INV_MATRIX_ELEMENT           0x209B
  1453. #define PMERR_INV_MAX_HITS                 0x209C
  1454. #define PMERR_INV_METAFILE                 0x209D
  1455. #define PMERR_INV_METAFILE_LENGTH          0x209E
  1456. #define PMERR_INV_METAFILE_OFFSET          0x209F
  1457. #define PMERR_INV_MICROPS_DRAW_CONTROL     0x20A0
  1458. #define PMERR_INV_MICROPS_FUNCTION         0x20A1
  1459. #define PMERR_INV_MICROPS_ORDER            0x20A2
  1460. #define PMERR_INV_MIX_ATTR                 0x20A3
  1461. #define PMERR_INV_MODE_FOR_OPEN_DYN        0x20A4
  1462. #define PMERR_INV_MODE_FOR_REOPEN_SEG      0x20A5
  1463. #define PMERR_INV_MODIFY_PATH_MODE         0x20A6
  1464. #define PMERR_INV_MULTIPLIER               0x20A7
  1465. #define PMERR_INV_NESTED_FIGURES           0x20A8
  1466. #define PMERR_INV_OR_INCOMPAT_OPTIONS      0x20A9
  1467. #define PMERR_INV_ORDER_LENGTH             0x20AA
  1468. #define PMERR_INV_ORDERING_PARM            0x20AB
  1469. #define PMERR_INV_OUTSIDE_DRAW_MODE        0x20AC
  1470. #define PMERR_INV_PAGE_VIEWPORT            0x20AD
  1471. #define PMERR_INV_PATH_ID                  0x20AE
  1472. #define PMERR_INV_PATH_MODE                0x20AF
  1473. #define PMERR_INV_PATTERN_ATTR             0x20B0
  1474. #define PMERR_INV_PATTERN_REF_PT_ATTR      0x20B1
  1475. #define PMERR_INV_PATTERN_SET_ATTR         0x20B2
  1476. #define PMERR_INV_PATTERN_SET_FONT         0x20B3
  1477. #define PMERR_INV_PICK_APERTURE_OPTION     0x20B4
  1478. #define PMERR_INV_PICK_APERTURE_POSN       0x20B5
  1479. #define PMERR_INV_PICK_APERTURE_SIZE       0x20B6
  1480. #define PMERR_INV_PICK_NUMBER              0x20B7
  1481. #define PMERR_INV_PLAY_METAFILE_OPTION     0x20B8
  1482. #define PMERR_INV_PRIMITIVE_TYPE           0x20B9
  1483. #define PMERR_INV_PS_SIZE                  0x20BA
  1484. #define PMERR_INV_PUTDATA_FORMAT           0x20BB
  1485. #define PMERR_INV_QUERY_ELEMENT_NO         0x20BC
  1486. #define PMERR_INV_RECT                     0x20BD
  1487. #define PMERR_INV_REGION_CONTROL           0x20BE
  1488. #define PMERR_INV_REGION_MIX_MODE          0x20BF
  1489. #define PMERR_INV_REPLACE_MODE_FUNC        0x20C0
  1490. #define PMERR_INV_RESERVED_FIELD           0x20C1
  1491. #define PMERR_INV_RESET_OPTIONS            0x20C2
  1492. #define PMERR_INV_RGBCOLOR                 0x20C3
  1493. #define PMERR_INV_SCAN_START               0x20C4
  1494. #define PMERR_INV_SEG_ATTR                 0x20C5
  1495. #define PMERR_INV_SEG_ATTR_VALUE           0x20C6
  1496. #define PMERR_INV_SEG_CH_LENGTH            0x20C7
  1497. #define PMERR_INV_SEG_NAME                 0x20C8
  1498. #define PMERR_INV_SEG_OFFSET               0x20C9
  1499. #define PMERR_INV_SETID                    0x20CA
  1500. #define PMERR_INV_SETID_TYPE               0x20CB
  1501. #define PMERR_INV_SET_VIEWPORT_OPTION      0x20CC
  1502. #define PMERR_INV_SHARPNESS_PARM           0x20CD
  1503. #define PMERR_INV_SOURCE_OFFSET            0x20CE
  1504. #define PMERR_INV_STOP_DRAW_VALUE          0x20CF
  1505. #define PMERR_INV_TRANSFORM_TYPE           0x20D0
  1506. #define PMERR_INV_USAGE_PARM               0x20D1
  1507. #define PMERR_INV_VIEWING_LIMITS           0x20D2
  1508. #define PMERR_JFILE_BUSY                   0x20D3
  1509. #define PMERR_JNL_FUNC_DATA_TOO_LONG       0x20D4
  1510. #define PMERR_KERNING_NOT_SUPPORTED        0x20D5
  1511. #define PMERR_LABEL_NOT_FOUND              0x20D6
  1512. #define PMERR_MATRIX_OVERFLOW              0x20D7
  1513. #define PMERR_METAFILE_INTERNAL_ERROR      0x20D8
  1514. #define PMERR_METAFILE_IN_USE              0x20D9
  1515. #define PMERR_METAFILE_LIMIT_EXCEEDED      0x20DA
  1516. #define PMERR_NAME_STACK_FULL              0x20DB
  1517. #define PMERR_NOT_CREATED_BY_DEVOPENDC     0x20DC
  1518. #define PMERR_NOT_IN_AREA                  0x20DD
  1519. #define PMERR_NOT_IN_DRAW_MODE             0x20DE
  1520. #define PMERR_NOT_IN_ELEMENT               0x20DF
  1521. #define PMERR_NOT_IN_IMAGE                 0x20E0
  1522. #define PMERR_NOT_IN_PATH                  0x20E1
  1523. #define PMERR_NOT_IN_RETAIN_MODE           0x20E2
  1524. #define PMERR_NOT_IN_SEG                   0x20E3
  1525. #define PMERR_NO_BITMAP_SELECTED           0x20E4
  1526. #define PMERR_NO_CURRENT_ELEMENT           0x20E5
  1527. #define PMERR_NO_CURRENT_SEG               0x20E6
  1528. #define PMERR_NO_METAFILE_RECORD_HANDLE    0x20E7
  1529. #define PMERR_ORDER_TOO_BIG                0x20E8
  1530. #define PMERR_OTHER_SET_ID_REFS            0x20E9
  1531. #define PMERR_OVERRAN_SEG                  0x20EA
  1532. #define PMERR_OWN_SET_ID_REFS              0x20EB
  1533. #define PMERR_PATH_INCOMPLETE              0x20EC
  1534. #define PMERR_PATH_LIMIT_EXCEEDED          0x20ED
  1535. #define PMERR_PATH_UNKNOWN                 0x20EE
  1536. #define PMERR_PEL_IS_CLIPPED               0x20EF
  1537. #define PMERR_PEL_NOT_AVAILABLE            0x20F0
  1538. #define PMERR_PRIMITIVE_STACK_EMPTY        0x20F1
  1539. #define PMERR_PROLOG_ERROR                 0x20F2
  1540. #define PMERR_PROLOG_SEG_ATTR_NOT_SET      0x20F3
  1541. #define PMERR_PS_BUSY                      0x20F4
  1542. #define PMERR_PS_IS_ASSOCIATED             0x20F5
  1543. #define PMERR_RAM_JNL_FILE_TOO_SMALL       0x20F6
  1544. #define PMERR_REALIZE_NOT_SUPPORTED        0x20F7
  1545. #define PMERR_REGION_IS_CLIP_REGION        0x20F8
  1546. #define PMERR_RESOURCE_DEPLETION           0x20F9
  1547. #define PMERR_SEG_AND_REFSEG_ARE_SAME      0x20FA
  1548. #define PMERR_SEG_CALL_RECURSIVE           0x20FB
  1549. #define PMERR_SEG_CALL_STACK_EMPTY         0x20FC
  1550. #define PMERR_SEG_CALL_STACK_FULL          0x20FD
  1551. #define PMERR_SEG_IS_CURRENT               0x20FE
  1552. #define PMERR_SEG_NOT_CHAINED              0x20FF
  1553. #define PMERR_SEG_NOT_FOUND                0x2100
  1554. #define PMERR_SEG_STORE_LIMIT_EXCEEDED     0x2101
  1555. #define PMERR_SETID_IN_USE                 0x2102
  1556. #define PMERR_SETID_NOT_FOUND              0x2103
  1557. #define PMERR_STARTDOC_NOT_ISSUED          0x2104
  1558. #define PMERR_STOP_DRAW_OCCURRED           0x2105
  1559. #define PMERR_TOO_MANY_METAFILES_IN_USE    0x2106
  1560. #define PMERR_TRUNCATED_ORDER              0x2107
  1561. #define PMERR_UNCHAINED_SEG_ZERO_INV       0x2108
  1562. #define PMERR_UNSUPPORTED_ATTR             0x2109
  1563. #define PMERR_UNSUPPORTED_ATTR_VALUE       0x210A
  1564.  
  1565. #endif /* non-common GPIERRORS */
  1566.