QuickdrawTypes.pas 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654
  1. {
  2. File: QD/QuickdrawTypes.h
  3. Contains: Type definitions from the former Quickdraw.i
  4. Version: Quickdraw-262~1
  5. Copyright: © 2005-2008 by Apple Inc. all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://bugs.freepascal.org
  9. }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$modeswitch cblocks}
  19. {$packenum 1}
  20. {$macro on}
  21. {$inline on}
  22. {$calling mwpascal}
  23. unit QuickdrawTypes;
  24. interface
  25. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  26. {$setc GAP_INTERFACES_VERSION := $0308}
  27. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  28. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  29. {$endc}
  30. {$ifc defined CPUPOWERPC and defined CPUI386}
  31. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  32. {$endc}
  33. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  34. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  35. {$endc}
  36. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  37. {$setc __ppc__ := 1}
  38. {$elsec}
  39. {$setc __ppc__ := 0}
  40. {$endc}
  41. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  42. {$setc __ppc64__ := 1}
  43. {$elsec}
  44. {$setc __ppc64__ := 0}
  45. {$endc}
  46. {$ifc not defined __i386__ and defined CPUI386}
  47. {$setc __i386__ := 1}
  48. {$elsec}
  49. {$setc __i386__ := 0}
  50. {$endc}
  51. {$ifc not defined __x86_64__ and defined CPUX86_64}
  52. {$setc __x86_64__ := 1}
  53. {$elsec}
  54. {$setc __x86_64__ := 0}
  55. {$endc}
  56. {$ifc not defined __arm__ and defined CPUARM}
  57. {$setc __arm__ := 1}
  58. {$elsec}
  59. {$setc __arm__ := 0}
  60. {$endc}
  61. {$ifc not defined __arm64__ and defined CPUAARCH64}
  62. {$setc __arm64__ := 1}
  63. {$elsec}
  64. {$setc __arm64__ := 0}
  65. {$endc}
  66. {$ifc defined cpu64}
  67. {$setc __LP64__ := 1}
  68. {$elsec}
  69. {$setc __LP64__ := 0}
  70. {$endc}
  71. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  72. {$error Conflicting definitions for __ppc__ and __i386__}
  73. {$endc}
  74. {$ifc defined __ppc__ and __ppc__}
  75. {$setc TARGET_CPU_PPC := TRUE}
  76. {$setc TARGET_CPU_PPC64 := FALSE}
  77. {$setc TARGET_CPU_X86 := FALSE}
  78. {$setc TARGET_CPU_X86_64 := FALSE}
  79. {$setc TARGET_CPU_ARM := FALSE}
  80. {$setc TARGET_CPU_ARM64 := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_IPHONE := FALSE}
  83. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  84. {$setc TARGET_OS_EMBEDDED := FALSE}
  85. {$elifc defined __ppc64__ and __ppc64__}
  86. {$setc TARGET_CPU_PPC := FALSE}
  87. {$setc TARGET_CPU_PPC64 := TRUE}
  88. {$setc TARGET_CPU_X86 := FALSE}
  89. {$setc TARGET_CPU_X86_64 := FALSE}
  90. {$setc TARGET_CPU_ARM := FALSE}
  91. {$setc TARGET_CPU_ARM64 := FALSE}
  92. {$setc TARGET_OS_MAC := TRUE}
  93. {$setc TARGET_OS_IPHONE := FALSE}
  94. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  95. {$setc TARGET_OS_EMBEDDED := FALSE}
  96. {$elifc defined __i386__ and __i386__}
  97. {$setc TARGET_CPU_PPC := FALSE}
  98. {$setc TARGET_CPU_PPC64 := FALSE}
  99. {$setc TARGET_CPU_X86 := TRUE}
  100. {$setc TARGET_CPU_X86_64 := FALSE}
  101. {$setc TARGET_CPU_ARM := FALSE}
  102. {$setc TARGET_CPU_ARM64 := FALSE}
  103. {$ifc defined iphonesim}
  104. {$setc TARGET_OS_MAC := FALSE}
  105. {$setc TARGET_OS_IPHONE := TRUE}
  106. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  107. {$elsec}
  108. {$setc TARGET_OS_MAC := TRUE}
  109. {$setc TARGET_OS_IPHONE := FALSE}
  110. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  111. {$endc}
  112. {$setc TARGET_OS_EMBEDDED := FALSE}
  113. {$elifc defined __x86_64__ and __x86_64__}
  114. {$setc TARGET_CPU_PPC := FALSE}
  115. {$setc TARGET_CPU_PPC64 := FALSE}
  116. {$setc TARGET_CPU_X86 := FALSE}
  117. {$setc TARGET_CPU_X86_64 := TRUE}
  118. {$setc TARGET_CPU_ARM := FALSE}
  119. {$setc TARGET_CPU_ARM64 := FALSE}
  120. {$ifc defined iphonesim}
  121. {$setc TARGET_OS_MAC := FALSE}
  122. {$setc TARGET_OS_IPHONE := TRUE}
  123. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  124. {$elsec}
  125. {$setc TARGET_OS_MAC := TRUE}
  126. {$setc TARGET_OS_IPHONE := FALSE}
  127. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  128. {$endc}
  129. {$setc TARGET_OS_EMBEDDED := FALSE}
  130. {$elifc defined __arm__ and __arm__}
  131. {$setc TARGET_CPU_PPC := FALSE}
  132. {$setc TARGET_CPU_PPC64 := FALSE}
  133. {$setc TARGET_CPU_X86 := FALSE}
  134. {$setc TARGET_CPU_X86_64 := FALSE}
  135. {$setc TARGET_CPU_ARM := TRUE}
  136. {$setc TARGET_CPU_ARM64 := FALSE}
  137. {$setc TARGET_OS_MAC := FALSE}
  138. {$setc TARGET_OS_IPHONE := TRUE}
  139. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  140. {$setc TARGET_OS_EMBEDDED := TRUE}
  141. {$elifc defined __arm64__ and __arm64__}
  142. {$setc TARGET_CPU_PPC := FALSE}
  143. {$setc TARGET_CPU_PPC64 := FALSE}
  144. {$setc TARGET_CPU_X86 := FALSE}
  145. {$setc TARGET_CPU_X86_64 := FALSE}
  146. {$setc TARGET_CPU_ARM := FALSE}
  147. {$setc TARGET_CPU_ARM64 := TRUE}
  148. {$ifc defined ios}
  149. {$setc TARGET_OS_MAC := FALSE}
  150. {$setc TARGET_OS_IPHONE := TRUE}
  151. {$setc TARGET_OS_EMBEDDED := TRUE}
  152. {$elsec}
  153. {$setc TARGET_OS_MAC := TRUE}
  154. {$setc TARGET_OS_IPHONE := FALSE}
  155. {$setc TARGET_OS_EMBEDDED := FALSE}
  156. {$endc}
  157. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  158. {$elsec}
  159. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  160. {$endc}
  161. {$ifc defined __LP64__ and __LP64__ }
  162. {$setc TARGET_CPU_64 := TRUE}
  163. {$elsec}
  164. {$setc TARGET_CPU_64 := FALSE}
  165. {$endc}
  166. {$ifc defined FPC_BIG_ENDIAN}
  167. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  168. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  169. {$elifc defined FPC_LITTLE_ENDIAN}
  170. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  171. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  172. {$elsec}
  173. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  174. {$endc}
  175. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  176. {$setc CALL_NOT_IN_CARBON := FALSE}
  177. {$setc OLDROUTINENAMES := FALSE}
  178. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  179. {$setc OPAQUE_UPP_TYPES := TRUE}
  180. {$setc OTCARBONAPPLICATION := TRUE}
  181. {$setc OTKERNEL := FALSE}
  182. {$setc PM_USE_SESSION_APIS := TRUE}
  183. {$setc TARGET_API_MAC_CARBON := TRUE}
  184. {$setc TARGET_API_MAC_OS8 := FALSE}
  185. {$setc TARGET_API_MAC_OSX := TRUE}
  186. {$setc TARGET_CARBON := TRUE}
  187. {$setc TARGET_CPU_68K := FALSE}
  188. {$setc TARGET_CPU_MIPS := FALSE}
  189. {$setc TARGET_CPU_SPARC := FALSE}
  190. {$setc TARGET_OS_UNIX := FALSE}
  191. {$setc TARGET_OS_WIN32 := FALSE}
  192. {$setc TARGET_RT_MAC_68881 := FALSE}
  193. {$setc TARGET_RT_MAC_CFM := FALSE}
  194. {$setc TARGET_RT_MAC_MACHO := TRUE}
  195. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  196. {$setc TYPE_BOOL := FALSE}
  197. {$setc TYPE_EXTENDED := FALSE}
  198. {$setc TYPE_LONGLONG := TRUE}
  199. uses MacTypes,QuickdrawText;
  200. {$endc} {not MACOSALLINCLUDE}
  201. {$ifc TARGET_OS_MAC}
  202. {$ALIGN MAC68K}
  203. const
  204. invalColReq = -1; {invalid color table request}
  205. const
  206. { transfer modes }
  207. srcCopy = 0; {the 16 transfer modes}
  208. srcOr = 1;
  209. srcXor = 2;
  210. srcBic = 3;
  211. notSrcCopy = 4;
  212. notSrcOr = 5;
  213. notSrcXor = 6;
  214. notSrcBic = 7;
  215. patCopy = 8;
  216. patOr = 9;
  217. patXor = 10;
  218. patBic = 11;
  219. notPatCopy = 12;
  220. notPatOr = 13;
  221. notPatXor = 14;
  222. notPatBic = 15; { Special Text Transfer Mode }
  223. grayishTextOr = 49;
  224. hilitetransfermode = 50;
  225. hilite = 50; { Arithmetic transfer modes }
  226. blend = 32;
  227. addPin = 33;
  228. addOver = 34;
  229. subPin = 35;
  230. addMax = 37;
  231. adMax = 37;
  232. subOver = 38;
  233. adMin = 39;
  234. ditherCopy = 64; { Transparent mode constant }
  235. transparent = 36;
  236. const
  237. italicBit = 1;
  238. ulineBit = 2;
  239. outlineBit = 3;
  240. shadowBit = 4;
  241. condenseBit = 5;
  242. extendBit = 6;
  243. const
  244. { QuickDraw color separation constants }
  245. normalBit = 0; {normal screen mapping}
  246. inverseBit = 1; {inverse screen mapping}
  247. redBit = 4; {RGB additive mapping}
  248. greenBit = 3;
  249. blueBit = 2;
  250. cyanBit = 8; {CMYBk subtractive mapping}
  251. magentaBit = 7;
  252. yellowBit = 6;
  253. blackBit = 5;
  254. const
  255. blackColor = 33; { colors expressed in these mappings }
  256. whiteColor = 30;
  257. redColor = 205;
  258. greenColor = 341;
  259. blueColor = 409;
  260. cyanColor = 273;
  261. magentaColor = 137;
  262. yellowColor = 69;
  263. const
  264. picLParen = 0; { standard picture comments }
  265. picRParen = 1;
  266. { gdType values }
  267. const
  268. clutType = 0; { lookup table }
  269. fixedType = 1; { fixed table - now unused }
  270. directType = 2; { direct values }
  271. { gdFlags bits. Bits 1..10 are legacy, and currently unused }
  272. const
  273. gdDevType = 0; { 0 = monochrome 1 = color }
  274. interlacedDevice = 2;
  275. hwMirroredDevice = 4;
  276. roundedDevice = 5;
  277. hasAuxMenuBar = 6;
  278. burstDevice = 7;
  279. ext32Device = 8;
  280. ramInit = 10;
  281. mainScreen = 11; { 1 if main screen }
  282. allInit = 12; { 1 if all devices initialized }
  283. screenDevice = 13; { 1 if screen device }
  284. noDriver = 14; { 1 if no driver for this GDevice }
  285. screenActive = 15; { 1 if in use}
  286. const
  287. hiliteBit = 7; { flag bit in LMGet/SetHiliteMode }
  288. pHiliteBit = 0; { flag bit in LMGet/SetHiliteMode when used with BitClr }
  289. { miscellaneous constants }
  290. const
  291. defQDColors = 127; { (legacy - now unused) }
  292. RGBDirect = 16; { 16 & 32 bits/pixel pixelType value }
  293. baseAddr32 = 4; { pmVersion value: pixmap base address is 32-bit address }
  294. const
  295. sysPatListID = 0;
  296. iBeamCursor = 1;
  297. crossCursor = 2;
  298. plusCursor = 3;
  299. watchCursor = 4;
  300. const
  301. kQDGrafVerbFrame = 0;
  302. kQDGrafVerbPaint = 1;
  303. kQDGrafVerbErase = 2;
  304. kQDGrafVerbInvert = 3;
  305. kQDGrafVerbFill = 4;
  306. {$ifc OLDROUTINENAMES}
  307. const
  308. frame = kQDGrafVerbFrame;
  309. paint = kQDGrafVerbPaint;
  310. erase = kQDGrafVerbErase;
  311. invert = kQDGrafVerbInvert;
  312. fill = kQDGrafVerbFill;
  313. {$endc} {OLDROUTINENAMES}
  314. type
  315. GrafVerb = SInt8;
  316. const
  317. chunky = 0;
  318. chunkyPlanar = 1;
  319. planar = 2;
  320. type
  321. PixelType = SInt8;
  322. Bits16 = array [0..15] of SInt16;
  323. {************** IMPORTANT NOTE REGARDING Pattern **************************************
  324. Patterns were originally defined as:
  325. C: typedef unsigned AnsiChar Pattern[8];
  326. Pascal: Pattern = PACKED ARRAY [0..7] OF 0..255;
  327. The old array definition of Pattern would cause 68000 based CPU's to crash in certain circum-
  328. stances. The new struct definition is safe, but may require source code changes to compile.
  329. ********************************************************************************************}
  330. type
  331. PatternPtr = ^Pattern;
  332. Pattern = record
  333. pat: packed array [0..7] of UInt8;
  334. end;
  335. {
  336. ConstPatternParam is no longer needed. It was first created when Pattern was an array.
  337. Now that Pattern is a struct, it is more straight forward to just add the "const" qualifier
  338. on the parameter type (e.g. "const Pattern * pat" instead of "ConstPatternParam pat").
  339. ConstPatternParam = PatternPtr;
  340. }
  341. type
  342. PatPtr = PatternPtr;
  343. PatHandle = ^PatPtr;
  344. QDByte = SignedByte;
  345. QDPtr = ^QDByte;
  346. QDHandle = ^QDPtr;
  347. QDErr = SInt16;
  348. const
  349. singleDevicesBit = 0;
  350. dontMatchSeedsBit = 1;
  351. allDevicesBit = 2;
  352. const
  353. singleDevices = 1 shl singleDevicesBit;
  354. dontMatchSeeds = 1 shl dontMatchSeedsBit;
  355. allDevices = 1 shl allDevicesBit;
  356. type
  357. DeviceLoopFlags = UNSIGNEDLONG;
  358. {
  359. PrinterStatusOpcode. For communication with downloading and printing services.
  360. }
  361. type
  362. PrinterStatusOpcode = SInt32;
  363. const
  364. kPrinterFontStatus = 0;
  365. kPrinterScalingStatus = 1;
  366. type
  367. PrinterFontStatusPtr = ^PrinterFontStatus;
  368. PrinterFontStatus = record
  369. oResult: SInt32;
  370. iFondID: SInt16;
  371. iStyle: Style;
  372. end;
  373. type
  374. PrinterScalingStatusPtr = ^PrinterScalingStatus;
  375. PrinterScalingStatus = record
  376. oScalingFactors: Point;
  377. end;
  378. type
  379. BitMap = record
  380. baseAddr: Ptr;
  381. rowBytes: SInt16;
  382. bounds: Rect;
  383. end;
  384. BitMapPtr = ^BitMap;
  385. type
  386. BitMapHandle = ^BitMapPtr;
  387. CursorPtr = ^Cursor;
  388. Cursor = record
  389. data: Bits16;
  390. mask: Bits16;
  391. hotSpot: Point;
  392. end;
  393. type
  394. CursPtr = CursorPtr;
  395. CursHandle = ^CursPtr;
  396. PenStatePtr = ^PenState;
  397. PenState = record
  398. pnLoc: Point;
  399. pnSize: Point;
  400. pnMode: SInt16;
  401. pnPat: Pattern;
  402. end;
  403. {$ifc not OPAQUE_TOOLBOX_STRUCTS}
  404. type
  405. MacRegionPtr = ^MacRegion;
  406. MacRegion = record
  407. rgnSize: UInt16; { size in bytes; don't rely on it }
  408. rgnBBox: Rect; { enclosing rectangle; in Carbon use GetRegionBounds }
  409. end;
  410. {
  411. The type name "Region" has a name space collision on Win32.
  412. Use MacRegion to be cross-platfrom safe.
  413. }
  414. type
  415. Region = MacRegion;
  416. RgnPtr = MacRegionPtr;
  417. RgnHandle = ^RgnPtrP;
  418. RgnHandlePtr = ^RgnHandle; { when a var xx:RgnHandle parameter can be nil, it is changed to xx: RgnHandlePtr }
  419. {$elsec}
  420. type
  421. RgnHandle = ^SInt32; { an opaque type }
  422. {$endc} {not OPAQUE_TOOLBOX_STRUCTS}
  423. type
  424. PicturePtr = ^Picture;
  425. Picture = record
  426. picSize: SInt16;
  427. picFrame: Rect;
  428. end;
  429. type
  430. PicPtr = PicturePtr;
  431. PicHandle = ^PicPtr;
  432. MacPolygon = record
  433. polySize: SInt16;
  434. polyBBox: Rect;
  435. polyPoints: array [0..0] of Point;
  436. end;
  437. {
  438. The type name "Polygon" has a name space collision on Win32.
  439. Use MacPolygon to be cross-platfrom safe.
  440. }
  441. type
  442. Polygon = MacPolygon;
  443. PolyPtr = ^MacPolygon;
  444. PolyHandle = ^PolyPtr;
  445. QDTextProcPtr = procedure( byteCount: SInt16; textBuf: {const} UnivPtr; numer: Point; denom: Point );
  446. QDLineProcPtr = procedure( newPt: Point );
  447. QDRectProcPtr = procedure( verb: GrafVerb; const (*var*) r: Rect );
  448. QDRRectProcPtr = procedure( verb: GrafVerb; const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16 );
  449. QDOvalProcPtr = procedure( verb: GrafVerb; const (*var*) r: Rect );
  450. QDArcProcPtr = procedure( verb: GrafVerb; const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16 );
  451. QDPolyProcPtr = procedure( verb: GrafVerb; poly: PolyHandle );
  452. QDRgnProcPtr = procedure( verb: GrafVerb; rgn: RgnHandle );
  453. QDBitsProcPtr = procedure( const (*var*) srcBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; maskRgn: RgnHandle );
  454. QDCommentProcPtr = procedure( kind: SInt16; dataSize: SInt16; dataHandle: Handle );
  455. QDTxMeasProcPtr = function( byteCount: SInt16; textAddr: {const} UnivPtr; var numer: Point; var denom: Point; var info: FontInfo ): SInt16;
  456. QDGetPicProcPtr = procedure( dataPtr: UnivPtr; byteCount: SInt16 );
  457. QDPutPicProcPtr = procedure( dataPtr: {const} UnivPtr; byteCount: SInt16 );
  458. QDOpcodeProcPtr = procedure( const (*var*) fromRect: Rect; const (*var*) toRect: Rect; opcode: UInt16; version: SInt16 );
  459. { The following is unused on Mac OS X - ignore it! }
  460. type
  461. QDStdGlyphsProcPtr = function( dataStream: UnivPtr; size: ByteCount ): OSStatus;
  462. QDJShieldCursorProcPtr = procedure( left: SInt16; top: SInt16; right: SInt16; bottom: SInt16 );
  463. QDTextUPP = QDTextProcPtr;
  464. QDLineUPP = QDLineProcPtr;
  465. QDRectUPP = QDRectProcPtr;
  466. QDRRectUPP = QDRRectProcPtr;
  467. QDOvalUPP = QDOvalProcPtr;
  468. QDArcUPP = QDArcProcPtr;
  469. QDPolyUPP = QDPolyProcPtr;
  470. QDRgnUPP = QDRgnProcPtr;
  471. QDBitsUPP = QDBitsProcPtr;
  472. QDCommentUPP = QDCommentProcPtr;
  473. QDTxMeasUPP = QDTxMeasProcPtr;
  474. QDGetPicUPP = QDGetPicProcPtr;
  475. QDPutPicUPP = QDPutPicProcPtr;
  476. QDOpcodeUPP = QDOpcodeProcPtr;
  477. QDStdGlyphsUPP = QDStdGlyphsProcPtr;
  478. QDJShieldCursorUPP = QDJShieldCursorProcPtr;
  479. QDProcs = record
  480. textProc: QDTextUPP;
  481. lineProc: QDLineUPP;
  482. rectProc: QDRectUPP;
  483. rRectProc: QDRRectUPP;
  484. ovalProc: QDOvalUPP;
  485. arcProc: QDArcUPP;
  486. polyProc: QDPolyUPP;
  487. rgnProc: QDRgnUPP;
  488. bitsProc: QDBitsUPP;
  489. commentProc: QDCommentUPP;
  490. txMeasProc: QDTxMeasUPP;
  491. getPicProc: QDGetPicUPP;
  492. putPicProc: QDPutPicUPP;
  493. end;
  494. QDProcsPtr = ^QDProcs;
  495. {
  496. * NewQDTextUPP()
  497. *
  498. * Availability:
  499. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  500. * CarbonLib: in CarbonLib 1.0 and later
  501. * Non-Carbon CFM: available as macro/inline
  502. }
  503. function NewQDTextUPP( userRoutine: QDTextProcPtr ): QDTextUPP; external name '_NewQDTextUPP';
  504. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  505. {
  506. * NewQDLineUPP()
  507. *
  508. * Availability:
  509. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  510. * CarbonLib: in CarbonLib 1.0 and later
  511. * Non-Carbon CFM: available as macro/inline
  512. }
  513. function NewQDLineUPP( userRoutine: QDLineProcPtr ): QDLineUPP; external name '_NewQDLineUPP';
  514. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  515. {
  516. * NewQDRectUPP()
  517. *
  518. * Availability:
  519. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  520. * CarbonLib: in CarbonLib 1.0 and later
  521. * Non-Carbon CFM: available as macro/inline
  522. }
  523. function NewQDRectUPP( userRoutine: QDRectProcPtr ): QDRectUPP; external name '_NewQDRectUPP';
  524. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  525. {
  526. * NewQDRRectUPP()
  527. *
  528. * Availability:
  529. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  530. * CarbonLib: in CarbonLib 1.0 and later
  531. * Non-Carbon CFM: available as macro/inline
  532. }
  533. function NewQDRRectUPP( userRoutine: QDRRectProcPtr ): QDRRectUPP; external name '_NewQDRRectUPP';
  534. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  535. {
  536. * NewQDOvalUPP()
  537. *
  538. * Availability:
  539. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  540. * CarbonLib: in CarbonLib 1.0 and later
  541. * Non-Carbon CFM: available as macro/inline
  542. }
  543. function NewQDOvalUPP( userRoutine: QDOvalProcPtr ): QDOvalUPP; external name '_NewQDOvalUPP';
  544. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  545. {
  546. * NewQDArcUPP()
  547. *
  548. * Availability:
  549. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  550. * CarbonLib: in CarbonLib 1.0 and later
  551. * Non-Carbon CFM: available as macro/inline
  552. }
  553. function NewQDArcUPP( userRoutine: QDArcProcPtr ): QDArcUPP; external name '_NewQDArcUPP';
  554. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  555. {
  556. * NewQDPolyUPP()
  557. *
  558. * Availability:
  559. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  560. * CarbonLib: in CarbonLib 1.0 and later
  561. * Non-Carbon CFM: available as macro/inline
  562. }
  563. function NewQDPolyUPP( userRoutine: QDPolyProcPtr ): QDPolyUPP; external name '_NewQDPolyUPP';
  564. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  565. {
  566. * NewQDRgnUPP()
  567. *
  568. * Availability:
  569. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  570. * CarbonLib: in CarbonLib 1.0 and later
  571. * Non-Carbon CFM: available as macro/inline
  572. }
  573. function NewQDRgnUPP( userRoutine: QDRgnProcPtr ): QDRgnUPP; external name '_NewQDRgnUPP';
  574. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  575. {
  576. * NewQDBitsUPP()
  577. *
  578. * Availability:
  579. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  580. * CarbonLib: in CarbonLib 1.0 and later
  581. * Non-Carbon CFM: available as macro/inline
  582. }
  583. function NewQDBitsUPP( userRoutine: QDBitsProcPtr ): QDBitsUPP; external name '_NewQDBitsUPP';
  584. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  585. {
  586. * NewQDCommentUPP()
  587. *
  588. * Availability:
  589. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  590. * CarbonLib: in CarbonLib 1.0 and later
  591. * Non-Carbon CFM: available as macro/inline
  592. }
  593. function NewQDCommentUPP( userRoutine: QDCommentProcPtr ): QDCommentUPP; external name '_NewQDCommentUPP';
  594. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  595. {
  596. * NewQDTxMeasUPP()
  597. *
  598. * Availability:
  599. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  600. * CarbonLib: in CarbonLib 1.0 and later
  601. * Non-Carbon CFM: available as macro/inline
  602. }
  603. function NewQDTxMeasUPP( userRoutine: QDTxMeasProcPtr ): QDTxMeasUPP; external name '_NewQDTxMeasUPP';
  604. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  605. {
  606. * NewQDGetPicUPP()
  607. *
  608. * Availability:
  609. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  610. * CarbonLib: in CarbonLib 1.0 and later
  611. * Non-Carbon CFM: available as macro/inline
  612. }
  613. function NewQDGetPicUPP( userRoutine: QDGetPicProcPtr ): QDGetPicUPP; external name '_NewQDGetPicUPP';
  614. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  615. {
  616. * NewQDPutPicUPP()
  617. *
  618. * Availability:
  619. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  620. * CarbonLib: in CarbonLib 1.0 and later
  621. * Non-Carbon CFM: available as macro/inline
  622. }
  623. function NewQDPutPicUPP( userRoutine: QDPutPicProcPtr ): QDPutPicUPP; external name '_NewQDPutPicUPP';
  624. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  625. {
  626. * NewQDOpcodeUPP()
  627. *
  628. * Availability:
  629. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  630. * CarbonLib: in CarbonLib 1.0 and later
  631. * Non-Carbon CFM: available as macro/inline
  632. }
  633. function NewQDOpcodeUPP( userRoutine: QDOpcodeProcPtr ): QDOpcodeUPP; external name '_NewQDOpcodeUPP';
  634. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  635. {
  636. * NewQDStdGlyphsUPP()
  637. *
  638. * Availability:
  639. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  640. * CarbonLib: in CarbonLib 1.0 and later
  641. * Non-Carbon CFM: available as macro/inline
  642. }
  643. function NewQDStdGlyphsUPP( userRoutine: QDStdGlyphsProcPtr ): QDStdGlyphsUPP; external name '_NewQDStdGlyphsUPP';
  644. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  645. {
  646. * NewQDJShieldCursorUPP()
  647. *
  648. * Availability:
  649. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  650. * CarbonLib: in CarbonLib 1.0 and later
  651. * Non-Carbon CFM: available as macro/inline
  652. }
  653. function NewQDJShieldCursorUPP( userRoutine: QDJShieldCursorProcPtr ): QDJShieldCursorUPP; external name '_NewQDJShieldCursorUPP';
  654. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  655. {
  656. * DisposeQDTextUPP()
  657. *
  658. * Availability:
  659. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  660. * CarbonLib: in CarbonLib 1.0 and later
  661. * Non-Carbon CFM: available as macro/inline
  662. }
  663. procedure DisposeQDTextUPP( userUPP: QDTextUPP ); external name '_DisposeQDTextUPP';
  664. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  665. {
  666. * DisposeQDLineUPP()
  667. *
  668. * Availability:
  669. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  670. * CarbonLib: in CarbonLib 1.0 and later
  671. * Non-Carbon CFM: available as macro/inline
  672. }
  673. procedure DisposeQDLineUPP( userUPP: QDLineUPP ); external name '_DisposeQDLineUPP';
  674. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  675. {
  676. * DisposeQDRectUPP()
  677. *
  678. * Availability:
  679. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  680. * CarbonLib: in CarbonLib 1.0 and later
  681. * Non-Carbon CFM: available as macro/inline
  682. }
  683. procedure DisposeQDRectUPP( userUPP: QDRectUPP ); external name '_DisposeQDRectUPP';
  684. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  685. {
  686. * DisposeQDRRectUPP()
  687. *
  688. * Availability:
  689. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  690. * CarbonLib: in CarbonLib 1.0 and later
  691. * Non-Carbon CFM: available as macro/inline
  692. }
  693. procedure DisposeQDRRectUPP( userUPP: QDRRectUPP ); external name '_DisposeQDRRectUPP';
  694. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  695. {
  696. * DisposeQDOvalUPP()
  697. *
  698. * Availability:
  699. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  700. * CarbonLib: in CarbonLib 1.0 and later
  701. * Non-Carbon CFM: available as macro/inline
  702. }
  703. procedure DisposeQDOvalUPP( userUPP: QDOvalUPP ); external name '_DisposeQDOvalUPP';
  704. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  705. {
  706. * DisposeQDArcUPP()
  707. *
  708. * Availability:
  709. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  710. * CarbonLib: in CarbonLib 1.0 and later
  711. * Non-Carbon CFM: available as macro/inline
  712. }
  713. procedure DisposeQDArcUPP( userUPP: QDArcUPP ); external name '_DisposeQDArcUPP';
  714. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  715. {
  716. * DisposeQDPolyUPP()
  717. *
  718. * Availability:
  719. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  720. * CarbonLib: in CarbonLib 1.0 and later
  721. * Non-Carbon CFM: available as macro/inline
  722. }
  723. procedure DisposeQDPolyUPP( userUPP: QDPolyUPP ); external name '_DisposeQDPolyUPP';
  724. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  725. {
  726. * DisposeQDRgnUPP()
  727. *
  728. * Availability:
  729. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  730. * CarbonLib: in CarbonLib 1.0 and later
  731. * Non-Carbon CFM: available as macro/inline
  732. }
  733. procedure DisposeQDRgnUPP( userUPP: QDRgnUPP ); external name '_DisposeQDRgnUPP';
  734. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  735. {
  736. * DisposeQDBitsUPP()
  737. *
  738. * Availability:
  739. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  740. * CarbonLib: in CarbonLib 1.0 and later
  741. * Non-Carbon CFM: available as macro/inline
  742. }
  743. procedure DisposeQDBitsUPP( userUPP: QDBitsUPP ); external name '_DisposeQDBitsUPP';
  744. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  745. {
  746. * DisposeQDCommentUPP()
  747. *
  748. * Availability:
  749. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  750. * CarbonLib: in CarbonLib 1.0 and later
  751. * Non-Carbon CFM: available as macro/inline
  752. }
  753. procedure DisposeQDCommentUPP( userUPP: QDCommentUPP ); external name '_DisposeQDCommentUPP';
  754. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  755. {
  756. * DisposeQDTxMeasUPP()
  757. *
  758. * Availability:
  759. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  760. * CarbonLib: in CarbonLib 1.0 and later
  761. * Non-Carbon CFM: available as macro/inline
  762. }
  763. procedure DisposeQDTxMeasUPP( userUPP: QDTxMeasUPP ); external name '_DisposeQDTxMeasUPP';
  764. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  765. {
  766. * DisposeQDGetPicUPP()
  767. *
  768. * Availability:
  769. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  770. * CarbonLib: in CarbonLib 1.0 and later
  771. * Non-Carbon CFM: available as macro/inline
  772. }
  773. procedure DisposeQDGetPicUPP( userUPP: QDGetPicUPP ); external name '_DisposeQDGetPicUPP';
  774. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  775. {
  776. * DisposeQDPutPicUPP()
  777. *
  778. * Availability:
  779. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  780. * CarbonLib: in CarbonLib 1.0 and later
  781. * Non-Carbon CFM: available as macro/inline
  782. }
  783. procedure DisposeQDPutPicUPP( userUPP: QDPutPicUPP ); external name '_DisposeQDPutPicUPP';
  784. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  785. {
  786. * DisposeQDOpcodeUPP()
  787. *
  788. * Availability:
  789. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  790. * CarbonLib: in CarbonLib 1.0 and later
  791. * Non-Carbon CFM: available as macro/inline
  792. }
  793. procedure DisposeQDOpcodeUPP( userUPP: QDOpcodeUPP ); external name '_DisposeQDOpcodeUPP';
  794. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  795. {
  796. * DisposeQDStdGlyphsUPP()
  797. *
  798. * Availability:
  799. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  800. * CarbonLib: in CarbonLib 1.0 and later
  801. * Non-Carbon CFM: available as macro/inline
  802. }
  803. procedure DisposeQDStdGlyphsUPP( userUPP: QDStdGlyphsUPP ); external name '_DisposeQDStdGlyphsUPP';
  804. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  805. {
  806. * DisposeQDJShieldCursorUPP()
  807. *
  808. * Availability:
  809. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  810. * CarbonLib: in CarbonLib 1.0 and later
  811. * Non-Carbon CFM: available as macro/inline
  812. }
  813. procedure DisposeQDJShieldCursorUPP( userUPP: QDJShieldCursorUPP ); external name '_DisposeQDJShieldCursorUPP';
  814. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  815. {
  816. * InvokeQDTextUPP()
  817. *
  818. * Availability:
  819. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  820. * CarbonLib: in CarbonLib 1.0 and later
  821. * Non-Carbon CFM: available as macro/inline
  822. }
  823. procedure InvokeQDTextUPP( byteCount: SInt16; textBuf: {const} UnivPtr; numer: Point; denom: Point; userUPP: QDTextUPP ); external name '_InvokeQDTextUPP';
  824. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  825. {
  826. * InvokeQDLineUPP()
  827. *
  828. * Availability:
  829. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  830. * CarbonLib: in CarbonLib 1.0 and later
  831. * Non-Carbon CFM: available as macro/inline
  832. }
  833. procedure InvokeQDLineUPP( newPt: Point; userUPP: QDLineUPP ); external name '_InvokeQDLineUPP';
  834. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  835. {
  836. * InvokeQDRectUPP()
  837. *
  838. * Availability:
  839. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  840. * CarbonLib: in CarbonLib 1.0 and later
  841. * Non-Carbon CFM: available as macro/inline
  842. }
  843. procedure InvokeQDRectUPP( verb: GrafVerb; const (*var*) r: Rect; userUPP: QDRectUPP ); external name '_InvokeQDRectUPP';
  844. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  845. {
  846. * InvokeQDRRectUPP()
  847. *
  848. * Availability:
  849. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  850. * CarbonLib: in CarbonLib 1.0 and later
  851. * Non-Carbon CFM: available as macro/inline
  852. }
  853. procedure InvokeQDRRectUPP( verb: GrafVerb; const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16; userUPP: QDRRectUPP ); external name '_InvokeQDRRectUPP';
  854. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  855. {
  856. * InvokeQDOvalUPP()
  857. *
  858. * Availability:
  859. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  860. * CarbonLib: in CarbonLib 1.0 and later
  861. * Non-Carbon CFM: available as macro/inline
  862. }
  863. procedure InvokeQDOvalUPP( verb: GrafVerb; const (*var*) r: Rect; userUPP: QDOvalUPP ); external name '_InvokeQDOvalUPP';
  864. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  865. {
  866. * InvokeQDArcUPP()
  867. *
  868. * Availability:
  869. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  870. * CarbonLib: in CarbonLib 1.0 and later
  871. * Non-Carbon CFM: available as macro/inline
  872. }
  873. procedure InvokeQDArcUPP( verb: GrafVerb; const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16; userUPP: QDArcUPP ); external name '_InvokeQDArcUPP';
  874. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  875. {
  876. * InvokeQDPolyUPP()
  877. *
  878. * Availability:
  879. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  880. * CarbonLib: in CarbonLib 1.0 and later
  881. * Non-Carbon CFM: available as macro/inline
  882. }
  883. procedure InvokeQDPolyUPP( verb: GrafVerb; poly: PolyHandle; userUPP: QDPolyUPP ); external name '_InvokeQDPolyUPP';
  884. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  885. {
  886. * InvokeQDRgnUPP()
  887. *
  888. * Availability:
  889. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  890. * CarbonLib: in CarbonLib 1.0 and later
  891. * Non-Carbon CFM: available as macro/inline
  892. }
  893. procedure InvokeQDRgnUPP( verb: GrafVerb; rgn: RgnHandle; userUPP: QDRgnUPP ); external name '_InvokeQDRgnUPP';
  894. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  895. {
  896. * InvokeQDBitsUPP()
  897. *
  898. * Availability:
  899. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  900. * CarbonLib: in CarbonLib 1.0 and later
  901. * Non-Carbon CFM: available as macro/inline
  902. }
  903. procedure InvokeQDBitsUPP( const (*var*) srcBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; maskRgn: RgnHandle; userUPP: QDBitsUPP ); external name '_InvokeQDBitsUPP';
  904. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  905. {
  906. * InvokeQDCommentUPP()
  907. *
  908. * Availability:
  909. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  910. * CarbonLib: in CarbonLib 1.0 and later
  911. * Non-Carbon CFM: available as macro/inline
  912. }
  913. procedure InvokeQDCommentUPP( kind: SInt16; dataSize: SInt16; dataHandle: Handle; userUPP: QDCommentUPP ); external name '_InvokeQDCommentUPP';
  914. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  915. {
  916. * InvokeQDTxMeasUPP()
  917. *
  918. * Availability:
  919. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  920. * CarbonLib: in CarbonLib 1.0 and later
  921. * Non-Carbon CFM: available as macro/inline
  922. }
  923. function InvokeQDTxMeasUPP( byteCount: SInt16; textAddr: {const} UnivPtr; var numer: Point; var denom: Point; var info: FontInfo; userUPP: QDTxMeasUPP ): SInt16; external name '_InvokeQDTxMeasUPP';
  924. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  925. {
  926. * InvokeQDGetPicUPP()
  927. *
  928. * Availability:
  929. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  930. * CarbonLib: in CarbonLib 1.0 and later
  931. * Non-Carbon CFM: available as macro/inline
  932. }
  933. procedure InvokeQDGetPicUPP( dataPtr: UnivPtr; byteCount: SInt16; userUPP: QDGetPicUPP ); external name '_InvokeQDGetPicUPP';
  934. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  935. {
  936. * InvokeQDPutPicUPP()
  937. *
  938. * Availability:
  939. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  940. * CarbonLib: in CarbonLib 1.0 and later
  941. * Non-Carbon CFM: available as macro/inline
  942. }
  943. procedure InvokeQDPutPicUPP( dataPtr: {const} UnivPtr; byteCount: SInt16; userUPP: QDPutPicUPP ); external name '_InvokeQDPutPicUPP';
  944. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  945. {
  946. * InvokeQDOpcodeUPP()
  947. *
  948. * Availability:
  949. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  950. * CarbonLib: in CarbonLib 1.0 and later
  951. * Non-Carbon CFM: available as macro/inline
  952. }
  953. procedure InvokeQDOpcodeUPP( const (*var*) fromRect: Rect; const (*var*) toRect: Rect; opcode: UInt16; version: SInt16; userUPP: QDOpcodeUPP ); external name '_InvokeQDOpcodeUPP';
  954. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  955. {
  956. * InvokeQDStdGlyphsUPP()
  957. *
  958. * Availability:
  959. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  960. * CarbonLib: in CarbonLib 1.0 and later
  961. * Non-Carbon CFM: available as macro/inline
  962. }
  963. function InvokeQDStdGlyphsUPP( dataStream: UnivPtr; size: ByteCount; userUPP: QDStdGlyphsUPP ): OSStatus; external name '_InvokeQDStdGlyphsUPP';
  964. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  965. {
  966. * InvokeQDJShieldCursorUPP()
  967. *
  968. * Availability:
  969. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  970. * CarbonLib: in CarbonLib 1.0 and later
  971. * Non-Carbon CFM: available as macro/inline
  972. }
  973. procedure InvokeQDJShieldCursorUPP( left: SInt16; top: SInt16; right: SInt16; bottom: SInt16; userUPP: QDJShieldCursorUPP ); external name '_InvokeQDJShieldCursorUPP';
  974. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  975. {$ifc not OPAQUE_TOOLBOX_STRUCTS}
  976. type
  977. GrafPortPtr = ^GrafPort;
  978. GrafPort = record
  979. device: SInt16; { not available in Carbon}
  980. portBits: BitMap; { in Carbon use GetPortBitMapForCopyBits or IsPortColor}
  981. portRect: Rect; { in Carbon use Get/SetPortBounds}
  982. visRgn: RgnHandle; { in Carbon use Get/SetPortVisibleRegion}
  983. clipRgn: RgnHandle; { in Carbon use Get/SetPortClipRegion}
  984. bkPat: Pattern; { not available in Carbon all GrafPorts are CGrafPorts}
  985. fillPat: Pattern; { not available in Carbon all GrafPorts are CGrafPorts}
  986. pnLoc: Point; { in Carbon use GetPortPenLocation or MoveTo}
  987. pnSize: Point; { in Carbon use Get/SetPortPenSize}
  988. pnMode: SInt16; { in Carbon use Get/SetPortPenMode}
  989. pnPat: Pattern; { not available in Carbon all GrafPorts are CGrafPorts}
  990. pnVis: SInt16; { in Carbon use GetPortPenVisibility or Show/HidePen}
  991. txFont: SInt16; { in Carbon use GetPortTextFont or TextFont}
  992. txFace: StyleField; { in Carbon use GetPortTextFace or TextFace}
  993. {StyleField occupies 16-bits, but only first 8-bits are used}
  994. txMode: SInt16; { in Carbon use GetPortTextMode or TextMode}
  995. txSize: SInt16; { in Carbon use GetPortTextSize or TextSize}
  996. spExtra: Fixed; { in Carbon use GetPortSpExtra or SpaceExtra}
  997. fgColor: SIGNEDLONG; { not available in Carbon }
  998. bkColor: SIGNEDLONG; { not available in Carbon}
  999. colrBit: SInt16; { not available in Carbon}
  1000. patStretch: SInt16; { not available in Carbon}
  1001. picSave: Handle; { in Carbon use IsPortPictureBeingDefined}
  1002. rgnSave: Handle; { not available in Carbon}
  1003. polySave: Handle; { not available in Carbon}
  1004. grafProcs: QDProcsPtr; { not available in Carbon all GrafPorts are CGrafPorts}
  1005. end;
  1006. type
  1007. GrafPtr = GrafPortPtr;
  1008. {
  1009. * This set of definitions "belongs" in Windows.
  1010. * But, there is a circularity in the headers where Windows includes Controls and
  1011. * Controls includes Windows. To break the circle, the information
  1012. * needed by Controls is moved from Windows to Quickdraw.
  1013. }
  1014. type
  1015. WindowPtr = GrafPtr;
  1016. DialogPtr = WindowPtr;
  1017. {$elsec}
  1018. type
  1019. WindowPtr = ^SInt32; { an opaque type }
  1020. WindowPtrPtr = ^WindowPtr; { when a var xx:WindowPtr parameter can be nil, it is changed to xx: WindowPtrPtr }
  1021. DialogPtr = ^SInt32; { an opaque type }
  1022. DialogPtrPtr = ^DialogPtr; { when a var xx:DialogPtr parameter can be nil, it is changed to xx: DialogPtrPtr }
  1023. GrafPtr = ^SInt32; { an opaque type }
  1024. GrafPtrPtr = ^GrafPtr; { when a var xx:GrafPtr parameter can be nil, it is changed to xx: GrafPtrPtr }
  1025. {$endc} {not OPAQUE_TOOLBOX_STRUCTS}
  1026. type
  1027. WindowRef = WindowPtr;
  1028. WindowRefPtr = ^WindowRef;
  1029. { DragConstraint constants to pass to DragGray,DragTheRgn, or ConstrainedDragRgn}
  1030. type
  1031. DragConstraint = UInt16;
  1032. const
  1033. kNoConstraint = 0;
  1034. kVerticalConstraint = 1;
  1035. kHorizontalConstraint = 2;
  1036. type
  1037. DragGrayRgnProcPtr = procedure;
  1038. {
  1039. * Here ends the list of things that "belong" in Windows.
  1040. }
  1041. type
  1042. RGBColor = record
  1043. red: UInt16; {magnitude of red component}
  1044. green: UInt16; {magnitude of green component}
  1045. blue: UInt16; {magnitude of blue component}
  1046. end;
  1047. RGBColorPtr = ^RGBColor;
  1048. type
  1049. RGBColorHdl = ^RGBColorPtr;
  1050. ColorSearchProcPtr = function( var rgb: RGBColor; var position: SIGNEDLONG ): Boolean;
  1051. ColorComplementProcPtr = function( var rgb: RGBColor ): Boolean;
  1052. DragGrayRgnUPP = DragGrayRgnProcPtr;
  1053. ColorSearchUPP = ColorSearchProcPtr;
  1054. ColorComplementUPP = ColorComplementProcPtr;
  1055. {
  1056. * NewDragGrayRgnUPP()
  1057. *
  1058. * Availability:
  1059. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1060. * CarbonLib: in CarbonLib 1.0 and later
  1061. * Non-Carbon CFM: available as macro/inline
  1062. }
  1063. function NewDragGrayRgnUPP( userRoutine: DragGrayRgnProcPtr ): DragGrayRgnUPP; external name '_NewDragGrayRgnUPP';
  1064. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1065. {
  1066. * NewColorSearchUPP()
  1067. *
  1068. * Availability:
  1069. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1070. * CarbonLib: in CarbonLib 1.0 and later
  1071. * Non-Carbon CFM: available as macro/inline
  1072. }
  1073. function NewColorSearchUPP( userRoutine: ColorSearchProcPtr ): ColorSearchUPP; external name '_NewColorSearchUPP';
  1074. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1075. {
  1076. * NewColorComplementUPP()
  1077. *
  1078. * Availability:
  1079. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1080. * CarbonLib: in CarbonLib 1.0 and later
  1081. * Non-Carbon CFM: available as macro/inline
  1082. }
  1083. function NewColorComplementUPP( userRoutine: ColorComplementProcPtr ): ColorComplementUPP; external name '_NewColorComplementUPP';
  1084. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1085. {
  1086. * DisposeDragGrayRgnUPP()
  1087. *
  1088. * Availability:
  1089. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1090. * CarbonLib: in CarbonLib 1.0 and later
  1091. * Non-Carbon CFM: available as macro/inline
  1092. }
  1093. procedure DisposeDragGrayRgnUPP( userUPP: DragGrayRgnUPP ); external name '_DisposeDragGrayRgnUPP';
  1094. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1095. {
  1096. * DisposeColorSearchUPP()
  1097. *
  1098. * Availability:
  1099. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1100. * CarbonLib: in CarbonLib 1.0 and later
  1101. * Non-Carbon CFM: available as macro/inline
  1102. }
  1103. procedure DisposeColorSearchUPP( userUPP: ColorSearchUPP ); external name '_DisposeColorSearchUPP';
  1104. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1105. {
  1106. * DisposeColorComplementUPP()
  1107. *
  1108. * Availability:
  1109. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1110. * CarbonLib: in CarbonLib 1.0 and later
  1111. * Non-Carbon CFM: available as macro/inline
  1112. }
  1113. procedure DisposeColorComplementUPP( userUPP: ColorComplementUPP ); external name '_DisposeColorComplementUPP';
  1114. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1115. {
  1116. * InvokeDragGrayRgnUPP()
  1117. *
  1118. * Availability:
  1119. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1120. * CarbonLib: in CarbonLib 1.0 and later
  1121. * Non-Carbon CFM: available as macro/inline
  1122. }
  1123. procedure InvokeDragGrayRgnUPP( userUPP: DragGrayRgnUPP ); external name '_InvokeDragGrayRgnUPP';
  1124. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1125. {
  1126. * InvokeColorSearchUPP()
  1127. *
  1128. * Availability:
  1129. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1130. * CarbonLib: in CarbonLib 1.0 and later
  1131. * Non-Carbon CFM: available as macro/inline
  1132. }
  1133. function InvokeColorSearchUPP( var rgb: RGBColor; var position: SIGNEDLONG; userUPP: ColorSearchUPP ): Boolean; external name '_InvokeColorSearchUPP';
  1134. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1135. {
  1136. * InvokeColorComplementUPP()
  1137. *
  1138. * Availability:
  1139. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1140. * CarbonLib: in CarbonLib 1.0 and later
  1141. * Non-Carbon CFM: available as macro/inline
  1142. }
  1143. function InvokeColorComplementUPP( var rgb: RGBColor; userUPP: ColorComplementUPP ): Boolean; external name '_InvokeColorComplementUPP';
  1144. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1145. type
  1146. ColorSpec = record
  1147. value: SInt16; {index or other value}
  1148. rgb: RGBColor; {true color}
  1149. end;
  1150. ColorSpecPtr = ^ColorSpec;
  1151. CSpecArray = array [0..0] of ColorSpec;
  1152. type
  1153. ColorTablePtr = ^ColorTable;
  1154. ColorTable = record
  1155. ctSeed: SInt32; {unique identifier for table}
  1156. ctFlags: SInt16; {high bit: 0 = PixMap; 1 = device}
  1157. ctSize: SInt16; {number of entries in CTTable}
  1158. ctTable: CSpecArray; {array [0..0] of ColorSpec}
  1159. end;
  1160. type
  1161. CTabPtr = ColorTablePtr;
  1162. CTabHandle = ^CTabPtr;
  1163. xColorSpec = record
  1164. value: SInt16; {index or other value}
  1165. rgb: RGBColor; {true color}
  1166. xalpha: SInt16;
  1167. end;
  1168. xColorSpecPtr = ^xColorSpec;
  1169. xCSpecArray = array [0..0] of xColorSpec;
  1170. type
  1171. MatchRecPtr = ^MatchRec;
  1172. MatchRec = record
  1173. red: UInt16;
  1174. green: UInt16;
  1175. blue: UInt16;
  1176. matchData: SIGNEDLONG;
  1177. end;
  1178. { keep this around in case anybody relies on it }
  1179. const
  1180. OLDPIXMAPSTRUCT = 0;
  1181. const
  1182. NON_MAC_PIXEL_FORMATS = 1;
  1183. { QuickTime 3.0 changed the original PixMap data structure, replacing the
  1184. old planeBytes field by "pixelFormat", and pmReserved by pmExt (a Handle to
  1185. additional private info). On Mac OS X, most QuickTime-specific changes were
  1186. merged into Quickdraw.
  1187. 32-bit constants for the new pixelFormat field are enumerated below.
  1188. Please note that not all predefined pixelFormat constants are supported under
  1189. all circumstances. For example, because of performance tuning on ppc systems,
  1190. many QD drawing functions don't support little-endian pixelFormat destinations
  1191. on ppc systems.
  1192. }
  1193. { Values for PixMap.pixelFormat (BE = Big Endian, LE = Little Endian)}
  1194. const
  1195. { The original pixel formats supported by 32-bit Color Quickdraw}
  1196. k1MonochromePixelFormat = $00000001; { 1 bit indexed}
  1197. k2IndexedPixelFormat = $00000002; { 2 bit indexed}
  1198. k4IndexedPixelFormat = $00000004; { 4 bit indexed}
  1199. k8IndexedPixelFormat = $00000008; { 8 bit indexed}
  1200. k16BE555PixelFormat = $00000010; { 16 bit BE rgb 555 (Mac)}
  1201. k24RGBPixelFormat = $00000018; { 24 bit rgb }
  1202. k32ARGBPixelFormat = $00000020; { 32 bit argb (Mac)}
  1203. { QuickTime additions}
  1204. k1IndexedGrayPixelFormat = $00000021; { 1 bit indexed gray}
  1205. k2IndexedGrayPixelFormat = $00000022; { 2 bit indexed gray}
  1206. k4IndexedGrayPixelFormat = $00000024; { 4 bit indexed gray}
  1207. k8IndexedGrayPixelFormat = $00000028; { 8 bit indexed gray}
  1208. k16LE555PixelFormat = FourCharCode('L555'); { 16 bit LE rgb 555 (PC)}
  1209. k16LE5551PixelFormat = FourCharCode('5551'); { 16 bit LE rgb 5551}
  1210. k16BE565PixelFormat = FourCharCode('B565'); { 16 bit BE rgb 565}
  1211. k16LE565PixelFormat = FourCharCode('L565'); { 16 bit LE rgb 565}
  1212. k24BGRPixelFormat = FourCharCode('24BG'); { 24 bit bgr }
  1213. k32BGRAPixelFormat = FourCharCode('BGRA'); { 32 bit bgra (Matrox)}
  1214. k32ABGRPixelFormat = FourCharCode('ABGR'); { 32 bit abgr }
  1215. k32RGBAPixelFormat = FourCharCode('RGBA'); { 32 bit rgba }
  1216. kYUVSPixelFormat = FourCharCode('yuvs'); { YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'}
  1217. kYUVUPixelFormat = FourCharCode('yuvu'); { YUV 4:2:2 byte ordering 16-signed}
  1218. kYVU9PixelFormat = FourCharCode('YVU9'); { YVU9 Planar 9}
  1219. kYUV411PixelFormat = FourCharCode('Y411'); { YUV 4:1:1 Interleaved 16}
  1220. kYVYU422PixelFormat = FourCharCode('YVYU'); { YVYU 4:2:2 byte ordering 16}
  1221. kUYVY422PixelFormat = FourCharCode('UYVY'); { UYVY 4:2:2 byte ordering 16}
  1222. kYUV211PixelFormat = FourCharCode('Y211'); { YUV 2:1:1 Packed 8}
  1223. k2vuyPixelFormat = FourCharCode('2vuy'); { UYVY 4:2:2 byte ordering 16}
  1224. type
  1225. PixMap = record
  1226. baseAddr: Ptr; { pointer to pixels }
  1227. rowBytes: SInt16; { offset to next line }
  1228. bounds: Rect; { encloses bitmap }
  1229. pmVersion: SInt16; { pixMap version number }
  1230. packType: SInt16; { defines packing format }
  1231. packSize: SInt32; { length of pixel data }
  1232. hRes: Fixed; { horiz. resolution (ppi) }
  1233. vRes: Fixed; { vert. resolution (ppi) }
  1234. pixelType: SInt16; { defines pixel type }
  1235. pixelSize: SInt16; { # bits in pixel }
  1236. cmpCount: SInt16; { # components in pixel }
  1237. cmpSize: SInt16; { # bits per component }
  1238. pixelFormat: OSType; { fourCharCode representation }
  1239. pmTable: CTabHandle; { color map for this pixMap }
  1240. pmExt: UnivPtr; { Handle to pixMap extension }
  1241. end;
  1242. PixMapPtr = ^PixMap;
  1243. type
  1244. PixMapHandle = ^PixMapPtr;
  1245. PixPat = record
  1246. patType: SInt16; {type of pattern}
  1247. patMap: PixMapHandle; {the pattern's pixMap}
  1248. patData: Handle; {pixmap's data}
  1249. patXData: Handle; {expanded Pattern data}
  1250. patXValid: SInt16; {flags whether expanded Pattern valid}
  1251. patXMap: Handle; {Handle to expanded Pattern data}
  1252. pat1Data: Pattern; {old-Style pattern/RGB color}
  1253. end;
  1254. PixPatPtr = ^PixPat;
  1255. type
  1256. PixPatHandle = ^PixPatPtr;
  1257. CCrsr = record
  1258. crsrType: SInt16; {type of cursor}
  1259. crsrMap: PixMapHandle; {the cursor's pixmap}
  1260. crsrData: Handle; {cursor's data}
  1261. crsrXData: Handle; {expanded cursor data}
  1262. crsrXValid: SInt16; {depth of expanded data (0 if none)}
  1263. crsrXHandle: Handle; {future use}
  1264. crsr1Data: Bits16; {one-bit cursor}
  1265. crsrMask: Bits16; {cursor's mask}
  1266. crsrHotSpot: Point; {cursor's hotspot}
  1267. crsrXTable: SInt32; {private}
  1268. crsrID: SInt32; {private}
  1269. end;
  1270. CCrsrPtr = ^CCrsr;
  1271. type
  1272. CCrsrHandle = ^CCrsrPtr;
  1273. GammaTbl = record
  1274. gVersion: SInt16; {gamma version number}
  1275. gType: SInt16; {gamma data type}
  1276. gFormulaSize: SInt16; {Formula data size}
  1277. gChanCnt: SInt16; {number of channels of data}
  1278. gDataCnt: SInt16; {number of values/channel}
  1279. gDataWidth: SInt16; {bits/corrected value (data packed to next larger byte size)}
  1280. gFormulaData: array [0..0] of SInt16; {data for formulas followed by gamma values}
  1281. end;
  1282. GammaTblPtr = ^GammaTbl;
  1283. type
  1284. GammaTblHandle = ^GammaTblPtr;
  1285. ITab = record
  1286. iTabSeed: SInt32; {copy of CTSeed from source CTable}
  1287. iTabRes: SInt16; {bits/channel resolution of iTable}
  1288. iTTable: array [0..0] of UInt8; {byte colortable index values}
  1289. end;
  1290. ITabPtr = ^ITab;
  1291. type
  1292. ITabHandle = ^ITabPtr;
  1293. SProcRecPtr = ^SProcRec;
  1294. SProcRec = record
  1295. nxtSrch: Handle; {SProcHndl Handle to next SProcRec}
  1296. srchProc: ColorSearchUPP; {search procedure proc ptr}
  1297. end;
  1298. type
  1299. SProcPtr = SProcRecPtr;
  1300. SProcHndl = ^SProcPtr;
  1301. CProcRecPtr = ^CProcRec;
  1302. CProcRec = record
  1303. nxtComp: Handle; {CProcHndl Handle to next CProcRec}
  1304. compProc: ColorComplementUPP; {complement procedure proc ptr}
  1305. end;
  1306. type
  1307. CProcPtr = CProcRecPtr;
  1308. CProcHndl = ^CProcPtr;
  1309. { keep this around in case anybody relies on it }
  1310. const
  1311. OLDGDEVICESTRUCT = 0;
  1312. type
  1313. GDevicePtr = ^GDevice;
  1314. GDPtr = ^GDevice;
  1315. GDHandle = ^GDPtr;
  1316. GDHandle_fix = GDHandle; { used as field type when a record declaration contains a GDHandle field identifier }
  1317. GDHandlePtr = ^GDHandle; { when a VAR xx: GDHandle parameter can be nil, it is changed to xx: GDHandlePtr }
  1318. GDevice = record
  1319. gdRefNum: SInt16; {driver's unit number}
  1320. gdID: SInt16; {client ID for search procs}
  1321. gdType: SInt16; {fixed/CLUT/direct}
  1322. gdITable: ITabHandle; {Handle to inverse lookup table}
  1323. gdResPref: SInt16; {preferred resolution of GDITable}
  1324. gdSearchProc: SProcHndl; {search proc list head}
  1325. gdCompProc: CProcHndl; {complement proc list}
  1326. gdFlags: SInt16; {grafDevice flags word}
  1327. gdPMap: PixMapHandle; {describing pixMap}
  1328. gdRefCon: SInt32; {reference value}
  1329. gdNextGD: GDHandle; {GDHandle Handle of next gDevice}
  1330. gdRect: Rect; { device's bounds in global coordinates}
  1331. gdMode: SInt32; {device's current mode}
  1332. gdCCBytes: SInt16; {depth of expanded cursor data}
  1333. gdCCDepth: SInt16; {depth of expanded cursor data}
  1334. gdCCXData: Handle; {Handle to cursor's expanded data}
  1335. gdCCXMask: Handle; {Handle to cursor's expanded mask}
  1336. gdExt: Handle; {QuickTime 3.0 private info}
  1337. end;
  1338. type
  1339. GrafVarsPtr = ^GrafVars;
  1340. GrafVars = record
  1341. rgbOpColor: RGBColor; {color for addPin subPin and average}
  1342. rgbHiliteColor: RGBColor; {color for hiliting}
  1343. pmFgColor: Handle; {palette Handle for foreground color}
  1344. pmFgIndex: SInt16; {index value for foreground}
  1345. pmBkColor: Handle; {palette Handle for background color}
  1346. pmBkIndex: SInt16; {index value for background}
  1347. pmFlags: SInt16; {flags for Palette Manager}
  1348. end;
  1349. type
  1350. GVarPtr = GrafVarsPtr;
  1351. GVarHandle = ^GVarPtr;
  1352. {$ifc not OPAQUE_TOOLBOX_STRUCTS}
  1353. type
  1354. CGrafPort = struct CGrafPort;
  1355. CGrafPtr = CGrafPortPtr;
  1356. {$elsec}
  1357. type
  1358. CGrafPtr = GrafPtr;
  1359. {$endc} {not OPAQUE_TOOLBOX_STRUCTS}
  1360. CGrafPtrPtr = ^CGrafPtr;
  1361. type
  1362. QDPrinterStatusProcPtr = function( opcode: PrinterStatusOpcode; currentPort: CGrafPtr; printerStatus: UnivPtr ): OSStatus;
  1363. QDPrinterStatusUPP = QDPrinterStatusProcPtr;
  1364. type
  1365. CQDProcs = record
  1366. textProc: QDTextUPP;
  1367. lineProc: QDLineUPP;
  1368. rectProc: QDRectUPP;
  1369. rRectProc: QDRRectUPP;
  1370. ovalProc: QDOvalUPP;
  1371. arcProc: QDArcUPP;
  1372. polyProc: QDPolyUPP;
  1373. rgnProc: QDRgnUPP;
  1374. bitsProc: QDBitsUPP;
  1375. commentProc: QDCommentUPP;
  1376. txMeasProc: QDTxMeasUPP;
  1377. getPicProc: QDGetPicUPP;
  1378. putPicProc: QDPutPicUPP;
  1379. opcodeProc: QDOpcodeUPP;
  1380. newProc1: UniversalProcPtr; { this is the StdPix bottleneck -- see ImageCompression.h }
  1381. glyphsProc: QDStdGlyphsUPP; { unused on Mac OS X }
  1382. printerStatusProc: QDPrinterStatusUPP; { was newProc3; now used to communicate status between Printing code and System imaging code }
  1383. newProc4: UniversalProcPtr;
  1384. newProc5: UniversalProcPtr;
  1385. newProc6: UniversalProcPtr;
  1386. end;
  1387. CQDProcsPtr = ^CQDProcs;
  1388. {$ifc not OPAQUE_TOOLBOX_STRUCTS}
  1389. type
  1390. CGrafPort = record
  1391. device: SInt16; { not available in Carbon}
  1392. portPixMap: PixMapHandle; { in Carbon use GetPortPixMap}
  1393. portVersion: SInt16; { in Carbon use IsPortColor}
  1394. grafVars: Handle; { not available in Carbon}
  1395. chExtra: SInt16; { in Carbon use GetPortChExtra}
  1396. pnLocHFrac: SInt16; { in Carbon use Get/SetPortFracHPenLocation}
  1397. portRect: Rect; { in Carbon use Get/SetPortBounds}
  1398. visRgn: RgnHandle; { in Carbon use Get/SetPortVisibleRegion}
  1399. clipRgn: RgnHandle; { in Carbon use Get/SetPortClipRegion}
  1400. bkPixPat: PixPatHandle; { in Carbon use GetPortBackPixPat or BackPixPat}
  1401. rgbFgColor: RGBColor; { in Carbon use GetPortForeColor or RGBForeColor}
  1402. rgbBkColor: RGBColor; { in Carbon use GetPortBackColor or RGBBackColor}
  1403. pnLoc: Point; { in Carbon use GetPortPenLocation or MoveTo}
  1404. pnSize: Point; { in Carbon use Get/SetPortPenSize}
  1405. pnMode: SInt16; { in Carbon use Get/SetPortPenMode}
  1406. pnPixPat: PixPatHandle; { in Carbon use Get/SetPortPenPixPat}
  1407. fillPixPat: PixPatHandle; { in Carbon use GetPortFillPixPat}
  1408. pnVis: SInt16; { in Carbon use GetPortPenVisibility or Show/HidePen}
  1409. txFont: SInt16; { in Carbon use GetPortTextFont or TextFont}
  1410. txFace: StyleField; { in Carbon use GetPortTextFace or TextFace}
  1411. {StyleField occupies 16-bits, but only first 8-bits are used}
  1412. txMode: SInt16; { in Carbon use GetPortTextMode or TextMode}
  1413. txSize: SInt16; { in Carbon use GetPortTextSize or TextSize}
  1414. spExtra: Fixed; { in Carbon use GetPortSpExtra or SpaceExtra}
  1415. fgColor: SInt32; { not available in Carbon}
  1416. bkColor: SInt32; { not available in Carbon}
  1417. colrBit: SInt16; { not available in Carbon}
  1418. patStretch: SInt16; { not available in Carbon}
  1419. picSave: Handle; { in Carbon use IsPortPictureBeingDefined}
  1420. rgnSave: Handle; { in Carbon use IsPortRegionBeingDefined}
  1421. polySave: Handle; { in Carbon use IsPortPolyBeingDefined}
  1422. grafProcs: CQDProcsPtr; { in Carbon use Get/SetPortGrafProcs}
  1423. end;
  1424. {$endc} {not OPAQUE_TOOLBOX_STRUCTS}
  1425. {$ifc OPAQUE_TOOLBOX_STRUCTS}
  1426. type
  1427. CWindowPtr = WindowPtr;
  1428. {$elsec}
  1429. type
  1430. CWindowPtr = CGrafPtr;
  1431. {$endc} {OPAQUE_TOOLBOX_STRUCTS}
  1432. type
  1433. ReqListRecPtr = ^ReqListRec;
  1434. ReqListRec = record
  1435. reqLSize: SInt16; {request list size}
  1436. reqLData: array [0..0] of SInt16; { request list data }
  1437. end;
  1438. type
  1439. OpenCPicParamsPtr = ^OpenCPicParams;
  1440. OpenCPicParams = record
  1441. srcRect: Rect;
  1442. hRes: Fixed;
  1443. vRes: Fixed;
  1444. version: SInt16;
  1445. reserved1: SInt16;
  1446. reserved2: SInt32;
  1447. end;
  1448. type
  1449. DeviceLoopDrawingProcPtr = procedure( depth: SInt16; deviceFlags: SInt16; targetDevice: GDHandle; userData: SRefCon );
  1450. DeviceLoopDrawingUPP = DeviceLoopDrawingProcPtr;
  1451. {
  1452. * NewQDPrinterStatusUPP()
  1453. *
  1454. * Availability:
  1455. * Mac OS X: not available
  1456. * CarbonLib: not available
  1457. * Non-Carbon CFM: available as macro/inline
  1458. }
  1459. {
  1460. * NewDeviceLoopDrawingUPP()
  1461. *
  1462. * Availability:
  1463. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1464. * CarbonLib: in CarbonLib 1.0 and later
  1465. * Non-Carbon CFM: available as macro/inline
  1466. }
  1467. function NewDeviceLoopDrawingUPP( userRoutine: DeviceLoopDrawingProcPtr ): DeviceLoopDrawingUPP; external name '_NewDeviceLoopDrawingUPP';
  1468. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1469. {
  1470. * DisposeQDPrinterStatusUPP()
  1471. *
  1472. * Availability:
  1473. * Mac OS X: not available
  1474. * CarbonLib: not available
  1475. * Non-Carbon CFM: available as macro/inline
  1476. }
  1477. {
  1478. * DisposeDeviceLoopDrawingUPP()
  1479. *
  1480. * Availability:
  1481. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1482. * CarbonLib: in CarbonLib 1.0 and later
  1483. * Non-Carbon CFM: available as macro/inline
  1484. }
  1485. procedure DisposeDeviceLoopDrawingUPP( userUPP: DeviceLoopDrawingUPP ); external name '_DisposeDeviceLoopDrawingUPP';
  1486. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1487. {
  1488. * InvokeQDPrinterStatusUPP()
  1489. *
  1490. * Availability:
  1491. * Mac OS X: not available
  1492. * CarbonLib: not available
  1493. * Non-Carbon CFM: available as macro/inline
  1494. }
  1495. {
  1496. * InvokeDeviceLoopDrawingUPP()
  1497. *
  1498. * Availability:
  1499. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  1500. * CarbonLib: in CarbonLib 1.0 and later
  1501. * Non-Carbon CFM: available as macro/inline
  1502. }
  1503. procedure InvokeDeviceLoopDrawingUPP( depth: SInt16; deviceFlags: SInt16; targetDevice: GDHandle; userData: SRefCon; userUPP: DeviceLoopDrawingUPP ); external name '_InvokeDeviceLoopDrawingUPP';
  1504. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1505. {$ifc NOT OPAQUE_TOOLBOX_STRUCTS OR NOT TARGET_API_MAC_CARBON}
  1506. type
  1507. QDGlobals = record
  1508. privates: packed array [0..75] of AnsiChar;
  1509. randSeed: SInt32; { in Carbon use GetQDGlobalsRandomSeed}
  1510. screenBits: BitMap; { in Carbon use GetQDGlobalsScreenBits}
  1511. arrow: Cursor; { in Carbon use GetQDGlobalsArrow}
  1512. dkGray: Pattern; { in Carbon use GetQDGlobalsDarkGray}
  1513. ltGray: Pattern; { in Carbon use GetQDGlobalsLightGray}
  1514. gray: Pattern; { in Carbon use GetQDGlobalsGray}
  1515. black: Pattern; { in Carbon use GetQDGlobalsBlack}
  1516. white: Pattern; { in Carbon use GetQDGlobalsWhite}
  1517. thePort: GrafPtr; { in Carbon use GetQDGlobalsThePort}
  1518. end;
  1519. QDGlobalsPtr = ^QDGlobals;
  1520. type
  1521. QDGlobalsHdl = ^QDGlobalsPtr;
  1522. { To be in sync with the C interface to QuickDraw globals, pascal code must now }
  1523. { qualify the QuickDraw globals with “qd.” (e.g. InitGraf(@qd.thePort); ) }
  1524. var qd: QDGlobals; external name '_qd'; (* attribute const *)
  1525. {$endc}
  1526. {$endc} {TARGET_OS_MAC}
  1527. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1528. end.
  1529. {$endc} {not MACOSALLINCLUDE}