home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / watcoapi.zip / incl32 / pmgpi.h < prev    next >
C/C++ Source or Header  |  2002-09-30  |  20KB  |  700 lines

  1. /*
  2.     OS/2 Graphics Programming Interface include file
  3.     for 32-bit development.
  4. */
  5.  
  6.  
  7. #define INCL_GPIINCLUDED
  8.  
  9. #ifdef INCL_GPI
  10.     #define INCL_GPIBITMAPS
  11.     #define INCL_GPICONTROL
  12.     #define INCL_GPILCIDS
  13.     #define INCL_GPILOGCOLORTABLE
  14.     #define INCL_GPIPOLYGON
  15.     #define INCL_GPIPRIMITIVES
  16.     #define INCL_GPIREGIONS
  17.     #define INCL_GPITRANSFORMS
  18. #endif
  19.  
  20. #define GPI_ERROR      0
  21. #define GPI_OK         1
  22. #define GPI_ALTERROR (-1)
  23.  
  24. #define CLR_NOINDEX (-254)
  25.  
  26. #define FIXEDINT(fx)                 ((SHORT)HIUSHORT(fx))
  27. #define MAKEFIXED(intpart,fractpart) MAKELONG(fractpart,intpart)
  28.  
  29. typedef struct _SIZEL {
  30.     LONG cx;
  31.     LONG cy;
  32. } SIZEL, *PSIZEL;
  33.  
  34. #if defined(INCL_GPIBITMAPS)
  35.  
  36. #define CBM_INIT 4
  37.  
  38. #define ROP_SRCCOPY     0x00CC
  39. #define ROP_SRCPAINT    0x00EE
  40. #define ROP_SRCAND      0x0088
  41. #define ROP_SRCINVERT   0x0066
  42. #define ROP_SRCERASE    0x0044
  43. #define ROP_NOTSRCCOPY  0x0033
  44. #define ROP_NOTSRCERASE 0x0011
  45. #define ROP_MERGECOPY   0x00C0
  46. #define ROP_MERGEPAINT  0x00BB
  47. #define ROP_PATCOPY     0x00F0
  48. #define ROP_PATPAINT    0x00FB
  49. #define ROP_PATINVERT   0x005A
  50. #define ROP_DSTINVERT   0x0055
  51. #define ROP_ZERO        0x0000
  52. #define ROP_ONE         0x00FF
  53.  
  54. #define BBO_OR            0
  55. #define BBO_AND           1
  56. #define BBO_IGNORE        2
  57. #define BBO_PAL_COLORS    4
  58. #define BBO_NO_COLOR_INFO 8
  59.  
  60. #define FF_BOUNDARY 0
  61. #define FF_SURFACE  1
  62.  
  63. #define BCA_UNCOMP         0
  64. #define BCA_HUFFMAN1D      3
  65. #define BCA_RLE4           2
  66. #define BCA_RLE8           1
  67. #define BCA_RLE24          4
  68. #define BRU_METRIC         0
  69. #define BRA_BOTTOMUP       0
  70. #define BRH_NOTHALFTONED   0
  71. #define BRH_ERRORDIFFUSION 1
  72. #define BRH_PANDA          2
  73. #define BRH_SUPERCIRCLE    3
  74. #define BCE_PALETTE      (-1)
  75. #define BCE_RGB            0
  76.  
  77. #pragma pack(1)
  78.  
  79. typedef struct _RGB {
  80.     BYTE bBlue;
  81.     BYTE bGreen;
  82.     BYTE bRed;
  83. } RGB;
  84.  
  85. typedef struct _RGB2 {
  86.     BYTE bBlue;
  87.     BYTE bGreen;
  88.     BYTE bRed;
  89.     BYTE fcOptions;
  90. } RGB2;
  91.  
  92. typedef struct _BITMAPINFO {
  93.     ULONG  cbFix;
  94.     USHORT cx;
  95.     USHORT cy;
  96.     USHORT cPlanes;
  97.     USHORT cBitCount;
  98.     RGB    argbColor[1];
  99. } BITMAPINFO, *PBITMAPINFO;
  100.  
  101. typedef struct _BITMAPINFO2 {
  102.     ULONG  cbFix;
  103.     ULONG  cx;
  104.     ULONG  cy;
  105.     USHORT cPlanes;
  106.     USHORT cBitCount;
  107.     ULONG  ulCompression;
  108.     ULONG  cbImage;
  109.     ULONG  cxResolution;
  110.     ULONG  cyResolution;
  111.     ULONG  cclrUsed;
  112.     ULONG  cclrImportant;
  113.     USHORT usUnits;
  114.     USHORT usReserved;
  115.     USHORT usRecording;
  116.     USHORT usRendering;
  117.     ULONG  cSize1;
  118.     ULONG  cSize2;
  119.     ULONG  ulColorEncoding;
  120.     ULONG  ulIdentifier;
  121.     RGB2   argbColor[1];
  122. } BITMAPINFO2, *PBITMAPINFO2;
  123.  
  124. typedef struct _BITMAPINFOHEADER {
  125.     ULONG  cbFix;
  126.     USHORT cx;
  127.     USHORT cy;
  128.     USHORT cPlanes;
  129.     USHORT cBitCount;
  130. } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
  131.  
  132. typedef struct _BITMAPINFOHEADER2 {
  133.     ULONG  cbFix;
  134.     ULONG  cx;
  135.     ULONG  cy;
  136.     USHORT cPlanes;
  137.     USHORT cBitCount;
  138.     ULONG  ulCompression;
  139.     ULONG  cbImage;
  140.     ULONG  cxResolution;
  141.     ULONG  cyResolution;
  142.     ULONG  cclrUsed;
  143.     ULONG  cclrImportant;
  144.     USHORT usUnits;
  145.     USHORT usReserved;
  146.     USHORT usRecording;
  147.     USHORT usRendering;
  148.     ULONG  cSize1;
  149.     ULONG  cSize2;
  150.     ULONG  ulColorEncoding;
  151.     ULONG  ulIdentifier;
  152. } BITMAPINFOHEADER2, *PBITMAPINFOHEADER2;
  153.  
  154. #pragma pack()
  155.  
  156. LONG    APIENTRY GpiBitBlt(HPS hpsTarget, HPS hpsSource, LONG lCount,
  157.                     PPOINTL aptlPoints, LONG lRop, ULONG flOptions);
  158.  
  159. HBITMAP APIENTRY GpiCreateBitmap(HPS hps, PBITMAPINFOHEADER2 pbmpNew, ULONG flOptions,
  160.                    PBYTE pbInitData, PBITMAPINFO2 pbmiInfoTable);
  161.  
  162. BOOL    APIENTRY GpiDeleteBitmap(HBITMAP hbm);
  163.  
  164. LONG    APIENTRY GpiFloodFill(HPS hps, LONG lOptions, LONG lColor);
  165.  
  166. HBITMAP APIENTRY GpiLoadBitmap(HPS hps, HMODULE Resrc, ULONG idBmp, LONG lWidth, LONG lHeight);
  167.  
  168. LONG    APIENTRY GpiQueryBitmapBits(HPS hps, LONG lScanStart, LONG lScans,
  169.                    PBYTE pbBuffer, PBITMAPINFO2 pbmiInfoTable);
  170. BOOL    APIENTRY GpiQueryBitmapDimension(HBITMAP hbm, PSIZEL psizlBitmapDimension);
  171. HBITMAP APIENTRY GpiQueryBitmapHandle(HPS hps, LONG lLcid);
  172. BOOL    APIENTRY GpiQueryBitmapInfoHeader(HBITMAP hbm, PBITMAPINFOHEADER2 pbmpData);
  173. BOOL    APIENTRY GpiQueryBitmapParameters(HBITMAP hbm, PBITMAPINFOHEADER pbmpData);
  174.  
  175. BOOL    APIENTRY GpiQueryDeviceBitmapFormats(HPS hps, LONG lCount, PLONG alArray);
  176.  
  177. LONG    APIENTRY GpiQueryPel(HPS hps, PPOINTL pptlPoint);
  178.  
  179. HBITMAP APIENTRY GpiSetBitmap(HPS hps, HBITMAP hbm);
  180. LONG    APIENTRY GpiSetBitmapBits(HPS hps, LONG lScanStart, LONG lScans,
  181.                    PBYTE pbBuffer, PBITMAPINFO2 pbmiInfoTable);
  182. BOOL    APIENTRY GpiSetBitmapDimension(HBITMAP hbm, PSIZEL psizlBitmapDimension);
  183. BOOL    APIENTRY GpiSetBitmapId(HPS hps, HBITMAP hbm, LONG lLcid);
  184.  
  185. LONG    APIENTRY GpiSetPel(HPS hps, PPOINTL pptlPoint);
  186.  
  187. #endif
  188.  
  189. #if defined(INCL_GPICONTROL)
  190.  
  191. BOOL   APIENTRY GpiAssociate(HPS hps, HDC hdc);
  192.  
  193. HPS    APIENTRY GpiCreatePS(HAB hab, HDC hdc, PSIZEL psizlSize, ULONG flOptions);
  194. BOOL   APIENTRY GpiDestroyPS(HPS hps);
  195.  
  196. BOOL   APIENTRY GpiErase(HPS hps);
  197.  
  198. HDC    APIENTRY GpiQueryDevice(HPS hps);
  199.  
  200. BOOL   APIENTRY GpiResetPS(HPS hps, ULONG flOptions);
  201. BOOL   APIENTRY GpiRestorePS(HPS hps, LONG lPSid);
  202. LONG   APIENTRY GpiSavePS(HPS hps);
  203.  
  204. #endif
  205.  
  206. #if defined(INCL_GPILCIDS) || !defined(INCL_NOCOMMON)
  207.  
  208. #define PU_ARBITRARY  0x0004
  209. #define PU_PELS       0x0008
  210. #define PU_LOMETRIC   0x000C
  211. #define PU_HIMETRIC   0x0010
  212. #define PU_LOENGLISH  0x0014
  213. #define PU_HIENGLISH  0x0018
  214. #define PU_TWIPS      0x001C
  215.  
  216. #define GPIF_DEFAULT       0
  217. #define GPIF_SHORT    0x0100
  218. #define GPIF_LONG     0x0200
  219.  
  220. #define GPIT_NORMAL        0
  221. #define GPIT_MICRO    0x1000
  222. #define GPIT_INK      0x2000
  223.  
  224. #define GPIA_NOASSOC       0
  225. #define GPIA_ASSOC    0x4000
  226.  
  227. #define GPIM_AREAEXCL 0x8000
  228.  
  229. #endif
  230.  
  231. #if defined(INCL_GPILCIDS)
  232.  
  233. #define QF_PUBLIC     1
  234. #define QF_PRIVATE    2
  235. #define QF_NO_GENERIC 4
  236. #define QF_NO_DEVICE  8
  237.  
  238. #define FONT_DEFAULT   1
  239. #define FONT_MATCH     2
  240. #define LCIDT_FONT     6
  241. #define LCIDT_BITMAP   7
  242. #define LCID_ALL     (-1)
  243.  
  244. LONG   APIENTRY GpiCreateLogFont(HPS hps, PSTR8 pName, LONG lLcid, PFATTRS pfatAttrs);
  245.  
  246. BOOL   APIENTRY GpiDeleteSetId(HPS hps, LONG lLcid);
  247.  
  248. ULONG  APIENTRY GpiQueryCp(HPS hps);
  249.  
  250. LONG   APIENTRY GpiQueryFonts(HPS hps, ULONG flOptions, PCSZ pszFacename, PLONG plReqFonts,
  251.                    LONG lMetricsLength, PFONTMETRICS afmMetrics);
  252. BOOL   APIENTRY GpiQueryFontMetrics(HPS hps, LONG lMetricsLength, PFONTMETRICS pfmMetrics);
  253.  
  254. #endif
  255.  
  256. #if defined(INCL_GPILOGCOLORTABLE)
  257.  
  258. #define LCOL_RESET                   0x0001
  259. #define LCOL_REALIZABLE              0x0002
  260. #define LCOL_PURECOLOR               0x0004
  261. #define LCOL_OVERRIDE_DEFAULT_COLORS 0x0008
  262. #define LCOL_REALIZED                0x0010
  263.  
  264. #define LCOLF_DEFAULT   0
  265. #define LCOLF_INDRGB    1
  266. #define LCOLF_CONSECRGB 2
  267. #define LCOLF_RGB       3
  268. #define LCOLF_PALETTE   4
  269.  
  270. #define LCOLOPT_REALIZED 1
  271. #define LCOLOPT_INDEX    2
  272.  
  273. #define PC_RESERVED   0x01
  274. #define PC_EXPLICIT   0x02
  275. #define PC_NOCOLLAPSE 0x04
  276.  
  277. BOOL   APIENTRY GpiCreateLogColorTable(HPS hps, ULONG flOptions, LONG lFormat,
  278.                    LONG lStart, LONG lCount, PLONG alTable);
  279.  
  280. BOOL   APIENTRY GpiQueryColorData(HPS hps, LONG lCount, PLONG alArray);
  281. LONG   APIENTRY GpiQueryColorIndex(HPS hps, ULONG flOptions, LONG lRgbColor);
  282.  
  283. LONG   APIENTRY GpiQueryNearestColor(HPS hps, ULONG flOptions, LONG lRgbIn);
  284.  
  285. #endif
  286.  
  287. #if defined(INCL_GPIPOLYGON)
  288.  
  289. #define POLYGON_NOBOUNDARY  0
  290. #define POLYGON_BOUNDARY    1
  291. #define POLYGON_ALTERNATE   0
  292. #define POLYGON_WINDING     2
  293. #define POLYGON_INCL        0
  294. #define POLYGON_EXCL        8
  295. #define POLYGON_FILL        0
  296. #define POLYGON_NOFILL     16
  297.  
  298. typedef struct _POLYGON {
  299.     ULONG   ulPoints;
  300.     PPOINTL aPointl;
  301. } POLYGON, *PPOLYGON;
  302.  
  303. typedef struct _POLYSET {
  304.     ULONG   ulPolys;
  305.     POLYGON aPolygon[1];
  306. } POLYSET, *PPOLYSET;
  307.  
  308. LONG   APIENTRY GpiPolygons(HPS hps, ULONG ulCount, PPOLYGON paplgn, ULONG flOpts, ULONG flMdl);
  309.  
  310. #endif
  311.  
  312. #if defined(INCL_GPIPRIMITIVES) || !defined(INCL_NOCOMMON)
  313.  
  314. #define BA_NOBOUNDARY 0
  315. #define BA_BOUNDARY   1
  316. #define BA_ALTERNATE  0
  317. #define BA_WINDING    2
  318. #define BA_INCL       0
  319. #define BA_EXCL       8
  320.  
  321. #define CLR_ERROR      (-255)
  322. #define CLR_FALSE        (-5)
  323. #define CLR_TRUE         (-4)
  324. #define CLR_DEFAULT      (-3)
  325. #define CLR_WHITE        (-2)
  326. #define CLR_BLACK        (-1)
  327. #define CLR_BACKGROUND     0
  328. #define CLR_BLUE           1
  329. #define CLR_RED            2
  330. #define CLR_PINK           3
  331. #define CLR_GREEN          4
  332. #define CLR_CYAN           5
  333. #define CLR_YELLOW         6
  334. #define CLR_NEUTRAL        7
  335. #define CLR_DARKGRAY       8
  336. #define CLR_DARKBLUE       9
  337. #define CLR_DARKRED       10
  338. #define CLR_DARKPINK      11
  339. #define CLR_DARKGREEN     12
  340. #define CLR_DARKCYAN      13
  341. #define CLR_BROWN         14
  342. #define CLR_PALEGRAY      15
  343.  
  344. #define DRO_FILL        1
  345. #define DRO_OUTLINE     2
  346. #define DRO_OUTLINEFILL 3
  347. #define DRO_EXCLUSIVE   0x10000000
  348.  
  349. #define FM_ERROR         (-1)
  350. #define FM_DEFAULT         0
  351. #define FM_OR              1
  352. #define FM_OVERPAINT       2
  353. #define FM_XOR             4
  354. #define FM_LEAVEALONE      5
  355. #define FM_AND             6
  356. #define FM_SUBTRACT        7
  357. #define FM_MASKSRCNOT      8
  358. #define FM_ZERO            9
  359. #define FM_NOTMERGESRC    10
  360. #define FM_NOTXORSRC      11
  361. #define FM_INVERT         12
  362. #define FM_MERGESRCNOT    13
  363. #define FM_NOTCOPYSRC     14
  364. #define FM_MERGENOTSRC    15
  365. #define FM_NOTMASKSRC     16
  366. #define FM_ONE            17
  367.  
  368. #define BM_ERROR          (-1)
  369. #define BM_DEFAULT          0
  370. #define BM_OR               1
  371. #define BM_OVERPAINT        2
  372. #define BM_XOR              4
  373. #define BM_LEAVEALONE       5
  374. #define BM_AND              6
  375. #define BM_SUBTRACT         7
  376. #define BM_MASKSRCNOT       8
  377. #define BM_ZERO             9
  378. #define BM_NOTMERGESRC     10
  379. #define BM_NOTXORSRC       11
  380. #define BM_INVERT          12
  381. #define BM_MERGESRCNOT     13
  382. #define BM_NOTCOPYSRC      14
  383. #define BM_MERGENOTSRC     15
  384. #define BM_NOTMASKSRC      16
  385. #define BM_ONE             17
  386. #define BM_SRCTRANSPARENT  18
  387. #define BM_DESTTRANSPARENT 19
  388.  
  389. #define LCID_ERROR   (-1)
  390. #define LCID_DEFAULT   0
  391.  
  392. #define PATSYM_ERROR    (-1)
  393. #define PATSYM_DEFAULT    0
  394. #define PATSYM_DENSE1     1
  395. #define PATSYM_DENSE2     2
  396. #define PATSYM_DENSE3     3
  397. #define PATSYM_DENSE4     4
  398. #define PATSYM_DENSE5     5
  399. #define PATSYM_DENSE6     6
  400. #define PATSYM_DENSE7     7
  401. #define PATSYM_DENSE8     8
  402. #define PATSYM_VERT       9
  403. #define PATSYM_HORIZ     10
  404. #define PATSYM_DIAG1     11
  405. #define PATSYM_DIAG2     12
  406. #define PATSYM_DIAG3     13
  407. #define PATSYM_DIAG4     14
  408. #define PATSYM_NOSHADE   15
  409. #define PATSYM_SOLID     16
  410. #define PATSYM_HALFTONE  17
  411. #define PATSYM_HATCH     18
  412. #define PATSYM_DIAGHATCH 19
  413. #define PATSYM_BLANK     64
  414.  
  415. #define TXTBOX_TOPLEFT     0
  416. #define TXTBOX_BOTTOMLEFT  1
  417. #define TXTBOX_TOPRIGHT    2
  418. #define TXTBOX_BOTTOMRIGHT 3
  419. #define TXTBOX_CONCAT      4
  420. #define TXTBOX_COUNT       5
  421.  
  422. BOOL   APIENTRY GpiBeginArea(HPS hps, ULONG flOptions);
  423. LONG   APIENTRY GpiBox(HPS hps, LONG lControl, PPOINTL pptlPoint, LONG lHRound, LONG lVRound);
  424. LONG   APIENTRY GpiCharString(HPS hps, LONG lCount, PCH pchString);
  425. LONG   APIENTRY GpiCharStringAt(HPS hps, PPOINTL pptlPoint, LONG lCount, PCH pchString);
  426. LONG   APIENTRY GpiCharStringPos(HPS hps, PRECTL prclRect, ULONG flOptions, LONG lCount,
  427.                    PCH pchString, PLONG alAdx);
  428. LONG   APIENTRY GpiCharStringPosAt(HPS hps, PPOINTL pptlStart, PRECTL prclRect,
  429.                    ULONG flOptions, LONG lCount, PCH pchString, PLONG alAdx);
  430. BOOL   APIENTRY GpiComment(HPS hps, LONG lLength, PBYTE pbData);
  431. LONG   APIENTRY GpiEndArea(HPS hps);
  432. LONG   APIENTRY GpiFullArc(HPS hps, LONG lControl, FIXED fxMultiplier);
  433.  
  434. LONG   APIENTRY GpiLine(HPS hps, PPOINTL pptlEndPoint);
  435.  
  436. LONG   APIENTRY GpiPartialArc(HPS hps, PPOINTL pptlCenter, FIXED fxMultiplier,
  437.                    FIXED fxStartAngle, FIXED fxSweepAngle);
  438.  
  439. LONG   APIENTRY GpiQueryBackColor(HPS hps);
  440. LONG   APIENTRY GpiQueryBackMix(HPS hps);
  441.  
  442. BOOL   APIENTRY GpiQueryCharBreakExtra(HPS hps, PFIXED BreakExtra);
  443. LONG   APIENTRY GpiQueryCharDirection(HPS hps);
  444. BOOL   APIENTRY GpiQueryCharExtra(HPS hps, PFIXED Extra);
  445. LONG   APIENTRY GpiQueryCharMode(HPS hps);
  446. LONG   APIENTRY GpiQueryCharSet(HPS hps);
  447. BOOL   APIENTRY GpiQueryCharShear(HPS hps, PPOINTL pptlShear);
  448. BOOL   APIENTRY GpiQueryCharStringPos(HPS hps, ULONG flOptions, LONG lCount,
  449.                    PCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
  450. BOOL   APIENTRY GpiQueryCharStringPosAt(HPS hps, PPOINTL pptlStart, ULONG flOptions, LONG lCount,
  451.                    PCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
  452. LONG   APIENTRY GpiQueryClipBox(HPS hps, PRECTL prclBound);
  453. HRGN   APIENTRY GpiQueryClipRegion(HPS hps);
  454. LONG   APIENTRY GpiQueryColor(HPS hps);
  455. BOOL   APIENTRY GpiQueryCurrentPosition(HPS hps, PPOINTL pptlPoint);
  456. BOOL   APIENTRY GpiQueryDefCharBox(HPS hps, PSIZEL psizlSize);
  457. LONG   APIENTRY GpiQueryLineEnd(HPS hps);
  458.  
  459. LONG   APIENTRY GpiQueryMix(HPS hps);
  460.  
  461. BOOL   APIENTRY GpiQueryTextAlignment(HPS hps, PLONG plHoriz, PLONG plVert);
  462. BOOL   APIENTRY GpiQueryTextBox(HPS hps, LONG lCount1, PCH pchString,
  463.                    LONG lCount2, PPOINTL aptlPoints);
  464.  
  465. LONG   APIENTRY GpiRectVisible(HPS hps, PRECTL prclRectangle);
  466.  
  467. BOOL   APIENTRY GpiSetBackColor(HPS hps, LONG lColor);
  468. BOOL   APIENTRY GpiSetBackMix(HPS hps, LONG lMixMode);
  469.  
  470. BOOL   APIENTRY GpiSetCharBreakExtra(HPS hps, FIXED BreakExtra);
  471. BOOL   APIENTRY GpiSetCharDirection(HPS hps, LONG lDirection);
  472. BOOL   APIENTRY GpiSetCharExtra(HPS hps, FIXED Extra);
  473. BOOL   APIENTRY GpiSetCharMode(HPS hps, LONG lMode);
  474. BOOL   APIENTRY GpiSetCharSet(HPS hps, LONG llcid);
  475. BOOL   APIENTRY GpiSetCharShear(HPS hps, PPOINTL pptlAngle);
  476. BOOL   APIENTRY GpiSetColor(HPS hps, LONG lColor);
  477. BOOL   APIENTRY GpiSetCurrentPosition(HPS hps, PPOINTL pptlPoint);
  478. BOOL   APIENTRY GpiSetLineEnd(HPS hps, LONG lLineEnd);
  479. BOOL   APIENTRY GpiSetLineJoin(HPS hps, LONG lLineJoin);
  480. BOOL   APIENTRY GpiSetLineType(HPS hps, LONG lLineType);
  481. BOOL   APIENTRY GpiSetLineWidth(HPS hps, FIXED fxLineWidth);
  482. BOOL   APIENTRY GpiSetLineWidthGeom(HPS hps, LONG lLineWidth);
  483. BOOL   APIENTRY GpiSetMarker(HPS hps, LONG lSymbol);
  484. BOOL   APIENTRY GpiSetMarkerSet(HPS hps, LONG lSet);
  485. BOOL   APIENTRY GpiSetMix(HPS hps, LONG lMixMode);
  486.  
  487. BOOL   APIENTRY GpiSetPattern(HPS hps, LONG lPatternSymbol);
  488. BOOL   APIENTRY GpiSetPatternRefPoint(HPS hps, PPOINTL pptlRefPoint);
  489. BOOL   APIENTRY GpiSetPatternSet(HPS hps, LONG lSet);
  490.  
  491. BOOL   APIENTRY GpiSetTextAlignment(HPS hps, LONG lHoriz, LONG lVert);
  492.  
  493. #endif
  494.  
  495. #if defined(INCL_GPIPRIMITIVES)
  496.  
  497. #define LINETYPE_ERROR       (-1)
  498. #define LINETYPE_DEFAULT       0
  499. #define LINETYPE_DOT           1
  500. #define LINETYPE_SHORTDASH     2
  501. #define LINETYPE_DASHDOT       3
  502. #define LINETYPE_DOUBLEDOT     4
  503. #define LINETYPE_LONGDASH      5
  504. #define LINETYPE_DASHDOUBLEDOT 6
  505. #define LINETYPE_SOLID         7
  506. #define LINETYPE_INVISIBLE     8
  507. #define LINETYPE_ALTERNATE     9
  508.  
  509. #define LINEWIDTH_ERROR          (-1)
  510. #define LINEWIDTH_DEFAULT          0
  511. #define LINEWIDTH_NORMAL  0x00010000
  512. #define LINEWIDTH_THICK   0x00020000
  513.  
  514. #define LINEWIDTHGEOM_ERROR (-1)
  515.  
  516. #define LINEEND_ERROR     (-1)
  517. #define LINEEND_DEFAULT     0
  518. #define LINEEND_FLAT        1
  519. #define LINEEND_SQUARE      2
  520. #define LINEEND_ROUND       3
  521.  
  522. #define LINEJOIN_ERROR    (-1)
  523. #define LINEJOIN_DEFAULT    0
  524. #define LINEJOIN_BEVEL      1
  525. #define LINEJOIN_ROUND      2
  526. #define LINEJOIN_MITRE      3
  527.  
  528. #define CHDIRN_ERROR      (-1)
  529. #define CHDIRN_DEFAULT      0
  530. #define CHDIRN_LEFTRIGHT    1
  531. #define CHDIRN_TOPBOTTOM    2
  532. #define CHDIRN_RIGHTLEFT    3
  533. #define CHDIRN_BOTTOMTOP    4
  534.  
  535. #define PRIM_LINE   1
  536. #define PRIM_CHAR   2
  537. #define PRIM_MARKER 3
  538. #define PRIM_AREA   4
  539. #define PRIM_IMAGE  5
  540.  
  541. #define LBB_COLOR         0x0001
  542. #define LBB_BACK_COLOR    0x0002
  543. #define LBB_MIX_MODE      0x0004
  544. #define LBB_BACK_MIX_MODE 0x0008
  545. #define LBB_WIDTH         0x0010
  546. #define LBB_GEOM_WIDTH    0x0020
  547. #define LBB_TYPE          0x0040
  548. #define LBB_END           0x0080
  549. #define LBB_JOIN          0x0100
  550.  
  551. #define CBB_COLOR         0x0001
  552. #define CBB_BACK_COLOR    0x0002
  553. #define CBB_MIX_MODE      0x0004
  554. #define CBB_BACK_MIX_MODE 0x0008
  555. #define CBB_SET           0x0010
  556. #define CBB_MODE          0x0020
  557. #define CBB_BOX           0x0040
  558. #define CBB_ANGLE         0x0080
  559. #define CBB_SHEAR         0x0100
  560. #define CBB_DIRECTION     0x0200
  561. #define CBB_TEXT_ALIGN    0x0400
  562. #define CBB_EXTRA         0x0800
  563. #define CBB_BREAK_EXTRA   0x1000
  564.  
  565. #define MBB_COLOR         0x0001
  566. #define MBB_BACK_COLOR    0x0002
  567. #define MBB_MIX_MODE      0x0004
  568. #define MBB_BACK_MIX_MODE 0x0008
  569. #define MBB_SET           0x0010
  570. #define MBB_SYMBOL        0x0020
  571. #define MBB_BOX           0x0040
  572.  
  573. #define ABB_COLOR         0x0001
  574. #define ABB_BACK_COLOR    0x0002
  575. #define ABB_MIX_MODE      0x0004
  576. #define ABB_BACK_MIX_MODE 0x0008
  577. #define ABB_SET           0x0010
  578. #define ABB_SYMBOL        0x0020
  579. #define ABB_REF_POINT     0x0040
  580.  
  581. #define IBB_COLOR         0x0001
  582. #define IBB_BACK_COLOR    0x0002
  583. #define IBB_MIX_MODE      0x0004
  584. #define IBB_BACK_MIX_MODE 0x0008
  585.  
  586. #define TA_NORMAL_HORIZ   0x0001
  587. #define TA_LEFT           0x0002
  588. #define TA_CENTER         0x0003
  589. #define TA_RIGHT          0x0004
  590. #define TA_STANDARD_HORIZ 0x0005
  591. #define TA_NORMAL_VERT    0x0100
  592. #define TA_TOP            0x0200
  593. #define TA_HALF           0x0300
  594. #define TA_BASE           0x0400
  595. #define TA_BOTTOM         0x0500
  596. #define TA_STANDARD_VERT  0x0600
  597.  
  598. typedef PVOID PBUNDLE;
  599.  
  600. typedef struct _SIZEF {
  601.     FIXED  cx;
  602.     FIXED  cy;
  603. } SIZEF, *PSIZEF;
  604.  
  605. typedef struct _ARCPARAMS {
  606.     LONG lP;
  607.     LONG lQ;
  608.     LONG lR;
  609.     LONG lS;
  610. } ARCPARAMS, *PARCPARAMS;
  611.  
  612. typedef struct _AREABUNDLE {
  613.     LONG   lColor;
  614.     LONG   lBackColor;
  615.     USHORT usMixMode;
  616.     USHORT usBackMixMode;
  617.     USHORT usSet;
  618.     USHORT usSymbol;
  619.     POINTL ptlRefPoint;
  620. } AREABUNDLE, *PAREABUNDLE;
  621.  
  622. typedef struct _CHARBUNDLE {
  623.     LONG   lColor;
  624.     LONG   lBackColor;
  625.     USHORT usMixMode;
  626.     USHORT usBackMixMode;
  627.     USHORT usSet;
  628.     USHORT usPrecision;
  629.     SIZEF  sizfxCell;
  630.     POINTL ptlAngle;
  631.     POINTL ptlShear;
  632.     USHORT usDirection;
  633.     USHORT usTextAlign;
  634.     FIXED  fxExtra;
  635.     FIXED  fxBreakExtra;
  636. } CHARBUNDLE, *PCHARBUNDLE;
  637.  
  638. typedef struct _IMAGEBUNDLE {
  639.     LONG   lColor;
  640.     LONG   lBackColor;
  641.     USHORT usMixMode;
  642.     USHORT usBackMixMode;
  643. } IMAGEBUNDLE, *PIMAGEBUNDLE;
  644.  
  645. typedef struct _LINEBUNDLE {
  646.     LONG   lColor;
  647.     LONG   lBackColor;
  648.     USHORT usMixMode;
  649.     USHORT usBackMixMode;
  650.     FIXED  fxWidth;
  651.     LONG   lGeomWidth;
  652.     USHORT usType;
  653.     USHORT usEnd;
  654.     USHORT usJoin;
  655.     USHORT usReserved;
  656. } LINEBUNDLE, *PLINEBUNDLE;
  657.  
  658. typedef struct _MARKERBUNDLE {
  659.     LONG   lColor;
  660.     LONG   lBackColor;
  661.     USHORT usMixMode;
  662.     USHORT usBackMixMode;
  663.     USHORT usSet;
  664.     USHORT usSymbol;
  665.     SIZEF  sizfxCell;
  666. } MARKERBUNDLE, *PMARKERBUNDLE;
  667.  
  668. typedef struct _GRADIENTL {
  669.     LONG     x;
  670.     LONG     y;
  671. } GRADIENTL, *PGRADIENTL;
  672.  
  673. LONG   APIENTRY GpiQueryAttrs(HPS hps, LONG lPrimType, ULONG flAttrMask, PBUNDLE ppbunAttrs);
  674. BOOL   APIENTRY GpiQueryCharAngle(HPS hps, PGRADIENTL pgradlAngle);
  675. BOOL   APIENTRY GpiQueryCharBox(HPS hps, PSIZEF sizfxSize);
  676.  
  677. BOOL   APIENTRY GpiSetArcParams(HPS hps, PARCPARAMS parcpArcParams);
  678. BOOL   APIENTRY GpiSetAttrs(HPS hps, LONG lPrimType, ULONG flAttrMask,
  679.                    ULONG flDefMask, PBUNDLE ppbunAttrs);
  680. BOOL   APIENTRY GpiSetCharBox(HPS hps, PSIZEF psizfxBox);
  681. BOOL   APIENTRY GpiSetMarkerBox(HPS hps, PSIZEF psizfxSize);
  682.  
  683. #endif
  684.  
  685. #if defined(INCL_GPIREGIONS)
  686.  
  687. LONG   APIENTRY GpiIntersectClipRectangle(HPS hps, PRECTL prclRectangle);
  688.  
  689. LONG   APIENTRY GpiSetClipRegion(HPS hps, HRGN hrgn, PHRGN phrgnOld);
  690.  
  691. #endif
  692.  
  693. #if defined(INCL_GPITRANSFORMS)
  694.  
  695. BOOL   APIENTRY GpiQueryPageViewport(HPS hps, PRECTL prclViewport);
  696.  
  697. BOOL   APIENTRY GpiSetPageViewport(HPS hps, PRECTL prclViewport);
  698.  
  699. #endif
  700.