pmgpi.pas 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495
  1. {****************************************************************************
  2. Copyright (c) 1993,94 by Florian Kl„mpfl
  3. ****************************************************************************}
  4. unit pmgpi;
  5. interface
  6. uses
  7. os2def,pmbitmap;
  8. const
  9. GPI_ERROR = 0;
  10. GPI_OK = 1;
  11. GPI_ALTERROR = (-1);
  12. type
  13. FIXED = LONG;
  14. PFIXED = ^FIXED;
  15. FIXED88 = USHORT;
  16. FIXED114 = USHORT;
  17. SIZEL = record
  18. cx : LONG;
  19. cy : LONG;
  20. end;
  21. PSIZEL = ^SIZEL;
  22. const
  23. CLR_NOINDEX = (-254);
  24. PU_ARBITRARY = $0004;
  25. PU_PELS = $0008;
  26. PU_LOMETRIC = $000C;
  27. PU_HIMETRIC = $0010;
  28. PU_LOENGLISH = $0014;
  29. PU_HIENGLISH = $0018;
  30. PU_TWIPS = $001C;
  31. GPIF_DEFAULT = 0;
  32. GPIF_SHORT = $0100;
  33. GPIF_LONG = $0200;
  34. GPIT_NORMAL = 0;
  35. GPIT_MICRO = $1000;
  36. GPIA_NOASSOC = 0;
  37. GPIA_ASSOC = $4000;
  38. HDC_ERROR = -1;
  39. function GpiCreatePS(hab : HAB;hdc : HDC;psizlSize : PSIZEL;flOptions : ULONG) : HPS;
  40. function GpiDestroyPS(hps : HPS) : BOOL;
  41. function GpiAssociate(hps : HPS;hdc : HDC) : BOOL;
  42. function GpiRestorePS(hps : HPS;lPSid : LONG) : BOOL;
  43. function GpiSavePS(hps : HPS) : LONG;
  44. function GpiErase(hps : HPS) : BOOL;
  45. function GpiQueryDevice(hps : HPS) : HDC;
  46. const
  47. GRES_ATTRS = $0001;
  48. GRES_SEGMENTS = $0002;
  49. GRES_ALL = $0004;
  50. PS_UNITS = $00FC;
  51. PS_FORMAT = $0F00;
  52. PS_TYPE = $1000;
  53. PS_MODE = $2000;
  54. PS_ASSOCIATE = $4000;
  55. PS_NORESET = $8000;
  56. GPIE_SEGMENT = 0;
  57. GPIE_ELEMENT = 1;
  58. GPIE_DATA = 2;
  59. DCTL_ERASE = 1;
  60. DCTL_DISPLAY = 2;
  61. DCTL_BOUNDARY = 3;
  62. DCTL_DYNAMIC = 4;
  63. DCTL_CORRELATE = 5;
  64. DCTL_ERROR = -1;
  65. DCTL_OFF = 0;
  66. DCTL_ON = 1;
  67. SDW_ERROR = -1;
  68. SDW_OFF = 0;
  69. SDW_ON = 1;
  70. DM_ERROR = 0;
  71. DM_DRAW = 1;
  72. DM_RETAIN = 2;
  73. DM_DRAWANDRETAIN = 3;
  74. function GpiResetPS(hps : HPS;flOptions : ULONG) : BOOL;
  75. function GpiSetPS(hps : HPS;psizlsize : PSIZEL;flOptions : ULONG) : BOOL;
  76. function GpiQueryPS(hps : HPS;psizlSize : PSIZEL) : ULONG;
  77. function GpiErrorSegmentData(hps : HPS;plSegment : PLONG;plContext : PLONG) : LONG;
  78. function GpiQueryDrawControl(hps : HPS;lControl : LONG) : LONG;
  79. function GpiSetDrawControl(hps : HPS;lControl : LONG;lValue : LONG) : BOOL;
  80. function GpiQueryDrawingMode(hps : HPS) : LONG;
  81. function GpiSetDrawingMode(hps : HPS;lMode : LONG) : BOOL;
  82. function GpiQueryStopDraw(hps : HPS) : LONG;
  83. function GpiSetStopDraw(hps : HPS;lValue : LONG) : BOOL;
  84. const
  85. PICKAP_DEFAULT = 0;
  86. PICKAP_REC = 2;
  87. PICKSEL_VISIBLE = 0;
  88. PICKSEL_ALL = 1;
  89. GPI_HITS = 2;
  90. function GpiCorrelateChain(hps : HPS;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;pl2 : PLONG) : LONG;
  91. function GpiQueryTag(hps : HPS;plTag : PLONG) : BOOL;
  92. function GpiSetTag(hps : HPS;lTag : LONG) : BOOL;
  93. function GpiQueryPickApertureSize(hps : HPS;psizlSize : PSIZEL) : BOOL;
  94. function GpiSetPickApertureSize(hps : HPS;lOptions : LONG;psizlSize : PSIZEL) : BOOL;
  95. function GpiQueryPickAperturePosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;
  96. function GpiSetPickAperturePosition(hps : HPS;pptlPick : PPOINTL) : BOOL;
  97. function GpiQueryBoundaryData(hps : HPS;prclBoundary : PRECTL) : BOOL;
  98. function GpiResetBoundaryData(hps : HPS) : BOOL;
  99. function GpiCorrelateFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;plSegTag : PLONG) : LONG;
  100. function GpiCorrelateSegment(hps : HPS;lSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;alSegTag : PLONG) : LONG;
  101. const
  102. DFORM_NOCONV = 0;
  103. DFORM_S370SHORT = 1;
  104. DFORM_PCSHORT = 2;
  105. DFORM_PCLONG = 4;
  106. ATTR_ERROR = (-1);
  107. ATTR_DETECTABLE = 1;
  108. ATTR_VISIBLE = 2;
  109. ATTR_CHAINED = 6;
  110. ATTR_DYNAMIC = 8;
  111. ATTR_FASTCHAIN = 9;
  112. ATTR_PROP_DETECTABLE = 10;
  113. ATTR_PROP_VISIBLE = 11;
  114. ATTR_OFF = 0;
  115. ATTR_ON = 1;
  116. LOWER_PRI = (-1);
  117. HIGHER_PRI = 1;
  118. function GpiOpenSegment(hps : HPS;lSegment : LONG) : BOOL;
  119. function GpiCloseSegment(hps : HPS) : BOOL;
  120. function GpiDeleteSegment(hps : HPS;lSegid : LONG) : BOOL;
  121. function GpiQueryInitialSegmentAttrs(hps : HPS;lAttribute : LONG) : LONG;
  122. function GpiSetInitialSegmentAttrs(hps : HPS;lAttribute : LONG;lValue : LONG) : BOOL;
  123. function GpiQuerySegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG) : LONG;
  124. function GpiSetSegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG;lValue : LONG) : BOOL;
  125. function GpiQuerySegmentPriority(hps : HPS;lRefSegid : LONG;lOrder : LONG) : LONG;
  126. function GpiSetSegmentPriority(hps : HPS;lSegid : LONG;lRefSegid : LONG;lOrder : LONG) : BOOL;
  127. function GpiDeleteSegments(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;
  128. function GpiQuerySegmentNames(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG;lMax : LONG;alSegids : PLONG) : LONG;
  129. function GpiGetData(hps : HPS;lSegid : LONG;plOffset : PLONG;lFormat : LONG;lLength : LONG;pbData : PBYTE) : LONG;
  130. function GpiPutData(hps : HPS;lFormat : LONG;plCount : PLONG;pbData : PBYTE) : LONG;
  131. function GpiDrawChain(hps : HPS) : BOOL;
  132. function GpiDrawFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;
  133. function GpiDrawSegment(hps : HPS;lSegment : LONG) : BOOL;
  134. function GpiDrawDynamics(hps : HPS) : BOOL;
  135. function GpiRemoveDynamics(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG) : BOOL;
  136. const
  137. SEGEM_ERROR = 0;
  138. SEGEM_INSERT = 1;
  139. SEGEM_REPLACE = 2;
  140. function GpiBeginElement(hps : HPS;lType : LONG;pszDesc : PSZ) : BOOL;
  141. function GpiEndElement(hps : HPS) : BOOL;
  142. function GpiLabel(hps : HPS;lLabel : LONG) : BOOL;
  143. function GpiElement(hps : HPS;lType : LONG;pszDesc : PSZ;lLength : LONG;pbData : PBYTE) : LONG;
  144. function GpiQueryElement(hps : HPS;lOff : LONG;lMaxLength : LONG;pbData : PBYTE) : LONG;
  145. function GpiDeleteElement(hps : HPS) : BOOL;
  146. function GpiDeleteElementRange(hps : HPS;lFirstElement : LONG;lLastElement : LONG) : BOOL;
  147. function GpiDeleteElementsBetweenLabels(hps : HPS;lFirstLabel : LONG;lLastLabel : LONG) : BOOL;
  148. function GpiQueryEditMode(hps : HPS) : LONG;
  149. function GpiSetEditMode(hps : HPS;lMode : LONG) : BOOL;
  150. function GpiQueryElementPointer(hps : HPS) : LONG;
  151. function GpiSetElementPointer(hps : HPS;lElement : LONG) : BOOL;
  152. function GpiOffsetElementPointer(hps : HPS;loffset : LONG) : BOOL;
  153. function GpiQueryElementType(hps : HPS;plType : PLONG;lLength : LONG;pszData : PSZ) : LONG;
  154. function GpiSetElementPointerAtLabel(hps : HPS;lLabel : LONG) : BOOL;
  155. const
  156. CVTC_WORLD = 1;
  157. CVTC_MODEL = 2;
  158. CVTC_DEFAULTPAGE = 3;
  159. CVTC_PAGE = 4;
  160. CVTC_DEVICE = 5;
  161. TRANSFORM_REPLACE = 0;
  162. TRANSFORM_ADD = 1;
  163. TRANSFORM_PREEMPT = 2;
  164. type
  165. MATRIXLF = record
  166. fxM11 : FIXED;
  167. fxM12 : FIXED;
  168. lM13 : LONG;
  169. fxM21 : FIXED;
  170. fxM22 : FIXED;
  171. lM23 : LONG;
  172. lM31 : LONG;
  173. lM32 : LONG;
  174. lM33 : LONG;
  175. end;
  176. PMATRIXLF = ^MATRIXLF;
  177. function GpiQuerySegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
  178. function GpiSetSegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;
  179. function GpiConvert(hps : HPS;lSrc : LONG;lTarg : LONG;lCount : LONG;aptlPoints : PPOINTL) : BOOL;
  180. function GpiConvertWithMatrix(hps : HPS;lCountp : LONG;aptlPoints : PPOINTL;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
  181. function GpiQueryModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
  182. function GpiSetModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;
  183. function GpiCallSegmentMatrix(hps : HPS;lSegment : LONG;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : LONG;
  184. function GpiQueryDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
  185. function GpiSetDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;
  186. function GpiQueryPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;
  187. function GpiSetPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;
  188. function GpiQueryViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
  189. function GpiSetViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;
  190. function GpiTranslate(hps : HPS;pmatrixlf : PMATRIXLF;long : LONG;ppointl : PPOINTL) : BOOL;
  191. function GpiScale(hps : HPS;p1 : PMATRIXLF;p2 : LONG;p3 : PFIXED;p4 : PPOINTL) : BOOL;
  192. function GpiRotate(p1 : HPS;p2 : PMATRIXLF;p3 : LONG;p4 : FIXED;p5 : PPOINTL) : BOOL;
  193. function GpiSetGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;
  194. function GpiQueryGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;
  195. function GpiSetViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
  196. function GpiQueryViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
  197. const
  198. MPATH_STROKE = 6;
  199. FPATH_ALTERNATE = 0;
  200. FPATH_WINDING = 2;
  201. FPATH_EXCL = 0;
  202. FPATH_INCL = 8;
  203. SCP_ALTERNATE = 0;
  204. SCP_WINDING = 2;
  205. SCP_AND = 4;
  206. SCP_RESET = 0;
  207. SCP_EXCL = 0;
  208. SCP_INCL = 8;
  209. function GpiBeginPath(hps : HPS;lPath : LONG) : BOOL;
  210. function GpiEndPath(hps : HPS) : BOOL;
  211. function GpiCloseFigure(hps : HPS) : BOOL;
  212. function GpiModifyPath(hps : HPS;lPath : LONG;lMode : LONG) : BOOL;
  213. function GpiFillPath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;
  214. function GpiSetClipPath(hps : HPS;lPath : LONG;lOptions : LONG) : BOOL;
  215. function GpiOutlinePath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;
  216. function GpiPathToRegion(GpiH : HPS;lPath : LONG;lOptions : LONG) : HRGN;
  217. function GpiStrokePath(hps : HPS;lPath : LONG;flOptions : ULONG) : LONG;
  218. const
  219. LCOL_RESET = $0001;
  220. LCOL_REALIZABLE = $0002;
  221. LCOL_PURECOLOR = $0004;
  222. LCOL_OVERRIDE_DEFAULT_COLORS = $0008;
  223. LCOL_REALIZED = $0010;
  224. LCOLF_DEFAULT = 0;
  225. LCOLF_INDRGB = 1;
  226. LCOLF_CONSECRGB = 2;
  227. LCOLF_RGB = 3;
  228. LCOLF_PALETTE = 4;
  229. LCOLOPT_REALIZED = $0001;
  230. LCOLOPT_INDEX = $0002;
  231. QLCT_ERROR = (-1);
  232. QLCT_RGB = (-2);
  233. QLCT_NOTLOADED = (-1);
  234. QCD_LCT_FORMAT = 0;
  235. QCD_LCT_LOINDEX = 1;
  236. QCD_LCT_HIINDEX = 2;
  237. QCD_LCT_OPTIONS = 3;
  238. PAL_ERROR = (-1);
  239. PC_RESERVED = $01;
  240. PC_EXPLICIT = $02;
  241. PC_NOCOLLAPSE = $04;
  242. function GpiCreateLogColorTable(hps : HPS;flOptions : ULONG;lFormat : LONG;lStart : LONG;lCount : LONG;alTable : PLONG) : BOOL;
  243. function GpiQueryColorData(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;
  244. function GpiQueryLogColorTable(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alArray : PLONG) : LONG;
  245. function GpiQueryRealColors(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alColors : PLONG) : LONG;
  246. function GpiQueryNearestColor(hps : HPS;flOptions : ULONG;lRgbIn : LONG) : LONG;
  247. function GpiQueryColorIndex(hps : HPS;flOptions : ULONG;lRgbColor : LONG) : LONG;
  248. function GpiQueryRGBColor(hps : HPS;flOptions : ULONG;lColorIndex : LONG) : LONG;
  249. function GpiCreatePalette(hab : HAB;flOptions : ULONG;ulFormat : ULONG;ulCount : ULONG;aulTable : PULONG) : HPAL;
  250. function GpiDeletePalette(hpal : HPAL) : BOOL;
  251. function GpiSelectPalette(hps : HPS;hpal : HPAL) : HPAL;
  252. function GpiAnimatePalette(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : LONG;
  253. function GpiSetPaletteEntries(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : BOOL;
  254. function GpiQueryPalette(hps : HPS) : HPAL;
  255. function GpiQueryPaletteInfo(hpal : HPAL;hps : HPS;flOptions : ULONG;ulStart : ULONG;ulCount : ULONG;aulArray : PULONG) : LONG;
  256. const
  257. CLR_FALSE = (-5);
  258. CLR_TRUE = (-4);
  259. CLR_ERROR = (-255);
  260. CLR_DEFAULT = (-3);
  261. CLR_WHITE = (-2);
  262. CLR_BLACK = (-1);
  263. CLR_BACKGROUND = 0;
  264. CLR_BLUE = 1;
  265. CLR_RED = 2;
  266. CLR_PINK = 3;
  267. CLR_GREEN = 4;
  268. CLR_CYAN = 5;
  269. CLR_YELLOW = 6;
  270. CLR_NEUTRAL = 7;
  271. CLR_DARKGRAY = 8;
  272. CLR_DARKBLUE = 9;
  273. CLR_DARKRED = 10;
  274. CLR_DARKPINK = 11;
  275. CLR_DARKGREEN = 12;
  276. CLR_DARKCYAN = 13;
  277. CLR_BROWN = 14;
  278. CLR_PALEGRAY = 15;
  279. RGB_ERROR = (-255);
  280. RGB_BLACK = $00000000;
  281. RGB_BLUE = $000000FF;
  282. RGB_GREEN = $0000FF00;
  283. RGB_CYAN = $0000FFFF;
  284. RGB_RED = $00FF0000;
  285. RGB_PINK = $00FF00FF;
  286. RGB_YELLOW = $00FFFF00;
  287. RGB_WHITE = $00FFFFFF;
  288. BA_NOBOUNDARY = 0;
  289. BA_BOUNDARY = $0001;
  290. BA_ALTERNATE = 0;
  291. BA_WINDING = $0002;
  292. BA_EXCL = 0;
  293. BA_INCL = 8;
  294. DRO_FILL = 1;
  295. DRO_OUTLINE = 2;
  296. DRO_OUTLINEFILL = 3;
  297. PATSYM_ERROR = (-1);
  298. PATSYM_DEFAULT = 0;
  299. PATSYM_DENSE1 = 1;
  300. PATSYM_DENSE2 = 2;
  301. PATSYM_DENSE3 = 3;
  302. PATSYM_DENSE4 = 4;
  303. PATSYM_DENSE5 = 5;
  304. PATSYM_DENSE6 = 6;
  305. PATSYM_DENSE7 = 7;
  306. PATSYM_DENSE8 = 8;
  307. PATSYM_VERT = 9;
  308. PATSYM_HORIZ = 10;
  309. PATSYM_DIAG1 = 11;
  310. PATSYM_DIAG2 = 12;
  311. PATSYM_DIAG3 = 13;
  312. PATSYM_DIAG4 = 14;
  313. PATSYM_NOSHADE = 15;
  314. PATSYM_SOLID = 16;
  315. PATSYM_HALFTONE = 17;
  316. PATSYM_HATCH = 18;
  317. PATSYM_DIAGHATCH = 19;
  318. PATSYM_BLANK = 64;
  319. LCID_ERROR = (-1);
  320. LCID_DEFAULT = 0;
  321. function GpiSetColor(hps : HPS;lColor : LONG) : BOOL;
  322. function GpiQueryColor(hps : HPS) : LONG;
  323. function GpiBox(hps : HPS;lControl : LONG;pptlPoint : PPOINTL;lHRound : LONG;lVRound : LONG) : LONG;
  324. function GpiMove(hps : HPS;pptlPoint : PPOINTL) : BOOL;
  325. function GpiLine(hps : HPS;pptlEndPoint : PPOINTL) : LONG;
  326. function GpiPolyLine(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
  327. function GpiPolyLineDisjoint(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
  328. function GpiSetPattern(hps : HPS;lPatternSymbol : LONG) : BOOL;
  329. function GpiQueryPattern(hps : HPS) : LONG;
  330. function GpiBeginArea(hps : HPS;flOptions : ULONG) : BOOL;
  331. function GpiEndArea(hps : HPS) : LONG;
  332. function GpiCharString(hps : HPS;lCount : LONG;pchString : PCH) : LONG;
  333. function GpiCharStringAt(hps : HPS;pptlPoint : PPOINTL;lCount : LONG;pchString : PCH) : LONG;
  334. const
  335. AM_ERROR = (-1);
  336. AM_PRESERVE = 0;
  337. AM_NOPRESERVE = 1;
  338. FM_ERROR = (-1);
  339. FM_DEFAULT = 0;
  340. FM_OR = 1;
  341. FM_OVERPAINT = 2;
  342. FM_LEAVEALONE = 5;
  343. FM_XOR = 4;
  344. FM_AND = 6;
  345. FM_SUBTRACT = 7;
  346. FM_MASKSRCNOT = 8;
  347. FM_ZERO = 9;
  348. FM_NOTMERGESRC = 10;
  349. FM_NOTXORSRC = 11;
  350. FM_INVERT = 12;
  351. FM_MERGESRCNOT = 13;
  352. FM_NOTCOPYSRC = 14;
  353. FM_MERGENOTSRC = 15;
  354. FM_NOTMASKSRC = 16;
  355. FM_ONE = 17;
  356. BM_ERROR = (-1);
  357. BM_DEFAULT = 0;
  358. BM_OR = 1;
  359. BM_OVERPAINT = 2;
  360. BM_LEAVEALONE = 5;
  361. BM_XOR = 4;
  362. BM_AND = 6;
  363. BM_SUBTRACT = 7;
  364. BM_MASKSRCNOT = 8;
  365. BM_ZERO = 9;
  366. BM_NOTMERGESRC = 10;
  367. BM_NOTXORSRC = 11;
  368. BM_INVERT = 12;
  369. BM_MERGESRCNOT = 13;
  370. BM_NOTCOPYSRC = 14;
  371. BM_MERGENOTSRC = 15;
  372. BM_NOTMASKSRC = 16;
  373. BM_ONE = 17;
  374. BM_SRCTRANSPARENT = 18;
  375. BM_DESTTRANSPARENT = 19;
  376. LINETYPE_ERROR = (-1);
  377. LINETYPE_DEFAULT = 0;
  378. LINETYPE_DOT = 1;
  379. LINETYPE_SHORTDASH = 2;
  380. LINETYPE_DASHDOT = 3;
  381. LINETYPE_DOUBLEDOT = 4;
  382. LINETYPE_LONGDASH = 5;
  383. LINETYPE_DASHDOUBLEDOT = 6;
  384. LINETYPE_SOLID = 7;
  385. LINETYPE_INVISIBLE = 8;
  386. LINETYPE_ALTERNATE = 9;
  387. LINEWIDTH_ERROR = (-1);
  388. LINEWIDTH_DEFAULT = 0;
  389. LINEWIDTH_NORMAL = $00010000;
  390. LINEWIDTH_THICK = $00020000;
  391. LINEWIDTHGEOM_ERROR = (-1);
  392. LINEEND_ERROR = (-1);
  393. LINEEND_DEFAULT = 0;
  394. LINEEND_FLAT = 1;
  395. LINEEND_SQUARE = 2;
  396. LINEEND_ROUND = 3;
  397. LINEJOIN_ERROR = (-1);
  398. LINEJOIN_DEFAULT = 0;
  399. LINEJOIN_BEVEL = 1;
  400. LINEJOIN_ROUND = 2;
  401. LINEJOIN_MITRE = 3;
  402. CHDIRN_ERROR = (-1);
  403. CHDIRN_DEFAULT = 0;
  404. CHDIRN_LEFTRIGHT = 1;
  405. CHDIRN_TOPBOTTOM = 2;
  406. CHDIRN_RIGHTLEFT = 3;
  407. CHDIRN_BOTTOMTOP = 4;
  408. TA_NORMAL_HORIZ = $0001;
  409. TA_LEFT = $0002;
  410. TA_CENTER = $0003;
  411. TA_RIGHT = $0004;
  412. TA_STANDARD_HORIZ = $0005;
  413. TA_NORMAL_VERT = $0100;
  414. TA_TOP = $0200;
  415. TA_HALF = $0300;
  416. TA_BASE = $0400;
  417. TA_BOTTOM = $0500;
  418. TA_STANDARD_VERT = $0600;
  419. CM_ERROR = (-1);
  420. CM_DEFAULT = 0;
  421. CM_MODE1 = 1;
  422. CM_MODE2 = 2;
  423. CM_MODE3 = 3;
  424. MARKSYM_ERROR = (-1);
  425. MARKSYM_DEFAULT = 0;
  426. MARKSYM_CROSS = 1;
  427. MARKSYM_PLUS = 2;
  428. MARKSYM_DIAMOND = 3;
  429. MARKSYM_SQUARE = 4;
  430. MARKSYM_SIXPOINTSTAR = 5;
  431. MARKSYM_EIGHTPOINTSTAR = 6;
  432. MARKSYM_SOLIDDIAMOND = 7;
  433. MARKSYM_SOLIDSQUARE = 8;
  434. MARKSYM_DOT = 9;
  435. MARKSYM_SMALLCIRCLE = 10;
  436. MARKSYM_BLANK = 64;
  437. CHS_OPAQUE = $0001;
  438. CHS_VECTOR = $0002;
  439. CHS_LEAVEPOS = $0008;
  440. CHS_CLIP = $0010;
  441. CHS_UNDERSCORE = $0200;
  442. CHS_STRIKEOUT = $0400;
  443. PRIM_LINE = 1;
  444. PRIM_CHAR = 2;
  445. PRIM_MARKER = 3;
  446. PRIM_AREA = 4;
  447. PRIM_IMAGE = 5;
  448. LBB_COLOR = $0001;
  449. LBB_BACK_COLOR = $0002;
  450. LBB_MIX_MODE = $0004;
  451. LBB_BACK_MIX_MODE = $0008;
  452. LBB_WIDTH = $0010;
  453. LBB_GEOM_WIDTH = $0020;
  454. LBB_TYPE = $0040;
  455. LBB_END = $0080;
  456. LBB_JOIN = $0100;
  457. CBB_COLOR = $0001;
  458. CBB_BACK_COLOR = $0002;
  459. CBB_MIX_MODE = $0004;
  460. CBB_BACK_MIX_MODE = $0008;
  461. CBB_SET = $0010;
  462. CBB_MODE = $0020;
  463. CBB_BOX = $0040;
  464. CBB_ANGLE = $0080;
  465. CBB_SHEAR = $0100;
  466. CBB_DIRECTION = $0200;
  467. CBB_TEXT_ALIGN = $0400;
  468. CBB_EXTRA = $0800;
  469. CBB_BREAK_EXTRA = $1000;
  470. MBB_COLOR = $0001;
  471. MBB_BACK_COLOR = $0002;
  472. MBB_MIX_MODE = $0004;
  473. MBB_BACK_MIX_MODE = $0008;
  474. MBB_SET = $0010;
  475. MBB_SYMBOL = $0020;
  476. MBB_BOX = $0040;
  477. ABB_COLOR = $0001;
  478. ABB_BACK_COLOR = $0002;
  479. ABB_MIX_MODE = $0004;
  480. ABB_BACK_MIX_MODE = $0008;
  481. ABB_SET = $0010;
  482. ABB_SYMBOL = $0020;
  483. ABB_REF_POINT = $0040;
  484. IBB_COLOR = $0001;
  485. IBB_BACK_COLOR = $0002;
  486. IBB_MIX_MODE = $0004;
  487. IBB_BACK_MIX_MODE = $0008;
  488. type
  489. ARCPARAMS = record
  490. lP : LONG;
  491. lQ : LONG;
  492. lR : LONG;
  493. lS : LONG;
  494. end;
  495. PARCPARAMS = ^ARCPARAMS;
  496. SIZEF = record
  497. cx : FIXED;
  498. cy : FIXED;
  499. end;
  500. PSIZEF = ^SIZEF;
  501. GRADIENTL = record
  502. x : LONG;
  503. y : LONG;
  504. end;
  505. PGRADIENTL = ^GRADIENTL;
  506. LINEBUNDLE = record
  507. lColor : LONG;
  508. lBackColor : LONG;
  509. usMixMode : USHORT;
  510. usBackMixMode : USHORT;
  511. fxWidth : FIXED;
  512. lGeomWidth : LONG;
  513. usType : USHORT;
  514. usEnd : USHORT;
  515. usJoin : USHORT;
  516. usReserved : USHORT;
  517. end;
  518. PLINEBUNDLE = ^LINEBUNDLE;
  519. CHARBUNDLE = record
  520. lColor : LONG;
  521. lBackColor : LONG;
  522. usMixMode : USHORT;
  523. usBackMixMode : USHORT;
  524. usSet : USHORT;
  525. usPrecision : USHORT;
  526. sizfxCell : SIZEF;
  527. ptlAngle : POINTL;
  528. ptlShear : POINTL;
  529. usDirection : USHORT;
  530. usTextAlign : USHORT;
  531. fxExtra : FIXED;
  532. fxBreakExtra : FIXED;
  533. end;
  534. PCHARBUNDLE = ^CHARBUNDLE;
  535. MARKERBUNDLE = record
  536. lColor : LONG;
  537. lBackColor : LONG;
  538. usMixMode : USHORT;
  539. usBackMixMode : USHORT;
  540. usSet : USHORT;
  541. usSymbol : USHORT;
  542. sizfxCell : SIZEF;
  543. end;
  544. PMARKERBUNDLE = ^MARKERBUNDLE;
  545. AREABUNDLE = record
  546. lColor : LONG;
  547. lBackColor : LONG;
  548. usMixMode : USHORT;
  549. usBackMixMode : USHORT;
  550. usSet : USHORT;
  551. usSymbol : USHORT;
  552. ptlRefPoint : POINTL;
  553. end;
  554. PAREABUNDLE = ^AREABUNDLE;
  555. IMAGEBUNDLE = record
  556. lColor : LONG;
  557. lBackColor : LONG;
  558. usMixMode : USHORT;
  559. usBackMixMode : USHORT;
  560. end;
  561. PIMAGEBUNDLE = ^IMAGEBUNDLE;
  562. PBUNDLE = PVOID;
  563. const
  564. TXTBOX_TOPLEFT = 0;
  565. TXTBOX_BOTTOMLEFT = 1;
  566. TXTBOX_TOPRIGHT = 2;
  567. TXTBOX_BOTTOMRIGHT = 3;
  568. TXTBOX_CONCAT = 4;
  569. TXTBOX_COUNT = 5;
  570. PVIS_ERROR = 0;
  571. PVIS_INVISIBLE = 1;
  572. PVIS_VISIBLE = 2;
  573. RVIS_ERROR = 0;
  574. RVIS_INVISIBLE = 1;
  575. RVIS_PARTIAL = 2;
  576. RVIS_VISIBLE = 3;
  577. function GpiSetAttrMode(hps : HPS;lMode : LONG) : BOOL;
  578. function GpiQueryAttrMode(hps : HPS) : LONG;
  579. function GpiSetAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;flDefMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;
  580. function GpiQueryAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : LONG;
  581. function GpiSetBackColor(hps : HPS;lColor : LONG) : BOOL;
  582. function GpiQueryBackColor(hps : HPS) : LONG;
  583. function GpiSetMix(hps : HPS;lMixMode : LONG) : BOOL;
  584. function GpiQueryMix(hps : HPS) : LONG;
  585. function GpiSetBackMix(hps : HPS;lMixMode : LONG) : BOOL;
  586. function GpiQueryBackMix(hps : HPS) : LONG;
  587. function GpiSetLineType(hps : HPS;lLineType : LONG) : BOOL;
  588. function GpiQueryLineType(hps : HPS) : LONG;
  589. function GpiSetLineWidth(hps : HPS;fxLineWidth : FIXED) : BOOL;
  590. function GpiQueryLineWidth(hps : HPS) : FIXED;
  591. function GpiSetLineWidthGeom(hps : HPS;lLineWidth : LONG) : BOOL;
  592. function GpiQueryLineWidthGeom(hps : HPS) : LONG;
  593. function GpiSetLineEnd(hps : HPS;lLineEnd : LONG) : BOOL;
  594. function GpiQueryLineEnd(hps : HPS) : LONG;
  595. function GpiSetLineJoin(hps : HPS;lLineJoin : LONG) : BOOL;
  596. function GpiQueryLineJoin(hps : HPS) : LONG;
  597. function GpiSetCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;
  598. function GpiQueryCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;
  599. function GpiSetArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
  600. function GpiQueryArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
  601. function GpiPointArc(hps : HPS;pptl2 : PPOINTL) : LONG;
  602. function GpiFullArc(hps : HPS;lControl : LONG;fxMultiplier : FIXED) : LONG;
  603. function GpiPartialArc(hps : HPS;pptlCenter : PPOINTL;fxMultiplier : FIXED;fxStartAngle : FIXED;fxSweepAngle : FIXED) : LONG;
  604. function GpiPolyFillet(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
  605. function GpiPolySpline(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
  606. function GpiPolyFilletSharp(hps : HPS;lCount : LONG;aptlPoints : PPOINTL;afxPoints : PFIXED) : LONG;
  607. function GpiSetPatternSet(hps : HPS;lSet : LONG) : BOOL;
  608. function GpiQueryPatternSet(hps : HPS) : LONG;
  609. function GpiSetPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;
  610. function GpiQueryPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;
  611. function GpiQueryCharStringPos(hps : HPS;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;
  612. function GpiQueryCharStringPosAt(hps : HPS;pptlStart : PPOINTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;
  613. function GpiQueryTextBox(hps : HPS;lCount1 : LONG;pchString : PCH;lCount2 : LONG;aptlPoints : PPOINTL) : BOOL;
  614. function GpiQueryDefCharBox(hps : HPS;psizlSize : PSIZEL) : BOOL;
  615. function GpiSetCharSet(hps : HPS;llcid : LONG) : BOOL;
  616. function GpiQueryCharSet(hps : HPS) : LONG;
  617. function GpiSetCharBox(hps : HPS;psizfxBox : PSIZEF) : BOOL;
  618. function GpiQueryCharBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;
  619. function GpiSetCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;
  620. function GpiQueryCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;
  621. function GpiSetCharShear(hps : HPS;pptlAngle : PPOINTL) : BOOL;
  622. function GpiQueryCharShear(hps : HPS;pptlShear : PPOINTL) : BOOL;
  623. function GpiSetCharDirection(hps : HPS;lDirection : LONG) : BOOL;
  624. function GpiQueryCharDirection(hps : HPS) : LONG;
  625. function GpiSetCharMode(hps : HPS;lMode : LONG) : BOOL;
  626. function GpiQueryCharMode(hps : HPS) : LONG;
  627. function GpiSetTextAlignment(hps : HPS;lHoriz : LONG;lVert : LONG) : BOOL;
  628. function GpiQueryTextAlignment(hps : HPS;plHoriz : PLONG;plVert : PLONG) : BOOL;
  629. function GpiCharStringPos(hps : HPS;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;
  630. function GpiCharStringPosAt(hps : HPS;pptlStart : PPOINTL;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;
  631. function GpiSetCharExtra(hps : HPS;Extra : FIXED) : BOOL;
  632. function GpiSetCharBreakExtra(hps : HPS;BreakExtra : FIXED) : BOOL;
  633. function GpiQueryCharExtra(hps : HPS;Extra : PFIXED) : BOOL;
  634. function GpiQueryCharBreakExtra(hps : HPS;BreakExtra : PFIXED) : BOOL;
  635. function GpiMarker(hps : HPS;pptlPoint : PPOINTL) : LONG;
  636. function GpiPolyMarker(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
  637. function GpiSetMarker(hps : HPS;lSymbol : LONG) : BOOL;
  638. function GpiSetMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;
  639. function GpiSetMarkerSet(hps : HPS;lSet : LONG) : BOOL;
  640. function GpiQueryMarker(hps : HPS) : LONG;
  641. function GpiQueryMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;
  642. function GpiQueryMarkerSet(hps : HPS) : LONG;
  643. function GpiImage(hps : HPS;lFormat : LONG;psizlImageSize : PSIZEL;lLength : LONG;pbData : PBYTE) : LONG;
  644. function GpiPop(hps : HPS;lCount : LONG) : BOOL;
  645. function GpiPtVisible(hps : HPS;pptlPoint : PPOINTL) : LONG;
  646. function GpiRectVisible(hps : HPS;prclRectangle : PRECTL) : LONG;
  647. function GpiComment(hps : HPS;lLength : LONG;pbData : PBYTE) : BOOL;
  648. const
  649. FONT_DEFAULT = 1;
  650. FONT_MATCH = 2;
  651. LCIDT_FONT = 6;
  652. LCIDT_BITMAP = 7;
  653. LCID_ALL = (-1);
  654. type
  655. KERNINGPAIRS = record
  656. sFirstChar : SHORT;
  657. sSecondChar : SHORT;
  658. lKerningAmount : LONG;
  659. end;
  660. PKERNINGPAIRS = ^KERNINGPAIRS;
  661. FACENAMEDESC = record
  662. usSize : USHORT;
  663. usWeightClass : USHORT;
  664. usWidthClass : USHORT;
  665. usReserved : USHORT;
  666. flOptions : ULONG;
  667. end;
  668. PFACENAMEDESC = ^FACENAMEDESC;
  669. const
  670. FWEIGHT_DONT_CARE = 0;
  671. FWEIGHT_ULTRA_LIGHT = 1;
  672. FWEIGHT_EXTRA_LIGHT = 2;
  673. FWEIGHT_LIGHT = 3;
  674. FWEIGHT_SEMI_LIGHT = 4;
  675. FWEIGHT_NORMAL = 5;
  676. FWEIGHT_SEMI_BOLD = 6;
  677. FWEIGHT_BOLD = 7;
  678. FWEIGHT_EXTRA_BOLD = 8;
  679. FWEIGHT_ULTRA_BOLD = 9;
  680. FWIDTH_DONT_CARE = 0;
  681. FWIDTH_ULTRA_CONDENSED = 1;
  682. FWIDTH_EXTRA_CONDENSED = 2;
  683. FWIDTH_CONDENSED = 3;
  684. FWIDTH_SEMI_CONDENSED = 4;
  685. FWIDTH_NORMAL = 5;
  686. FWIDTH_SEMI_EXPANDED = 6;
  687. FWIDTH_EXPANDED = 7;
  688. FWIDTH_EXTRA_EXPANDED = 8;
  689. FWIDTH_ULTRA_EXPANDED = 9;
  690. FTYPE_ITALIC = $0001;
  691. FTYPE_ITALIC_DONT_CARE = $0002;
  692. FTYPE_OBLIQUE = $0004;
  693. FTYPE_OBLIQUE_DONT_CARE = $0008;
  694. FTYPE_ROUNDED = $0010;
  695. FTYPE_ROUNDED_DONT_CARE = $0020;
  696. QFA_PUBLIC = 1;
  697. QFA_PRIVATE = 2;
  698. QFA_ERROR = GPI_ALTERROR;
  699. QF_PUBLIC = $0001;
  700. QF_PRIVATE = $0002;
  701. QF_NO_GENERIC = $0004;
  702. QF_NO_DEVICE = $0008;
  703. type
  704. FFDESCS = array[0..1,0..FACESIZE-1] of char;
  705. PFFDESCS = ^FFDESCS;
  706. FFDESCS2 = record
  707. cbLength : ULONG;
  708. cbFacenameOffset : ULONG;
  709. abFamilyName : array[0..1-1] of BYTE;
  710. end;
  711. PFFDESCS2 = ^FFDESCS2;
  712. function GpiCreateLogFont(hps : HPS;pName : PSTR8;lLcid : LONG;pfatAttrs : PFATTRS) : LONG;
  713. function GpiDeleteSetId(hps : HPS;lLcid : LONG) : BOOL;
  714. function GpiLoadFonts(hab : HAB;pszFilename : PSZ) : BOOL;
  715. function GpiUnloadFonts(hab : HAB;pszFilename : PSZ) : BOOL;
  716. function GpiQueryFonts(hps : HPS;flOptions : ULONG;pszFacename : PSZ;plReqFonts : PLONG;lMetricsLength : LONG;afmMetrics : PFONTMETRICS) : LONG;
  717. function GpiQueryFontMetrics(hps : HPS;lMetricsLength : LONG;pfmMetrics : PFONTMETRICS) : BOOL;
  718. function GpiQueryKerningPairs(hps : HPS;lCount : LONG;akrnprData : PKERNINGPAIRS) : LONG;
  719. function GpiQueryWidthTable(hps : HPS;lFirstChar : LONG;lCount : LONG;alData : PLONG) : BOOL;
  720. function GpiQueryNumberSetIds(hps : HPS) : LONG;
  721. function GpiQuerySetIds(hps : HPS;lCount : LONG;alTypes : PLONG;aNames : PSTR8;allcids : PLONG) : BOOL;
  722. function GpiQueryFaceString(PS : HPS;FamilyName : PSZ;attrs : PFACENAMEDESC;length : LONG;CompoundFaceName : PSZ) : ULONG;
  723. function GpiQueryLogicalFont(PS : HPS;lcid : LONG;name : PSTR8;attrs : PFATTRS;length : LONG) : BOOL;
  724. function GpiQueryFontAction(anchor : HAB;options : ULONG) : ULONG;
  725. function GpiLoadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;
  726. function GpiUnloadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;
  727. function GpiSetCp(hps : HPS;ulCodePage : ULONG) : BOOL;
  728. function GpiQueryCp(hps : HPS) : ULONG;
  729. function GpiQueryFontFileDescriptions(hab : HAB;pszFilename : PSZ;plCount : PLONG;affdescsNames : PFFDESCS) : LONG;
  730. function GpiQueryFullFontFileDescs(hab : HAB;pszFilename : PSZ;plCount : PLONG;pNames : PVOID;plNamesBuffLength : PLONG) : LONG;
  731. const
  732. ROP_SRCCOPY = $00CC;
  733. ROP_SRCPAINT = $00EE;
  734. ROP_SRCAND = $0088;
  735. ROP_SRCINVERT = $0066;
  736. ROP_SRCERASE = $0044;
  737. ROP_NOTSRCCOPY = $0033;
  738. ROP_NOTSRCERASE = $0011;
  739. ROP_MERGECOPY = $00C0;
  740. ROP_MERGEPAINT = $00BB;
  741. ROP_PATCOPY = $00F0;
  742. ROP_PATPAINT = $00FB;
  743. ROP_PATINVERT = $005A;
  744. ROP_DSTINVERT = $0055;
  745. ROP_ZERO = $0000;
  746. ROP_ONE = $00FF;
  747. BBO_OR = 0;
  748. BBO_AND = 1;
  749. BBO_IGNORE = 2;
  750. BBO_PAL_COLORS = 4;
  751. BBO_NO_COLOR_INFO = 8;
  752. FF_BOUNDARY = 0;
  753. FF_SURFACE = 1;
  754. HBM_ERROR = -1;
  755. function GpiBitBlt(hpsTarget : HPS;hpsSource : HPS;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;
  756. function GpiDeleteBitmap(hbm : HBITMAP) : BOOL;
  757. function GpiLoadBitmap(hps : HPS;Resource : HMODULE;idBitmap : ULONG;lWidth : LONG;lHeight : LONG) : HBITMAP;
  758. function GpiSetBitmap(hps : HPS;hbm : HBITMAP) : HBITMAP;
  759. function GpiWCBitBlt(hpsTarget : HPS;hbmSource : HBITMAP;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;
  760. const
  761. CBM_INIT = $0004;
  762. BMB_ERROR = (-1);
  763. function GpiCreateBitmap(hps : HPS;pbmpNew : PBITMAPINFOHEADER2;flOptions : ULONG;pbInitData : PBYTE;pbmiInfoTable : PBITMAPINFO2) : HBITMAP;
  764. function GpiSetBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;
  765. function GpiSetBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;
  766. function GpiSetBitmapId(hps : HPS;hbm : HBITMAP;lLcid : LONG) : BOOL;
  767. function GpiQueryBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;
  768. function GpiQueryBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;
  769. function GpiQueryBitmapHandle(hps : HPS;lLcid : LONG) : HBITMAP;
  770. function GpiQueryBitmapParameters(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER) : BOOL;
  771. function GpiQueryBitmapInfoHeader(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER2) : BOOL;
  772. function GpiQueryDeviceBitmapFormats(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;
  773. function GpiSetPel(hps : HPS;pptlPoint : PPOINTL) : LONG;
  774. function GpiQueryPel(hps : HPS;pptlPoint : PPOINTL) : LONG;
  775. function GpiFloodFill(hps : HPS;lOptions : LONG;lColor : LONG) : LONG;
  776. function GpiDrawBits(hps : HPS;pBits : PVOID;pbmiInfoTable : PBITMAPINFO2;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;
  777. const
  778. CRGN_OR = 1;
  779. CRGN_COPY = 2;
  780. CRGN_XOR = 4;
  781. CRGN_AND = 6;
  782. CRGN_DIFF = 7;
  783. RECTDIR_LFRT_TOPBOT = 1;
  784. RECTDIR_RTLF_TOPBOT = 2;
  785. RECTDIR_LFRT_BOTTOP = 3;
  786. RECTDIR_RTLF_BOTTOP = 4;
  787. type
  788. RGNRECT = record
  789. ircStart : ULONG;
  790. crc : ULONG;
  791. crcReturned : ULONG;
  792. ulDirection : ULONG;
  793. end;
  794. PRGNRECT = ^RGNRECT;
  795. const
  796. RGN_ERROR = 0;
  797. RGN_NULL = 1;
  798. RGN_RECT = 2;
  799. RGN_COMPLEX = 3;
  800. PRGN_ERROR = 0;
  801. PRGN_OUTSIDE = 1;
  802. PRGN_INSIDE = 2;
  803. RRGN_ERROR = 0;
  804. RRGN_OUTSIDE = 1;
  805. RRGN_PARTIAL = 2;
  806. RRGN_INSIDE = 3;
  807. EQRGN_ERROR = 0;
  808. EQRGN_NOTEQUAL = 1;
  809. EQRGN_EQUAL = 2;
  810. HRGN_ERROR = -1;
  811. function GpiCombineRegion(hps : HPS;hrgnDest : HRGN;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN;lMode : LONG) : LONG;
  812. function GpiCreateRegion(hps : HPS;lCount : LONG;arclRectangles : PRECTL) : HRGN;
  813. function GpiDestroyRegion(hps : HPS;hrgn : HRGN) : BOOL;
  814. function GpiEqualRegion(hps : HPS;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN) : LONG;
  815. function GpiOffsetRegion(hps : HPS;Hrgn : HRGN;pptlOffset : PPOINTL) : BOOL;
  816. function GpiPaintRegion(hps : HPS;hrgn : HRGN) : LONG;
  817. function GpiFrameRegion(hps : HPS;hrgn : HRGN;thickness : PSIZEL) : LONG;
  818. function GpiPtInRegion(hps : HPS;hrgn : HRGN;pptlPoint : PPOINTL) : LONG;
  819. function GpiQueryRegionBox(hps : HPS;hrgn : HRGN;prclBound : PRECTL) : LONG;
  820. function GpiQueryRegionRects(hps : HPS;hrgn : HRGN;prclBound : PRECTL;prgnrcControl : PRGNRECT;prclRect : PRECTL) : BOOL;
  821. function GpiRectInRegion(hps : HPS;hrgn : HRGN;prclRect : PRECTL) : LONG;
  822. function GpiSetRegion(hps : HPS;hrgn : HRGN;lcount : LONG;arclRectangles : PRECTL) : BOOL;
  823. function GpiSetClipRegion(hps : HPS;hrgn : HRGN;phrgnOld : PHRGN) : LONG;
  824. function GpiQueryClipRegion(hps : HPS) : HRGN;
  825. function GpiQueryClipBox(hps : HPS;prclBound : PRECTL) : LONG;
  826. function GpiExcludeClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;
  827. function GpiIntersectClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;
  828. function GpiOffsetClipRegion(hps : HPS;pptlPoint : PPOINTL) : LONG;
  829. const
  830. PMF_SEGBASE = 0;
  831. PMF_LOADTYPE = 1;
  832. PMF_RESOLVE = 2;
  833. PMF_LCIDS = 3;
  834. PMF_RESET = 4;
  835. PMF_SUPPRESS = 5;
  836. PMF_COLORTABLES = 6;
  837. PMF_COLORREALIZABLE = 7;
  838. PMF_DEFAULTS = 8;
  839. PMF_DELETEOBJECTS = 9;
  840. RS_DEFAULT = 0;
  841. RS_NODISCARD = 1;
  842. LC_DEFAULT = 0;
  843. LC_NOLOAD = 1;
  844. LC_LOADDISC = 3;
  845. LT_DEFAULT = 0;
  846. LT_NOMODIFY = 1;
  847. LT_ORIGINALVIEW = 4;
  848. RES_DEFAULT = 0;
  849. RES_NORESET = 1;
  850. RES_RESET = 2;
  851. SUP_DEFAULT = 0;
  852. SUP_NOSUPPRESS = 1;
  853. SUP_SUPPRESS = 2;
  854. CTAB_DEFAULT = 0;
  855. CTAB_NOMODIFY = 1;
  856. CTAB_REPLACE = 3;
  857. CTAB_REPLACEPALETTE = 4;
  858. CREA_DEFAULT = 0;
  859. CREA_REALIZE = 1;
  860. CREA_NOREALIZE = 2;
  861. CREA_DOREALIZE = 3;
  862. DDEF_DEFAULT = 0;
  863. DDEF_IGNORE = 1;
  864. DDEF_LOADDISC = 3;
  865. DOBJ_DEFAULT = 0;
  866. DOBJ_NODELETE = 1;
  867. DOBJ_DELETE = 2;
  868. RSP_DEFAULT = 0;
  869. RSP_NODISCARD = 1;
  870. function GpiCopyMetaFile(hmf : HMF) : HMF;
  871. function GpiDeleteMetaFile(hmf : HMF) : BOOL;
  872. function GpiLoadMetaFile(hab : HAB;pszFilename : PSZ) : HMF;
  873. function GpiPlayMetaFile(hps : HPS;hmf : HMF;lCount1 : LONG;alOptarray : PLONG;plSegCount : PLONG;lCount2 : LONG;pszDesc : PSZ) : LONG;
  874. function GpiQueryMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbData : PBYTE) : BOOL;
  875. function GpiQueryMetaFileLength(hmf : HMF) : LONG;
  876. function GpiSaveMetaFile(hmf : HMF;pszFilename : PSZ) : BOOL;
  877. function GpiSetMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbBuffer : PBYTE) : BOOL;
  878. function GpiQueryDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
  879. function GpiQueryDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;
  880. function GpiQueryDefTag(hps : HPS;plTag : PLONG) : BOOL;
  881. function GpiQueryDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
  882. function GpiSetDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
  883. function GpiSetDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;
  884. function GpiSetDefTag(hps : HPS;lTag : LONG) : BOOL;
  885. function GpiSetDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
  886. type
  887. POLYGON = record
  888. ulPoints : ULONG;
  889. aPointl : PPOINTL;
  890. end;
  891. PPOLYGON = ^POLYGON;
  892. POLYSET = record
  893. ulPolys : ULONG;
  894. aPolygon : array[0..1-1] of POLYGON;
  895. end;
  896. PPOLYSET = ^POLYSET;
  897. const
  898. POLYGON_NOBOUNDARY = 0;
  899. POLYGON_BOUNDARY = $0001;
  900. POLYGON_ALTERNATE = 0;
  901. POLYGON_WINDING = $0002;
  902. POLYGON_EXCL = 0;
  903. POLYGON_INCL = $0008;
  904. function GpiPolygons(hps : HPS;ulCount : ULONG;paplgn : PPOLYGON;flOptions : ULONG;flModel : ULONG) : LONG;
  905. implementation
  906. function GpiCreatePS(hab : HAB;hdc : HDC;psizlSize : PSIZEL;flOptions : ULONG) : HPS;[SYSTEM];
  907. function GpiDestroyPS(hps : HPS) : BOOL;[SYSTEM];
  908. function GpiAssociate(hps : HPS;hdc : HDC) : BOOL;[SYSTEM];
  909. function GpiRestorePS(hps : HPS;lPSid : LONG) : BOOL;[SYSTEM];
  910. function GpiSavePS(hps : HPS) : LONG;[SYSTEM];
  911. function GpiErase(hps : HPS) : BOOL;[SYSTEM];
  912. function GpiQueryDevice(hps : HPS) : HDC;[SYSTEM];
  913. function GpiResetPS(hps : HPS;flOptions : ULONG) : BOOL;[SYSTEM];
  914. function GpiSetPS(hps : HPS;psizlsize : PSIZEL;flOptions : ULONG) : BOOL;[SYSTEM];
  915. function GpiQueryPS(hps : HPS;psizlSize : PSIZEL) : ULONG;[SYSTEM];
  916. function GpiErrorSegmentData(hps : HPS;plSegment : PLONG;plContext : PLONG) : LONG;[SYSTEM];
  917. function GpiQueryDrawControl(hps : HPS;lControl : LONG) : LONG;[SYSTEM];
  918. function GpiSetDrawControl(hps : HPS;lControl : LONG;lValue : LONG) : BOOL;[SYSTEM];
  919. function GpiQueryDrawingMode(hps : HPS) : LONG;[SYSTEM];
  920. function GpiSetDrawingMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
  921. function GpiQueryStopDraw(hps : HPS) : LONG;[SYSTEM];
  922. function GpiSetStopDraw(hps : HPS;lValue : LONG) : BOOL;[SYSTEM];
  923. function GpiCorrelateChain(hps : HPS;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;pl2 : PLONG) : LONG;[SYSTEM];
  924. function GpiQueryTag(hps : HPS;plTag : PLONG) : BOOL;[SYSTEM];
  925. function GpiSetTag(hps : HPS;lTag : LONG) : BOOL;[SYSTEM];
  926. function GpiQueryPickApertureSize(hps : HPS;psizlSize : PSIZEL) : BOOL;[SYSTEM];
  927. function GpiSetPickApertureSize(hps : HPS;lOptions : LONG;psizlSize : PSIZEL) : BOOL;[SYSTEM];
  928. function GpiQueryPickAperturePosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
  929. function GpiSetPickAperturePosition(hps : HPS;pptlPick : PPOINTL) : BOOL;[SYSTEM];
  930. function GpiQueryBoundaryData(hps : HPS;prclBoundary : PRECTL) : BOOL;[SYSTEM];
  931. function GpiResetBoundaryData(hps : HPS) : BOOL;[SYSTEM];
  932. function GpiCorrelateFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;plSegTag : PLONG) : LONG;[SYSTEM];
  933. function GpiCorrelateSegment(hps : HPS;lSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;alSegTag : PLONG) : LONG;[SYSTEM];
  934. function GpiOpenSegment(hps : HPS;lSegment : LONG) : BOOL;[SYSTEM];
  935. function GpiCloseSegment(hps : HPS) : BOOL;[SYSTEM];
  936. function GpiDeleteSegment(hps : HPS;lSegid : LONG) : BOOL;[SYSTEM];
  937. function GpiQueryInitialSegmentAttrs(hps : HPS;lAttribute : LONG) : LONG;[SYSTEM];
  938. function GpiSetInitialSegmentAttrs(hps : HPS;lAttribute : LONG;lValue : LONG) : BOOL;[SYSTEM];
  939. function GpiQuerySegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG) : LONG;[SYSTEM];
  940. function GpiSetSegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG;lValue : LONG) : BOOL;[SYSTEM];
  941. function GpiQuerySegmentPriority(hps : HPS;lRefSegid : LONG;lOrder : LONG) : LONG;[SYSTEM];
  942. function GpiSetSegmentPriority(hps : HPS;lSegid : LONG;lRefSegid : LONG;lOrder : LONG) : BOOL;[SYSTEM];
  943. function GpiDeleteSegments(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;[SYSTEM];
  944. function GpiQuerySegmentNames(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG;lMax : LONG;alSegids : PLONG) : LONG;[SYSTEM];
  945. function GpiGetData(hps : HPS;lSegid : LONG;plOffset : PLONG;lFormat : LONG;lLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
  946. function GpiPutData(hps : HPS;lFormat : LONG;plCount : PLONG;pbData : PBYTE) : LONG;[SYSTEM];
  947. function GpiDrawChain(hps : HPS) : BOOL;[SYSTEM];
  948. function GpiDrawFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;[SYSTEM];
  949. function GpiDrawSegment(hps : HPS;lSegment : LONG) : BOOL;[SYSTEM];
  950. function GpiDrawDynamics(hps : HPS) : BOOL;[SYSTEM];
  951. function GpiRemoveDynamics(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG) : BOOL;[SYSTEM];
  952. function GpiBeginElement(hps : HPS;lType : LONG;pszDesc : PSZ) : BOOL;[SYSTEM];
  953. function GpiEndElement(hps : HPS) : BOOL;[SYSTEM];
  954. function GpiLabel(hps : HPS;lLabel : LONG) : BOOL;[SYSTEM];
  955. function GpiElement(hps : HPS;lType : LONG;pszDesc : PSZ;lLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
  956. function GpiQueryElement(hps : HPS;lOff : LONG;lMaxLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
  957. function GpiDeleteElement(hps : HPS) : BOOL;[SYSTEM];
  958. function GpiDeleteElementRange(hps : HPS;lFirstElement : LONG;lLastElement : LONG) : BOOL;[SYSTEM];
  959. function GpiDeleteElementsBetweenLabels(hps : HPS;lFirstLabel : LONG;lLastLabel : LONG) : BOOL;[SYSTEM];
  960. function GpiQueryEditMode(hps : HPS) : LONG;[SYSTEM];
  961. function GpiSetEditMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
  962. function GpiQueryElementPointer(hps : HPS) : LONG;[SYSTEM];
  963. function GpiSetElementPointer(hps : HPS;lElement : LONG) : BOOL;[SYSTEM];
  964. function GpiOffsetElementPointer(hps : HPS;loffset : LONG) : BOOL;[SYSTEM];
  965. function GpiQueryElementType(hps : HPS;plType : PLONG;lLength : LONG;pszData : PSZ) : LONG;[SYSTEM];
  966. function GpiSetElementPointerAtLabel(hps : HPS;lLabel : LONG) : BOOL;[SYSTEM];
  967. function GpiQuerySegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
  968. function GpiSetSegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
  969. function GpiConvert(hps : HPS;lSrc : LONG;lTarg : LONG;lCount : LONG;aptlPoints : PPOINTL) : BOOL;[SYSTEM];
  970. function GpiConvertWithMatrix(hps : HPS;lCountp : LONG;aptlPoints : PPOINTL;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
  971. function GpiQueryModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
  972. function GpiSetModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
  973. function GpiCallSegmentMatrix(hps : HPS;lSegment : LONG;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : LONG;[SYSTEM];
  974. function GpiQueryDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
  975. function GpiSetDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
  976. function GpiQueryPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;[SYSTEM];
  977. function GpiSetPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;[SYSTEM];
  978. function GpiQueryViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
  979. function GpiSetViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
  980. function GpiTranslate(hps : HPS;pmatrixlf : PMATRIXLF;long : LONG;ppointl : PPOINTL) : BOOL;[SYSTEM];
  981. function GpiScale(hps : HPS;p1 : PMATRIXLF;p2 : LONG;p3 : PFIXED;p4 : PPOINTL) : BOOL;[SYSTEM];
  982. function GpiRotate(p1 : HPS;p2 : PMATRIXLF;p3 : LONG;p4 : FIXED;p5 : PPOINTL) : BOOL;[SYSTEM];
  983. function GpiSetGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;[SYSTEM];
  984. function GpiQueryGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;[SYSTEM];
  985. function GpiSetViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
  986. function GpiQueryViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
  987. function GpiBeginPath(hps : HPS;lPath : LONG) : BOOL;[SYSTEM];
  988. function GpiEndPath(hps : HPS) : BOOL;[SYSTEM];
  989. function GpiCloseFigure(hps : HPS) : BOOL;[SYSTEM];
  990. function GpiModifyPath(hps : HPS;lPath : LONG;lMode : LONG) : BOOL;[SYSTEM];
  991. function GpiFillPath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;[SYSTEM];
  992. function GpiSetClipPath(hps : HPS;lPath : LONG;lOptions : LONG) : BOOL;[SYSTEM];
  993. function GpiOutlinePath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;[SYSTEM];
  994. function GpiPathToRegion(GpiH : HPS;lPath : LONG;lOptions : LONG) : HRGN;[SYSTEM];
  995. function GpiStrokePath(hps : HPS;lPath : LONG;flOptions : ULONG) : LONG;[SYSTEM];
  996. function GpiCreateLogColorTable(hps : HPS;flOptions : ULONG;lFormat : LONG;lStart : LONG;lCount : LONG;alTable : PLONG) : BOOL;[SYSTEM];
  997. function GpiQueryColorData(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;[SYSTEM];
  998. function GpiQueryLogColorTable(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alArray : PLONG) : LONG;[SYSTEM];
  999. function GpiQueryRealColors(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alColors : PLONG) : LONG;[SYSTEM];
  1000. function GpiQueryNearestColor(hps : HPS;flOptions : ULONG;lRgbIn : LONG) : LONG;[SYSTEM];
  1001. function GpiQueryColorIndex(hps : HPS;flOptions : ULONG;lRgbColor : LONG) : LONG;[SYSTEM];
  1002. function GpiQueryRGBColor(hps : HPS;flOptions : ULONG;lColorIndex : LONG) : LONG;[SYSTEM];
  1003. function GpiCreatePalette(hab : HAB;flOptions : ULONG;ulFormat : ULONG;ulCount : ULONG;aulTable : PULONG) : HPAL;[SYSTEM];
  1004. function GpiDeletePalette(hpal : HPAL) : BOOL;[SYSTEM];
  1005. function GpiSelectPalette(hps : HPS;hpal : HPAL) : HPAL;[SYSTEM];
  1006. function GpiAnimatePalette(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : LONG;[SYSTEM];
  1007. function GpiSetPaletteEntries(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : BOOL;[SYSTEM];
  1008. function GpiQueryPalette(hps : HPS) : HPAL;[SYSTEM];
  1009. function GpiQueryPaletteInfo(hpal : HPAL;hps : HPS;flOptions : ULONG;ulStart : ULONG;ulCount : ULONG;aulArray : PULONG) : LONG;[SYSTEM];
  1010. function GpiSetColor(hps : HPS;lColor : LONG) : BOOL;[SYSTEM];
  1011. function GpiQueryColor(hps : HPS) : LONG;[SYSTEM];
  1012. function GpiBox(hps : HPS;lControl : LONG;pptlPoint : PPOINTL;lHRound : LONG;lVRound : LONG) : LONG;[SYSTEM];
  1013. function GpiMove(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
  1014. function GpiLine(hps : HPS;pptlEndPoint : PPOINTL) : LONG;[SYSTEM];
  1015. function GpiPolyLine(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
  1016. function GpiPolyLineDisjoint(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
  1017. function GpiSetPattern(hps : HPS;lPatternSymbol : LONG) : BOOL;[SYSTEM];
  1018. function GpiQueryPattern(hps : HPS) : LONG;[SYSTEM];
  1019. function GpiBeginArea(hps : HPS;flOptions : ULONG) : BOOL;[SYSTEM];
  1020. function GpiEndArea(hps : HPS) : LONG;[SYSTEM];
  1021. function GpiCharString(hps : HPS;lCount : LONG;pchString : PCH) : LONG;[SYSTEM];
  1022. function GpiCharStringAt(hps : HPS;pptlPoint : PPOINTL;lCount : LONG;pchString : PCH) : LONG;[SYSTEM];
  1023. function GpiSetAttrMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
  1024. function GpiQueryAttrMode(hps : HPS) : LONG;[SYSTEM];
  1025. function GpiSetAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;flDefMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;[SYSTEM];
  1026. function GpiQueryAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : LONG;[SYSTEM];
  1027. function GpiSetBackColor(hps : HPS;lColor : LONG) : BOOL;[SYSTEM];
  1028. function GpiQueryBackColor(hps : HPS) : LONG;[SYSTEM];
  1029. function GpiSetMix(hps : HPS;lMixMode : LONG) : BOOL;[SYSTEM];
  1030. function GpiQueryMix(hps : HPS) : LONG;[SYSTEM];
  1031. function GpiSetBackMix(hps : HPS;lMixMode : LONG) : BOOL;[SYSTEM];
  1032. function GpiQueryBackMix(hps : HPS) : LONG;[SYSTEM];
  1033. function GpiSetLineType(hps : HPS;lLineType : LONG) : BOOL;[SYSTEM];
  1034. function GpiQueryLineType(hps : HPS) : LONG;[SYSTEM];
  1035. function GpiSetLineWidth(hps : HPS;fxLineWidth : FIXED) : BOOL;[SYSTEM];
  1036. function GpiQueryLineWidth(hps : HPS) : FIXED;[SYSTEM];
  1037. function GpiSetLineWidthGeom(hps : HPS;lLineWidth : LONG) : BOOL;[SYSTEM];
  1038. function GpiQueryLineWidthGeom(hps : HPS) : LONG;[SYSTEM];
  1039. function GpiSetLineEnd(hps : HPS;lLineEnd : LONG) : BOOL;[SYSTEM];
  1040. function GpiQueryLineEnd(hps : HPS) : LONG;[SYSTEM];
  1041. function GpiSetLineJoin(hps : HPS;lLineJoin : LONG) : BOOL;[SYSTEM];
  1042. function GpiQueryLineJoin(hps : HPS) : LONG;[SYSTEM];
  1043. function GpiSetCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
  1044. function GpiQueryCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
  1045. function GpiSetArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
  1046. function GpiQueryArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
  1047. function GpiPointArc(hps : HPS;pptl2 : PPOINTL) : LONG;[SYSTEM];
  1048. function GpiFullArc(hps : HPS;lControl : LONG;fxMultiplier : FIXED) : LONG;[SYSTEM];
  1049. function GpiPartialArc(hps : HPS;pptlCenter : PPOINTL;fxMultiplier : FIXED;fxStartAngle : FIXED;fxSweepAngle : FIXED) : LONG;[SYSTEM];
  1050. function GpiPolyFillet(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
  1051. function GpiPolySpline(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
  1052. function GpiPolyFilletSharp(hps : HPS;lCount : LONG;aptlPoints : PPOINTL;afxPoints : PFIXED) : LONG;[SYSTEM];
  1053. function GpiSetPatternSet(hps : HPS;lSet : LONG) : BOOL;[SYSTEM];
  1054. function GpiQueryPatternSet(hps : HPS) : LONG;[SYSTEM];
  1055. function GpiSetPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;[SYSTEM];
  1056. function GpiQueryPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;[SYSTEM];
  1057. function GpiQueryCharStringPos(hps : HPS;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;[SYSTEM];
  1058. function GpiQueryCharStringPosAt(hps : HPS;pptlStart : PPOINTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;[SYSTEM];
  1059. function GpiQueryTextBox(hps : HPS;lCount1 : LONG;pchString : PCH;lCount2 : LONG;aptlPoints : PPOINTL) : BOOL;[SYSTEM];
  1060. function GpiQueryDefCharBox(hps : HPS;psizlSize : PSIZEL) : BOOL;[SYSTEM];
  1061. function GpiSetCharSet(hps : HPS;llcid : LONG) : BOOL;[SYSTEM];
  1062. function GpiQueryCharSet(hps : HPS) : LONG;[SYSTEM];
  1063. function GpiSetCharBox(hps : HPS;psizfxBox : PSIZEF) : BOOL;[SYSTEM];
  1064. function GpiQueryCharBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;[SYSTEM];
  1065. function GpiSetCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;[SYSTEM];
  1066. function GpiQueryCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;[SYSTEM];
  1067. function GpiSetCharShear(hps : HPS;pptlAngle : PPOINTL) : BOOL;[SYSTEM];
  1068. function GpiQueryCharShear(hps : HPS;pptlShear : PPOINTL) : BOOL;[SYSTEM];
  1069. function GpiSetCharDirection(hps : HPS;lDirection : LONG) : BOOL;[SYSTEM];
  1070. function GpiQueryCharDirection(hps : HPS) : LONG;[SYSTEM];
  1071. function GpiSetCharMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
  1072. function GpiQueryCharMode(hps : HPS) : LONG;[SYSTEM];
  1073. function GpiSetTextAlignment(hps : HPS;lHoriz : LONG;lVert : LONG) : BOOL;[SYSTEM];
  1074. function GpiQueryTextAlignment(hps : HPS;plHoriz : PLONG;plVert : PLONG) : BOOL;[SYSTEM];
  1075. function GpiCharStringPos(hps : HPS;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;[SYSTEM];
  1076. function GpiCharStringPosAt(hps : HPS;pptlStart : PPOINTL;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;[SYSTEM];
  1077. function GpiSetCharExtra(hps : HPS;Extra : FIXED) : BOOL;[SYSTEM];
  1078. function GpiSetCharBreakExtra(hps : HPS;BreakExtra : FIXED) : BOOL;[SYSTEM];
  1079. function GpiQueryCharExtra(hps : HPS;Extra : PFIXED) : BOOL;[SYSTEM];
  1080. function GpiQueryCharBreakExtra(hps : HPS;BreakExtra : PFIXED) : BOOL;[SYSTEM];
  1081. function GpiMarker(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
  1082. function GpiPolyMarker(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
  1083. function GpiSetMarker(hps : HPS;lSymbol : LONG) : BOOL;[SYSTEM];
  1084. function GpiSetMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;[SYSTEM];
  1085. function GpiSetMarkerSet(hps : HPS;lSet : LONG) : BOOL;[SYSTEM];
  1086. function GpiQueryMarker(hps : HPS) : LONG;[SYSTEM];
  1087. function GpiQueryMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;[SYSTEM];
  1088. function GpiQueryMarkerSet(hps : HPS) : LONG;[SYSTEM];
  1089. function GpiImage(hps : HPS;lFormat : LONG;psizlImageSize : PSIZEL;lLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
  1090. function GpiPop(hps : HPS;lCount : LONG) : BOOL;[SYSTEM];
  1091. function GpiPtVisible(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
  1092. function GpiRectVisible(hps : HPS;prclRectangle : PRECTL) : LONG;[SYSTEM];
  1093. function GpiComment(hps : HPS;lLength : LONG;pbData : PBYTE) : BOOL;[SYSTEM];
  1094. function GpiCreateLogFont(hps : HPS;pName : PSTR8;lLcid : LONG;pfatAttrs : PFATTRS) : LONG;[SYSTEM];
  1095. function GpiDeleteSetId(hps : HPS;lLcid : LONG) : BOOL;[SYSTEM];
  1096. function GpiLoadFonts(hab : HAB;pszFilename : PSZ) : BOOL;[SYSTEM];
  1097. function GpiUnloadFonts(hab : HAB;pszFilename : PSZ) : BOOL;[SYSTEM];
  1098. function GpiQueryFonts(hps : HPS;flOptions : ULONG;pszFacename : PSZ;plReqFonts : PLONG;lMetricsLength : LONG;afmMetrics : PFONTMETRICS) : LONG;[SYSTEM];
  1099. function GpiQueryFontMetrics(hps : HPS;lMetricsLength : LONG;pfmMetrics : PFONTMETRICS) : BOOL;[SYSTEM];
  1100. function GpiQueryKerningPairs(hps : HPS;lCount : LONG;akrnprData : PKERNINGPAIRS) : LONG;[SYSTEM];
  1101. function GpiQueryWidthTable(hps : HPS;lFirstChar : LONG;lCount : LONG;alData : PLONG) : BOOL;[SYSTEM];
  1102. function GpiQueryNumberSetIds(hps : HPS) : LONG;[SYSTEM];
  1103. function GpiQuerySetIds(hps : HPS;lCount : LONG;alTypes : PLONG;aNames : PSTR8;allcids : PLONG) : BOOL;[SYSTEM];
  1104. function GpiQueryFaceString(PS : HPS;FamilyName : PSZ;attrs : PFACENAMEDESC;length : LONG;CompoundFaceName : PSZ) : ULONG;[SYSTEM];
  1105. function GpiQueryLogicalFont(PS : HPS;lcid : LONG;name : PSTR8;attrs : PFATTRS;length : LONG) : BOOL;[SYSTEM];
  1106. function GpiQueryFontAction(anchor : HAB;options : ULONG) : ULONG;[SYSTEM];
  1107. function GpiLoadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;[SYSTEM];
  1108. function GpiUnloadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;[SYSTEM];
  1109. function GpiSetCp(hps : HPS;ulCodePage : ULONG) : BOOL;[SYSTEM];
  1110. function GpiQueryCp(hps : HPS) : ULONG;[SYSTEM];
  1111. function GpiQueryFontFileDescriptions(hab : HAB;pszFilename : PSZ;plCount : PLONG;affdescsNames : PFFDESCS) : LONG;[SYSTEM];
  1112. function GpiQueryFullFontFileDescs(hab : HAB;pszFilename : PSZ;plCount : PLONG;pNames : PVOID;plNamesBuffLength : PLONG) : LONG;[SYSTEM];
  1113. function GpiBitBlt(hpsTarget : HPS;hpsSource : HPS;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;[SYSTEM];
  1114. function GpiDeleteBitmap(hbm : HBITMAP) : BOOL;[SYSTEM];
  1115. function GpiLoadBitmap(hps : HPS;Resource : HMODULE;idBitmap : ULONG;lWidth : LONG;lHeight : LONG) : HBITMAP;[SYSTEM];
  1116. function GpiSetBitmap(hps : HPS;hbm : HBITMAP) : HBITMAP;[SYSTEM];
  1117. function GpiWCBitBlt(hpsTarget : HPS;hbmSource : HBITMAP;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;[SYSTEM];
  1118. function GpiCreateBitmap(hps : HPS;pbmpNew : PBITMAPINFOHEADER2;flOptions : ULONG;pbInitData : PBYTE;pbmiInfoTable : PBITMAPINFO2) : HBITMAP;[SYSTEM];
  1119. function GpiSetBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;[SYSTEM];
  1120. function GpiSetBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;[SYSTEM];
  1121. function GpiSetBitmapId(hps : HPS;hbm : HBITMAP;lLcid : LONG) : BOOL;[SYSTEM];
  1122. function GpiQueryBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;[SYSTEM];
  1123. function GpiQueryBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;[SYSTEM];
  1124. function GpiQueryBitmapHandle(hps : HPS;lLcid : LONG) : HBITMAP;[SYSTEM];
  1125. function GpiQueryBitmapParameters(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER) : BOOL;[SYSTEM];
  1126. function GpiQueryBitmapInfoHeader(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER2) : BOOL;[SYSTEM];
  1127. function GpiQueryDeviceBitmapFormats(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;[SYSTEM];
  1128. function GpiSetPel(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
  1129. function GpiQueryPel(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
  1130. function GpiFloodFill(hps : HPS;lOptions : LONG;lColor : LONG) : LONG;[SYSTEM];
  1131. function GpiDrawBits(hps : HPS;pBits : PVOID;pbmiInfoTable : PBITMAPINFO2;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;[SYSTEM];
  1132. function GpiCombineRegion(hps : HPS;hrgnDest : HRGN;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN;lMode : LONG) : LONG;[SYSTEM];
  1133. function GpiCreateRegion(hps : HPS;lCount : LONG;arclRectangles : PRECTL) : HRGN;[SYSTEM];
  1134. function GpiDestroyRegion(hps : HPS;hrgn : HRGN) : BOOL;[SYSTEM];
  1135. function GpiEqualRegion(hps : HPS;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN) : LONG;[SYSTEM];
  1136. function GpiOffsetRegion(hps : HPS;Hrgn : HRGN;pptlOffset : PPOINTL) : BOOL;[SYSTEM];
  1137. function GpiPaintRegion(hps : HPS;hrgn : HRGN) : LONG;[SYSTEM];
  1138. function GpiFrameRegion(hps : HPS;hrgn : HRGN;thickness : PSIZEL) : LONG;[SYSTEM];
  1139. function GpiPtInRegion(hps : HPS;hrgn : HRGN;pptlPoint : PPOINTL) : LONG;[SYSTEM];
  1140. function GpiQueryRegionBox(hps : HPS;hrgn : HRGN;prclBound : PRECTL) : LONG;[SYSTEM];
  1141. function GpiQueryRegionRects(hps : HPS;hrgn : HRGN;prclBound : PRECTL;prgnrcControl : PRGNRECT;prclRect : PRECTL) : BOOL;[SYSTEM];
  1142. function GpiRectInRegion(hps : HPS;hrgn : HRGN;prclRect : PRECTL) : LONG;[SYSTEM];
  1143. function GpiSetRegion(hps : HPS;hrgn : HRGN;lcount : LONG;arclRectangles : PRECTL) : BOOL;[SYSTEM];
  1144. function GpiSetClipRegion(hps : HPS;hrgn : HRGN;phrgnOld : PHRGN) : LONG;[SYSTEM];
  1145. function GpiQueryClipRegion(hps : HPS) : HRGN;[SYSTEM];
  1146. function GpiQueryClipBox(hps : HPS;prclBound : PRECTL) : LONG;[SYSTEM];
  1147. function GpiExcludeClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;[SYSTEM];
  1148. function GpiIntersectClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;[SYSTEM];
  1149. function GpiOffsetClipRegion(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
  1150. function GpiCopyMetaFile(hmf : HMF) : HMF;[SYSTEM];
  1151. function GpiDeleteMetaFile(hmf : HMF) : BOOL;[SYSTEM];
  1152. function GpiLoadMetaFile(hab : HAB;pszFilename : PSZ) : HMF;[SYSTEM];
  1153. function GpiPlayMetaFile(hps : HPS;hmf : HMF;lCount1 : LONG;alOptarray : PLONG;plSegCount : PLONG;lCount2 : LONG;pszDesc : PSZ) : LONG;[SYSTEM];
  1154. function GpiQueryMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbData : PBYTE) : BOOL;[SYSTEM];
  1155. function GpiQueryMetaFileLength(hmf : HMF) : LONG;[SYSTEM];
  1156. function GpiSaveMetaFile(hmf : HMF;pszFilename : PSZ) : BOOL;[SYSTEM];
  1157. function GpiSetMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbBuffer : PBYTE) : BOOL;[SYSTEM];
  1158. function GpiQueryDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
  1159. function GpiQueryDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;[SYSTEM];
  1160. function GpiQueryDefTag(hps : HPS;plTag : PLONG) : BOOL;[SYSTEM];
  1161. function GpiQueryDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
  1162. function GpiSetDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
  1163. function GpiSetDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;[SYSTEM];
  1164. function GpiSetDefTag(hps : HPS;lTag : LONG) : BOOL;[SYSTEM];
  1165. function GpiSetDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
  1166. function GpiPolygons(hps : HPS;ulCount : ULONG;paplgn : PPOLYGON;flOptions : ULONG;flModel : ULONG) : LONG;[SYSTEM];
  1167. end.