HIShape.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. {
  2. File: HIToolbox/HIShape.h
  3. Contains: Generic Abstract Shape API
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 2001-2005 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { File: HIShape.p(.pas) }
  11. { }
  12. { Contains: CodeWarrior Pascal(GPC) translation of Apple's Mac OS X 10.2 introduced HIShape.h. }
  13. { Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
  14. { (GPCPInterfaces) and Mac OS X 10.2.x or higher. The CodeWarrior Pascal translation }
  15. { is linkable with Mac OS X 10.2.x or higher CFM CarbonLib. The GPC translation is }
  16. { linkable with Mac OS X 10.2.x or higher Mach-O Carbon.framework. }
  17. { }
  18. { Version: 1.0 }
  19. { }
  20. { Pascal Translation: Gale Paeper, <[email protected]>, 2004 }
  21. { }
  22. { Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
  23. { translation as you deem fit. }
  24. { }
  25. { Bugs?: This is an AS IS translation with no express guarentees of any kind. }
  26. { If you do find a bug, please help out the Macintosh Pascal programming community by }
  27. { reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
  28. { or a posting to the MacPascal mailing list. }
  29. { }
  30. { Translation assisted by: }
  31. {This file was processed by Dan's Source Converter}
  32. {version 1.3 (this version modified by Ingemar Ragnemalm)}
  33. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  34. {
  35. Modified for use with Free Pascal
  36. Version 200
  37. Please report any bugs to <[email protected]>
  38. }
  39. {$mode macpas}
  40. {$packenum 1}
  41. {$macro on}
  42. {$inline on}
  43. {$CALLING MWPASCAL}
  44. unit HIShape;
  45. interface
  46. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  47. {$setc GAP_INTERFACES_VERSION := $0200}
  48. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  49. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  50. {$endc}
  51. {$ifc defined CPUPOWERPC and defined CPUI386}
  52. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  53. {$endc}
  54. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  55. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  56. {$endc}
  57. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  58. {$setc __ppc__ := 1}
  59. {$elsec}
  60. {$setc __ppc__ := 0}
  61. {$endc}
  62. {$ifc not defined __i386__ and defined CPUI386}
  63. {$setc __i386__ := 1}
  64. {$elsec}
  65. {$setc __i386__ := 0}
  66. {$endc}
  67. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  68. {$error Conflicting definitions for __ppc__ and __i386__}
  69. {$endc}
  70. {$ifc defined __ppc__ and __ppc__}
  71. {$setc TARGET_CPU_PPC := TRUE}
  72. {$setc TARGET_CPU_X86 := FALSE}
  73. {$elifc defined __i386__ and __i386__}
  74. {$setc TARGET_CPU_PPC := FALSE}
  75. {$setc TARGET_CPU_X86 := TRUE}
  76. {$elsec}
  77. {$error Neither __ppc__ nor __i386__ is defined.}
  78. {$endc}
  79. {$setc TARGET_CPU_PPC_64 := FALSE}
  80. {$ifc defined FPC_BIG_ENDIAN}
  81. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  82. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  83. {$elifc defined FPC_LITTLE_ENDIAN}
  84. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  85. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  86. {$elsec}
  87. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  88. {$endc}
  89. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  90. {$setc CALL_NOT_IN_CARBON := FALSE}
  91. {$setc OLDROUTINENAMES := FALSE}
  92. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  93. {$setc OPAQUE_UPP_TYPES := TRUE}
  94. {$setc OTCARBONAPPLICATION := TRUE}
  95. {$setc OTKERNEL := FALSE}
  96. {$setc PM_USE_SESSION_APIS := TRUE}
  97. {$setc TARGET_API_MAC_CARBON := TRUE}
  98. {$setc TARGET_API_MAC_OS8 := FALSE}
  99. {$setc TARGET_API_MAC_OSX := TRUE}
  100. {$setc TARGET_CARBON := TRUE}
  101. {$setc TARGET_CPU_68K := FALSE}
  102. {$setc TARGET_CPU_MIPS := FALSE}
  103. {$setc TARGET_CPU_SPARC := FALSE}
  104. {$setc TARGET_OS_MAC := TRUE}
  105. {$setc TARGET_OS_UNIX := FALSE}
  106. {$setc TARGET_OS_WIN32 := FALSE}
  107. {$setc TARGET_RT_MAC_68881 := FALSE}
  108. {$setc TARGET_RT_MAC_CFM := FALSE}
  109. {$setc TARGET_RT_MAC_MACHO := TRUE}
  110. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  111. {$setc TYPE_BOOL := FALSE}
  112. {$setc TYPE_EXTENDED := FALSE}
  113. {$setc TYPE_LONGLONG := TRUE}
  114. uses MacTypes,CFBase,CGContext,Drag,Quickdraw,CarbonEvents,HIGeometry;
  115. {$ALIGN POWER}
  116. {
  117. * HIShape
  118. *
  119. * Discussion:
  120. * HIShape is an abstract shape object for use with some of the
  121. * HIToolbox APIs. It is designed as a replacement for RgnHandles
  122. * (though it is currently implemented in terms of them at the time
  123. * of this writing). This abstraction will allow us to avoid using
  124. * QD types in our APIs, particularly in HIView.
  125. *
  126. * One of the biggest benefits of HIShape is that we have mutable
  127. * and immutable variants. This means that immutable shapes can be
  128. * created and passed around and 'copied' very quickly, since they
  129. * are actually refcounted when copied. This avoids needing to do
  130. * the handle-to-handle copies that occur right now with
  131. * RgnHandle-based APIs.
  132. }
  133. type
  134. HIShapeRef = ^SInt32; { an opaque 32-bit type }
  135. type
  136. HIMutableShapeRef = ^SInt32; { an opaque 32-bit type }
  137. {
  138. * HIShapeGetTypeID()
  139. *
  140. * Discussion:
  141. * Returns the CF type ID for the HIShape class.
  142. *
  143. * Mac OS X threading:
  144. * Not thread safe
  145. *
  146. * Result:
  147. * A CF type ID.
  148. *
  149. * Availability:
  150. * Mac OS X: in version 10.2 and later in Carbon.framework
  151. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  152. * Non-Carbon CFM: not available
  153. }
  154. function HIShapeGetTypeID: CFTypeID; external name '_HIShapeGetTypeID';
  155. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  156. {======================================================================================}
  157. { IMMUTABLE FUNCTIONS }
  158. {======================================================================================}
  159. {
  160. * HIShapeCreateEmpty()
  161. *
  162. * Discussion:
  163. * Creates an immutable empty shape. Useful at times.
  164. *
  165. * Mac OS X threading:
  166. * Not thread safe
  167. *
  168. * Result:
  169. * An immutable, empty HIShape reference.
  170. *
  171. * Availability:
  172. * Mac OS X: in version 10.4 and later in Carbon.framework
  173. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  174. * Non-Carbon CFM: not available
  175. }
  176. function HIShapeCreateEmpty: HIShapeRef; external name '_HIShapeCreateEmpty';
  177. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  178. {
  179. * HIShapeCreateWithQDRgn()
  180. *
  181. * Discussion:
  182. * Creates an immutable shape based on an existing Quickdraw region
  183. * handle.
  184. *
  185. * Mac OS X threading:
  186. * Not thread safe
  187. *
  188. * Parameters:
  189. *
  190. * inRgn:
  191. * The Quickdraw region from which to create the HIShape.
  192. *
  193. * Result:
  194. * An immutable HIShape reference.
  195. *
  196. * Availability:
  197. * Mac OS X: in version 10.2 and later in Carbon.framework
  198. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  199. * Non-Carbon CFM: not available
  200. }
  201. function HIShapeCreateWithQDRgn( inRgn: RgnHandle ): HIShapeRef; external name '_HIShapeCreateWithQDRgn';
  202. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  203. {
  204. * HIShapeCreateWithRect()
  205. *
  206. * Discussion:
  207. * Creates an immutable, rectangular shape based on a given
  208. * rectangle.
  209. *
  210. * Mac OS X threading:
  211. * Not thread safe
  212. *
  213. * Parameters:
  214. *
  215. * inRect:
  216. * The HIRect from which to create the resulting shape.
  217. *
  218. * Result:
  219. * An immutable HIShape reference.
  220. *
  221. * Availability:
  222. * Mac OS X: in version 10.2 and later in Carbon.framework
  223. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  224. * Non-Carbon CFM: not available
  225. }
  226. function HIShapeCreateWithRect( const (*var*) inRect: HIRect ): HIShapeRef; external name '_HIShapeCreateWithRect';
  227. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  228. {
  229. * HIShapeCreateCopy()
  230. *
  231. * Discussion:
  232. * Creates an immutable copy of a mutable or immutable HIShape.
  233. *
  234. * Mac OS X threading:
  235. * Not thread safe
  236. *
  237. * Parameters:
  238. *
  239. * inShape:
  240. * The existing HIShapeRef you wish to copy.
  241. *
  242. * Result:
  243. * An immutable HIShape reference.
  244. *
  245. * Availability:
  246. * Mac OS X: in version 10.2 and later in Carbon.framework
  247. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  248. * Non-Carbon CFM: not available
  249. }
  250. function HIShapeCreateCopy( inShape: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateCopy';
  251. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  252. {
  253. * HIShapeCreateIntersection()
  254. *
  255. * Discussion:
  256. * Creates a new immutable shape which is the intersection of two
  257. * others.
  258. *
  259. * Mac OS X threading:
  260. * Not thread safe
  261. *
  262. * Parameters:
  263. *
  264. * inShape1:
  265. * An existing HIShapeRef.
  266. *
  267. * inShape2:
  268. * An existing HIShapeRef.
  269. *
  270. * Result:
  271. * A new immutable HIShapeRef.
  272. *
  273. * Availability:
  274. * Mac OS X: in version 10.2 and later in Carbon.framework
  275. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  276. * Non-Carbon CFM: not available
  277. }
  278. function HIShapeCreateIntersection( inShape1: HIShapeRef; inShape2: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateIntersection';
  279. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  280. {
  281. * HIShapeCreateDifference()
  282. *
  283. * Discussion:
  284. * Creates a new immutable shape which is the difference of two
  285. * others. The second shape is subtracted from the first.
  286. *
  287. * Mac OS X threading:
  288. * Not thread safe
  289. *
  290. * Parameters:
  291. *
  292. * inShape1:
  293. * An existing HIShapeRef.
  294. *
  295. * inShape2:
  296. * An existing HIShapeRef.
  297. *
  298. * Result:
  299. * A new immutable HIShapeRef.
  300. *
  301. * Availability:
  302. * Mac OS X: in version 10.2 and later in Carbon.framework
  303. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  304. * Non-Carbon CFM: not available
  305. }
  306. function HIShapeCreateDifference( inShape1: HIShapeRef; inShape2: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateDifference';
  307. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  308. {
  309. * HIShapeCreateUnion()
  310. *
  311. * Discussion:
  312. * Creates a new immutable shape which is the union of two others.
  313. *
  314. * Mac OS X threading:
  315. * Not thread safe
  316. *
  317. * Parameters:
  318. *
  319. * inShape1:
  320. * An existing HIShapeRef.
  321. *
  322. * inShape2:
  323. * An existing HIShapeRef.
  324. *
  325. * Result:
  326. * A new immutable HIShapeRef.
  327. *
  328. * Availability:
  329. * Mac OS X: in version 10.2 and later in Carbon.framework
  330. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  331. * Non-Carbon CFM: not available
  332. }
  333. function HIShapeCreateUnion( inShape1: HIShapeRef; inShape2: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateUnion';
  334. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  335. {
  336. * HIShapeIsEmpty()
  337. *
  338. * Discussion:
  339. * Returns true if the given HIShapeRef is empty, i.e. its area is
  340. * empty.
  341. *
  342. * Mac OS X threading:
  343. * Not thread safe
  344. *
  345. * Parameters:
  346. *
  347. * inShape:
  348. * The existing HIShapeRef you wish to test.
  349. *
  350. * Result:
  351. * A boolean result.
  352. *
  353. * Availability:
  354. * Mac OS X: in version 10.2 and later in Carbon.framework
  355. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  356. * Non-Carbon CFM: not available
  357. }
  358. function HIShapeIsEmpty( inShape: HIShapeRef ): Boolean; external name '_HIShapeIsEmpty';
  359. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  360. {
  361. * HIShapeIsRectangular()
  362. *
  363. * Discussion:
  364. * Returns true if the given HIShapeRef is rectangular.
  365. *
  366. * Mac OS X threading:
  367. * Not thread safe
  368. *
  369. * Parameters:
  370. *
  371. * inShape:
  372. * The existing HIShapeRef you wish to test.
  373. *
  374. * Result:
  375. * A boolean result.
  376. *
  377. * Availability:
  378. * Mac OS X: in version 10.2 and later in Carbon.framework
  379. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  380. * Non-Carbon CFM: not available
  381. }
  382. function HIShapeIsRectangular( inShape: HIShapeRef ): Boolean; external name '_HIShapeIsRectangular';
  383. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  384. {
  385. * HIShapeContainsPoint()
  386. *
  387. * Discussion:
  388. * Returns true if the given HIShapeRef contains the point passed in.
  389. *
  390. * Mac OS X threading:
  391. * Not thread safe
  392. *
  393. * Parameters:
  394. *
  395. * inShape:
  396. * An existing HIShapeRef.
  397. *
  398. * inPoint:
  399. * The point to check.
  400. *
  401. * Result:
  402. * A boolean result.
  403. *
  404. * Availability:
  405. * Mac OS X: in version 10.2 and later in Carbon.framework
  406. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  407. * Non-Carbon CFM: not available
  408. }
  409. function HIShapeContainsPoint( inShape: HIShapeRef; const (*var*) inPoint: HIPoint ): Boolean; external name '_HIShapeContainsPoint';
  410. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  411. {
  412. * HIShapeIntersectsRect()
  413. *
  414. * Discussion:
  415. * Returns true if the given HIShapeRef intersects the rect passed
  416. * in.
  417. *
  418. * Mac OS X threading:
  419. * Not thread safe
  420. *
  421. * Parameters:
  422. *
  423. * inShape:
  424. * An existing HIShapeRef.
  425. *
  426. * inRect:
  427. * The rectangle to check.
  428. *
  429. * Result:
  430. * A boolean result.
  431. *
  432. * Availability:
  433. * Mac OS X: in version 10.4 and later in Carbon.framework
  434. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  435. * Non-Carbon CFM: not available
  436. }
  437. function HIShapeIntersectsRect( inShape: HIShapeRef; const (*var*) inRect: HIRect ): Boolean; external name '_HIShapeIntersectsRect';
  438. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  439. {
  440. * HIShapeGetBounds()
  441. *
  442. * Discussion:
  443. * Returns the bounding rectangle of a given HIShapeRef.
  444. *
  445. * Mac OS X threading:
  446. * Not thread safe
  447. *
  448. * Parameters:
  449. *
  450. * inShape:
  451. * An existing HIShapeRef.
  452. *
  453. * outRect:
  454. * Receives the bounding rectangle.
  455. *
  456. * Result:
  457. * A pointer to the rectangle you passed in, for convenience.
  458. *
  459. * Availability:
  460. * Mac OS X: in version 10.2 and later in Carbon.framework
  461. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  462. * Non-Carbon CFM: not available
  463. }
  464. function HIShapeGetBounds( inShape: HIShapeRef; var outRect: HIRect ): HIRectPtr; external name '_HIShapeGetBounds';
  465. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  466. {
  467. * HIShapeGetAsQDRgn()
  468. *
  469. * Discussion:
  470. * Changes a given Quickdraw region handle to have the same shape as
  471. * a given HIShapeRef. Essentially you are converting an HIShapeRef
  472. * into a RgnHandle. This conversion may lose fidelity depending on
  473. * how the shape was created originally.
  474. *
  475. * Mac OS X threading:
  476. * Not thread safe
  477. *
  478. * Parameters:
  479. *
  480. * inShape:
  481. * An existing HIShapeRef.
  482. *
  483. * outRgn:
  484. * An existing region to change.
  485. *
  486. * Result:
  487. * An operating system status code.
  488. *
  489. * Availability:
  490. * Mac OS X: in version 10.2 and later in Carbon.framework
  491. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  492. * Non-Carbon CFM: not available
  493. }
  494. function HIShapeGetAsQDRgn( inShape: HIShapeRef; outRgn: RgnHandle ): OSStatus; external name '_HIShapeGetAsQDRgn';
  495. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  496. {
  497. * HIShapeReplacePathInCGContext()
  498. *
  499. * Discussion:
  500. * Given an HIShapeRef and a CGContextRef, make the current path in
  501. * the context represent the shape. You might use this to clip to a
  502. * shape, for example. You could call this function and then
  503. * immediately call CGContextClip.
  504. *
  505. * Mac OS X threading:
  506. * Not thread safe
  507. *
  508. * Parameters:
  509. *
  510. * inShape:
  511. * An existing HIShapeRef.
  512. *
  513. * inContext:
  514. * The context to apply the shape to.
  515. *
  516. * Result:
  517. * An operating system status code.
  518. *
  519. * Availability:
  520. * Mac OS X: in version 10.2 and later in Carbon.framework
  521. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  522. * Non-Carbon CFM: not available
  523. }
  524. function HIShapeReplacePathInCGContext( inShape: HIShapeRef; inContext: CGContextRef ): OSStatus; external name '_HIShapeReplacePathInCGContext';
  525. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  526. {
  527. * HIShapeSetQDClip()
  528. *
  529. * Discussion:
  530. * Given an HIShapeRef and a Quickdraw port, set the current clip in
  531. * the port to the shape.
  532. *
  533. * Mac OS X threading:
  534. * Not thread safe
  535. *
  536. * Parameters:
  537. *
  538. * inShape:
  539. * An existing HIShapeRef.
  540. *
  541. * inPort:
  542. * The port to set the clip for.
  543. *
  544. * Result:
  545. * An operating system status code.
  546. *
  547. * Availability:
  548. * Mac OS X: in version 10.2 and later in Carbon.framework
  549. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  550. * Non-Carbon CFM: not available
  551. }
  552. function HIShapeSetQDClip( inShape: HIShapeRef; inPort: CGrafPtr ): OSStatus; external name '_HIShapeSetQDClip';
  553. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  554. {======================================================================================}
  555. { MUTABLE FUNCTIONS }
  556. {======================================================================================}
  557. {
  558. * HIShapeCreateMutable()
  559. *
  560. * Discussion:
  561. * Creates a new, mutable, empty shape.
  562. *
  563. * Mac OS X threading:
  564. * Not thread safe
  565. *
  566. * Result:
  567. * A mutable shape reference.
  568. *
  569. * Availability:
  570. * Mac OS X: in version 10.2 and later in Carbon.framework
  571. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  572. * Non-Carbon CFM: not available
  573. }
  574. function HIShapeCreateMutable: HIMutableShapeRef; external name '_HIShapeCreateMutable';
  575. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  576. {
  577. * HIShapeCreateMutableCopy()
  578. *
  579. * Discussion:
  580. * Given an existing HIShapeRef, creates a new mutable copy.
  581. *
  582. * Mac OS X threading:
  583. * Not thread safe
  584. *
  585. * Parameters:
  586. *
  587. * inOrig:
  588. * The shape to copy.
  589. *
  590. * Result:
  591. * A mutable shape reference.
  592. *
  593. * Availability:
  594. * Mac OS X: in version 10.2 and later in Carbon.framework
  595. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  596. * Non-Carbon CFM: not available
  597. }
  598. function HIShapeCreateMutableCopy( inOrig: HIShapeRef ): HIMutableShapeRef; external name '_HIShapeCreateMutableCopy';
  599. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  600. {
  601. * HIShapeSetEmpty()
  602. *
  603. * Discussion:
  604. * Sets a mutable shape to be an empty shape.
  605. *
  606. * Mac OS X threading:
  607. * Not thread safe
  608. *
  609. * Parameters:
  610. *
  611. * inShape:
  612. * The shape to empty.
  613. *
  614. * Result:
  615. * An operating system status code.
  616. *
  617. * Availability:
  618. * Mac OS X: in version 10.2 and later in Carbon.framework
  619. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  620. * Non-Carbon CFM: not available
  621. }
  622. function HIShapeSetEmpty( inShape: HIMutableShapeRef ): OSStatus; external name '_HIShapeSetEmpty';
  623. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  624. {
  625. * HIShapeIntersect()
  626. *
  627. * Discussion:
  628. * Takes two shapes and sets a third to be their intersection.
  629. *
  630. * Mac OS X threading:
  631. * Not thread safe
  632. *
  633. * Parameters:
  634. *
  635. * inShape1:
  636. * The first shape.
  637. *
  638. * inShape2:
  639. * The second shape.
  640. *
  641. * outResult:
  642. * The shape to receive the result of the intersection. This can
  643. * be one of the source shapes.
  644. *
  645. * Result:
  646. * An operating system status code.
  647. *
  648. * Availability:
  649. * Mac OS X: in version 10.2 and later in Carbon.framework
  650. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  651. * Non-Carbon CFM: not available
  652. }
  653. function HIShapeIntersect( inShape1: HIShapeRef; inShape2: HIShapeRef; outResult: HIMutableShapeRef ): OSStatus; external name '_HIShapeIntersect';
  654. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  655. {
  656. * HIShapeDifference()
  657. *
  658. * Discussion:
  659. * Takes two shapes and sets a third to be their difference. The
  660. * second shape is subtracted from the first.
  661. *
  662. * Mac OS X threading:
  663. * Not thread safe
  664. *
  665. * Parameters:
  666. *
  667. * inShape1:
  668. * The first shape.
  669. *
  670. * inShape2:
  671. * The second shape.
  672. *
  673. * outResult:
  674. * The shape to receive the result of the intersection. This can
  675. * be one of the source shapes.
  676. *
  677. * Result:
  678. * An operating system status code.
  679. *
  680. * Availability:
  681. * Mac OS X: in version 10.2 and later in Carbon.framework
  682. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  683. * Non-Carbon CFM: not available
  684. }
  685. function HIShapeDifference( inShape1: HIShapeRef; inShape2: HIShapeRef; outResult: HIMutableShapeRef ): OSStatus; external name '_HIShapeDifference';
  686. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  687. {
  688. * HIShapeUnion()
  689. *
  690. * Discussion:
  691. * Takes two shapes and sets a third to be their union.
  692. *
  693. * Mac OS X threading:
  694. * Not thread safe
  695. *
  696. * Parameters:
  697. *
  698. * inShape1:
  699. * The first shape.
  700. *
  701. * inShape2:
  702. * The second shape.
  703. *
  704. * outResult:
  705. * The shape to receive the result of the union. This can be one
  706. * of the source shapes.
  707. *
  708. * Result:
  709. * An operating system status code.
  710. *
  711. * Availability:
  712. * Mac OS X: in version 10.2 and later in Carbon.framework
  713. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  714. * Non-Carbon CFM: not available
  715. }
  716. function HIShapeUnion( inShape1: HIShapeRef; inShape2: HIShapeRef; outResult: HIMutableShapeRef ): OSStatus; external name '_HIShapeUnion';
  717. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  718. {
  719. * HIShapeOffset()
  720. *
  721. * Discussion:
  722. * Offsets a shape by some delta.
  723. *
  724. * Mac OS X threading:
  725. * Not thread safe
  726. *
  727. * Parameters:
  728. *
  729. * inShape:
  730. * The shape to offset.
  731. *
  732. * inDX:
  733. * The delta to move the shape on the X axis.
  734. *
  735. * inDY:
  736. * The delta to move the shape on the Y axis.
  737. *
  738. * Result:
  739. * An operating system status code.
  740. *
  741. * Availability:
  742. * Mac OS X: in version 10.2 and later in Carbon.framework
  743. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  744. * Non-Carbon CFM: not available
  745. }
  746. function HIShapeOffset( inShape: HIMutableShapeRef; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIShapeOffset';
  747. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  748. end.