Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2376 lines
62 KiB

  1. /*
  2. File: HIView.h
  3. Contains: HIView routines
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 2001-2002 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __HIVIEW__
  11. #define __HIVIEW__
  12. #ifndef __CONTROLS__
  13. #include <Controls.h>
  14. #endif
  15. #ifndef __CARBONEVENTS__
  16. #include <CarbonEvents.h>
  17. #endif
  18. #if PRAGMA_ONCE
  19. #pragma once
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #if PRAGMA_IMPORT
  25. #pragma import on
  26. #endif
  27. #if PRAGMA_STRUCT_ALIGN
  28. #pragma options align=mac68k
  29. #elif PRAGMA_STRUCT_PACKPUSH
  30. #pragma pack(push, 2)
  31. #elif PRAGMA_STRUCT_PACK
  32. #pragma pack(2)
  33. #endif
  34. typedef ControlRef HIViewRef;
  35. typedef ControlID HIViewID;
  36. typedef ControlPartCode HIViewPartCode;
  37. /*
  38. * kHIViewWindowContentID
  39. *
  40. * Discussion:
  41. * The standard view ID for the content view of a window.
  42. *
  43. * Availability:
  44. * Non-Carbon CFM: not available
  45. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  46. * Mac OS X: in version 10.2 and later
  47. */
  48. extern const HIViewID kHIViewWindowContentID;
  49. /*
  50. * kHIViewWindowGrowBoxID
  51. *
  52. * Discussion:
  53. * The standard view ID for the grow box view of a window. Not all
  54. * windows have grow boxes, so be aware that you might not find this
  55. * view if you look for it.
  56. *
  57. * Availability:
  58. * Non-Carbon CFM: not available
  59. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  60. * Mac OS X: in version 10.2 and later
  61. */
  62. extern const HIViewID kHIViewWindowGrowBoxID;
  63. /*
  64. * Discussion:
  65. * HIViewZOrderOp
  66. */
  67. enum {
  68. /*
  69. * Indicates we wish to order a view above another view.
  70. */
  71. kHIViewZOrderAbove = 1,
  72. /*
  73. * Indicates we wish to order a view below another view.
  74. */
  75. kHIViewZOrderBelow = 2
  76. };
  77. typedef UInt32 HIViewZOrderOp;
  78. /*==============================================================================*/
  79. /* CONTROL ATTRIBUTES */
  80. /*==============================================================================*/
  81. /*
  82. * Discussion:
  83. * View Attributes
  84. */
  85. enum {
  86. /*
  87. * When set, the control will send the command it generates to the
  88. * user focus and propagate as it would naturally from there. The
  89. * default is to send the command to itself and then to its parent
  90. * and so forth.
  91. */
  92. kHIViewSendCommandToUserFocus = (1 << 0)
  93. };
  94. /*==============================================================================*/
  95. /* HIOBJECT SUPPORT */
  96. /*==============================================================================*/
  97. /* The HIObject class ID for the HIView class. */
  98. #define kHIViewClassID CFSTR("com.apple.hiview")
  99. /*==============================================================================*/
  100. /* EMBEDDING */
  101. /*==============================================================================*/
  102. /*
  103. * HIViewGetRoot()
  104. *
  105. * Discussion:
  106. * Returns the root view for a window.
  107. *
  108. * Parameters:
  109. *
  110. * inWindow:
  111. * The window to get the root for.
  112. *
  113. * Result:
  114. * The root view for the window, or NULL if an invalid window is
  115. * passed.
  116. *
  117. * Availability:
  118. * Non-Carbon CFM: not available
  119. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  120. * Mac OS X: in version 10.2 and later
  121. */
  122. EXTERN_API_C( HIViewRef )
  123. HIViewGetRoot(WindowRef inWindow);
  124. /*
  125. * HIViewAddSubview()
  126. *
  127. * Discussion:
  128. * Adds a subview to the given parent. The new subview is added to
  129. * the front of the list of subviews (i.e it is made topmost).
  130. *
  131. * Parameters:
  132. *
  133. * inParent:
  134. * The view which will receive the new subview.
  135. *
  136. * inNewChild:
  137. * The subview being added.
  138. *
  139. * Result:
  140. * An operating system result code.
  141. *
  142. * Availability:
  143. * Non-Carbon CFM: not available
  144. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  145. * Mac OS X: in version 10.2 and later
  146. */
  147. EXTERN_API_C( OSStatus )
  148. HIViewAddSubview(
  149. HIViewRef inParent,
  150. HIViewRef inNewChild);
  151. /*
  152. * HIViewRemoveFromSuperview()
  153. *
  154. * Discussion:
  155. * Removes a view from its parent.
  156. *
  157. * Parameters:
  158. *
  159. * inView:
  160. * The view to remove.
  161. *
  162. * Result:
  163. * An operating system result code.
  164. *
  165. * Availability:
  166. * Non-Carbon CFM: not available
  167. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  168. * Mac OS X: in version 10.2 and later
  169. */
  170. EXTERN_API_C( OSStatus )
  171. HIViewRemoveFromSuperview(HIViewRef inView);
  172. /*
  173. * HIViewGetSuperview()
  174. *
  175. * Discussion:
  176. * Returns a view's parent view.
  177. *
  178. * Parameters:
  179. *
  180. * inView:
  181. * The view whose parent you are interested in getting.
  182. *
  183. * Result:
  184. * An HIView reference, or NULL if this view has no parent or is
  185. * invalid.
  186. *
  187. * Availability:
  188. * Non-Carbon CFM: not available
  189. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  190. * Mac OS X: in version 10.2 and later
  191. */
  192. EXTERN_API_C( HIViewRef )
  193. HIViewGetSuperview(HIViewRef inView);
  194. /*
  195. * HIViewGetFirstSubview()
  196. *
  197. * Discussion:
  198. * Returns the first subview of a container. The first subview is
  199. * the topmost subview in z-order.
  200. *
  201. * Parameters:
  202. *
  203. * inView:
  204. * The view whose subview you are fetching.
  205. *
  206. * Result:
  207. * An HIView reference, or NULL if this view has no subviews or is
  208. * invalid.
  209. *
  210. * Availability:
  211. * Non-Carbon CFM: not available
  212. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  213. * Mac OS X: in version 10.2 and later
  214. */
  215. EXTERN_API_C( HIViewRef )
  216. HIViewGetFirstSubview(HIViewRef inView);
  217. /*
  218. * HIViewGetLastSubview()
  219. *
  220. * Discussion:
  221. * Returns the last subview of a container. The last subview is the
  222. * bottommost subview in z-order.
  223. *
  224. * Parameters:
  225. *
  226. * inView:
  227. * The view whose subview you are fetching.
  228. *
  229. * Result:
  230. * An HIView reference, or NULL if this view has no subviews or is
  231. * invalid.
  232. *
  233. * Availability:
  234. * Non-Carbon CFM: not available
  235. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  236. * Mac OS X: in version 10.2 and later
  237. */
  238. EXTERN_API_C( HIViewRef )
  239. HIViewGetLastSubview(HIViewRef inView);
  240. /*
  241. * HIViewGetNextView()
  242. *
  243. * Discussion:
  244. * Returns the next view after the one given, in z-order.
  245. *
  246. * Parameters:
  247. *
  248. * inView:
  249. * The view to use as reference.
  250. *
  251. * Result:
  252. * An HIView reference, or NULL if this view has no view behind it
  253. * or is invalid.
  254. *
  255. * Availability:
  256. * Non-Carbon CFM: not available
  257. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  258. * Mac OS X: in version 10.2 and later
  259. */
  260. EXTERN_API_C( HIViewRef )
  261. HIViewGetNextView(HIViewRef inView);
  262. /*
  263. * HIViewGetPreviousView()
  264. *
  265. * Discussion:
  266. * Returns the previous view before the one given, in z-order.
  267. *
  268. * Parameters:
  269. *
  270. * inView:
  271. * The view to use as reference.
  272. *
  273. * Result:
  274. * An HIView reference, or NULL if this view has no view in front of
  275. * it or is invalid.
  276. *
  277. * Availability:
  278. * Non-Carbon CFM: not available
  279. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  280. * Mac OS X: in version 10.2 and later
  281. */
  282. EXTERN_API_C( HIViewRef )
  283. HIViewGetPreviousView(HIViewRef inView);
  284. /*
  285. * HIViewSetZOrder()
  286. *
  287. * Discussion:
  288. * Allows you to change the front-to-back ordering of sibling views.
  289. *
  290. * Parameters:
  291. *
  292. * inView:
  293. * The view whose Z-order you wish to change.
  294. *
  295. * inOp:
  296. * Indicates to order inView above or below inOther.
  297. *
  298. * inOther:
  299. * Another optional view to use as a reference. You can pass NULL
  300. * to mean an absolute position. For example, passing
  301. * kHIViewZOrderAbove and NULL will move a view to the front of
  302. * all of its siblings. Likewise, passing kHIViewZOrderBelow and
  303. * NULL will move it to the back.
  304. *
  305. * Result:
  306. * An operating system result code.
  307. *
  308. * Availability:
  309. * Non-Carbon CFM: not available
  310. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  311. * Mac OS X: in version 10.2 and later
  312. */
  313. EXTERN_API_C( OSStatus )
  314. HIViewSetZOrder(
  315. HIViewRef inView,
  316. HIViewZOrderOp inOp,
  317. HIViewRef inOther); /* can be NULL */
  318. /*==============================================================================*/
  319. /* VISIBILITY */
  320. /*==============================================================================*/
  321. /*
  322. * HIViewSetVisible()
  323. *
  324. * Discussion:
  325. * Hides or shows a view. Marks the area the view will occupy or
  326. * used to occupy as needing to be redrawn later.
  327. *
  328. * Parameters:
  329. *
  330. * inView:
  331. * The view to hide or show.
  332. *
  333. * inVisible:
  334. * A boolean value which indicates whether you wish to hide the
  335. * view (false) or show the view (true).
  336. *
  337. * Result:
  338. * An operating system result code.
  339. *
  340. * Availability:
  341. * Non-Carbon CFM: not available
  342. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  343. * Mac OS X: in version 10.2 and later
  344. */
  345. EXTERN_API_C( OSStatus )
  346. HIViewSetVisible(
  347. HIViewRef inView,
  348. Boolean inVisible);
  349. /*
  350. * HIViewIsVisible()
  351. *
  352. * Discussion:
  353. * Returns whether a view is visible.
  354. *
  355. * Parameters:
  356. *
  357. * inView:
  358. * The view whose visibility you wish to determine.
  359. *
  360. * Result:
  361. * A boolean value indicating whether the view is visible (true) or
  362. * hidden (false).
  363. *
  364. * Availability:
  365. * Non-Carbon CFM: not available
  366. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  367. * Mac OS X: in version 10.2 and later
  368. */
  369. EXTERN_API_C( Boolean )
  370. HIViewIsVisible(HIViewRef inView);
  371. /*==============================================================================*/
  372. /* POSITIONING */
  373. /*==============================================================================*/
  374. /*
  375. * HIViewGetBounds()
  376. *
  377. * Discussion:
  378. * Returns the local bounds of a view. The local bounds are the
  379. * coordinate system that is completely view-relative. A view's top
  380. * left coordinate starts out at 0, 0. Most operations are done in
  381. * these local coordinates. Moving a view is done via the frame
  382. * instead.
  383. *
  384. * Parameters:
  385. *
  386. * inView:
  387. * The view whose bounds you wish to determine.
  388. *
  389. * outRect:
  390. * The local bounds of the view.
  391. *
  392. * Result:
  393. * An operating system result code.
  394. *
  395. * Availability:
  396. * Non-Carbon CFM: not available
  397. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  398. * Mac OS X: in version 10.2 and later
  399. */
  400. EXTERN_API_C( OSStatus )
  401. HIViewGetBounds(
  402. HIViewRef inView,
  403. HIRect * outRect);
  404. /*
  405. * HIViewGetFrame()
  406. *
  407. * Discussion:
  408. * Returns the frame of a view. The frame is the bounds of a view
  409. * relative to its parent's local coordinate system.
  410. *
  411. * Parameters:
  412. *
  413. * inView:
  414. * The view whose frame you wish to determine.
  415. *
  416. * outRect:
  417. * The frame of the view.
  418. *
  419. * Result:
  420. * An operating system result code.
  421. *
  422. * Availability:
  423. * Non-Carbon CFM: not available
  424. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  425. * Mac OS X: in version 10.2 and later
  426. */
  427. EXTERN_API_C( OSStatus )
  428. HIViewGetFrame(
  429. HIViewRef inView,
  430. HIRect * outRect);
  431. /*
  432. * HIViewSetFrame()
  433. *
  434. * Discussion:
  435. * Sets the frame of a view. This effectively moves the view within
  436. * its parent. It also marks the view (and anything that was exposed
  437. * behind it) to be redrawn.
  438. *
  439. * Parameters:
  440. *
  441. * inView:
  442. * The view whose frame you wish to change.
  443. *
  444. * inRect:
  445. * The new frame of the view.
  446. *
  447. * Result:
  448. * An operating system result code.
  449. *
  450. * Availability:
  451. * Non-Carbon CFM: not available
  452. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  453. * Mac OS X: in version 10.2 and later
  454. */
  455. EXTERN_API_C( OSStatus )
  456. HIViewSetFrame(
  457. HIViewRef inView,
  458. const HIRect * inRect);
  459. /*
  460. * HIViewMoveBy()
  461. *
  462. * Discussion:
  463. * Moves a view by a certain distance, relative to its current
  464. * location. This affects a view's frame, but not its bounds.
  465. *
  466. * Parameters:
  467. *
  468. * inView:
  469. * The view you wish to move.
  470. *
  471. * inDX:
  472. * The horizontal distance to move the view. Negative values move
  473. * the view to the left, positive values to the right.
  474. *
  475. * inDY:
  476. * The vertical distance to move the view. Negative values move
  477. * the view upward, positive values downward.
  478. *
  479. * Result:
  480. * An operating system result code.
  481. *
  482. * Availability:
  483. * Non-Carbon CFM: not available
  484. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  485. * Mac OS X: in version 10.2 and later
  486. */
  487. EXTERN_API_C( OSStatus )
  488. HIViewMoveBy(
  489. HIViewRef inView,
  490. float inDX,
  491. float inDY);
  492. /*
  493. * HIViewPlaceInSuperviewAt()
  494. *
  495. * Discussion:
  496. * Places a view at an absolute location within its parent. This
  497. * affects the view's frame, but not its bounds.
  498. *
  499. * Parameters:
  500. *
  501. * inView:
  502. * The view you wish to position.
  503. *
  504. * inX:
  505. * The absolute horizontal coordinate at which to position the
  506. * view.
  507. *
  508. * inY:
  509. * The absolute vertical coordinate at which to position the view.
  510. *
  511. * Result:
  512. * An operating system result code.
  513. *
  514. * Availability:
  515. * Non-Carbon CFM: not available
  516. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  517. * Mac OS X: in version 10.2 and later
  518. */
  519. EXTERN_API_C( OSStatus )
  520. HIViewPlaceInSuperviewAt(
  521. HIViewRef inView,
  522. float inX,
  523. float inY);
  524. /*
  525. * HIViewReshapeStructure()
  526. *
  527. * Discussion:
  528. * This is for use by custom views. If a view decides that its
  529. * structure will change shape, it should call this. This tells the
  530. * Toolbox to recalc things and invalidate as appropriate. You might
  531. * use this when gaining/losing a focus ring, for example.
  532. *
  533. * Parameters:
  534. *
  535. * inView:
  536. * The view to reshape and invalidate.
  537. *
  538. * Result:
  539. * An operating system result code.
  540. *
  541. * Availability:
  542. * Non-Carbon CFM: not available
  543. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  544. * Mac OS X: in version 10.2 and later
  545. */
  546. EXTERN_API_C( OSStatus )
  547. HIViewReshapeStructure(HIViewRef inView);
  548. /*==============================================================================*/
  549. /* HIT TESTING/EVENT HANDLING */
  550. /*==============================================================================*/
  551. /*
  552. * HIViewGetViewForMouseEvent()
  553. *
  554. * Discussion:
  555. * Returns the appropriate view to handle a mouse event. This is a
  556. * little higher-level than GetDeep/ShallowSubviewHit. This routine
  557. * will find the deepest view that should handle the mouse event,
  558. * but along the way, it sends Carbon Events to each view asking it
  559. * to return the appropriate subview. This allows parent views to
  560. * catch clicks on their subviews. This is the recommended function
  561. * to use before processing mouse events. Using one of the more
  562. * primitive functions may result in an undefined behaviour.
  563. *
  564. * Parameters:
  565. *
  566. * inView:
  567. * The view to start from. You should pass the window's root view.
  568. *
  569. * inEvent:
  570. * The mouse event in question.
  571. *
  572. * outView:
  573. * The view that the mouse event should be sent to.
  574. *
  575. * Result:
  576. * An operating system result code.
  577. *
  578. * Availability:
  579. * Non-Carbon CFM: not available
  580. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  581. * Mac OS X: in version 10.2 and later
  582. */
  583. EXTERN_API_C( OSStatus )
  584. HIViewGetViewForMouseEvent(
  585. HIViewRef inView,
  586. EventRef inEvent,
  587. HIViewRef * outView);
  588. /*
  589. * HIViewClick()
  590. *
  591. * Discussion:
  592. * After a successful call to HIViewGetViewForMouseEvent for a mouse
  593. * down event, you should call this function to have the view handle
  594. * the click.
  595. *
  596. * Parameters:
  597. *
  598. * inView:
  599. * The view to handle the event.
  600. *
  601. * inEvent:
  602. * The mouse event to handle.
  603. *
  604. * Result:
  605. * An operating system result code.
  606. *
  607. * Availability:
  608. * Non-Carbon CFM: not available
  609. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  610. * Mac OS X: in version 10.2 and later
  611. */
  612. EXTERN_API_C( OSStatus )
  613. HIViewClick(
  614. HIViewRef inView,
  615. EventRef inEvent);
  616. /*
  617. * HIViewSimulateClick()
  618. *
  619. * Discussion:
  620. * This function is used to simulate a mouse click on a given view.
  621. *
  622. * Parameters:
  623. *
  624. * inView:
  625. * The view to test the part hit.
  626. *
  627. * inPartToClick:
  628. * The part the view should consider to be clicked.
  629. *
  630. * inModifiers:
  631. * The modifiers the view can consider for its click action.
  632. *
  633. * outPartClicked:
  634. * The part that was hit, can be kControlNoPart if no action
  635. * occurred.
  636. *
  637. * Result:
  638. * An operating system result code.
  639. *
  640. * Availability:
  641. * Non-Carbon CFM: not available
  642. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  643. * Mac OS X: in version 10.2 and later
  644. */
  645. EXTERN_API_C( OSStatus )
  646. HIViewSimulateClick(
  647. HIViewRef inView,
  648. HIViewPartCode inPartToClick,
  649. UInt32 inModifiers,
  650. ControlPartCode * outPartClicked);
  651. /*
  652. * HIViewGetPartHit()
  653. *
  654. * Discussion:
  655. * Given a view, and a view-relative point, this function returns
  656. * the part code hit as determined by the view.
  657. *
  658. * Parameters:
  659. *
  660. * inView:
  661. * The view to test the part hit.
  662. *
  663. * inPoint:
  664. * The view-relative point to use.
  665. *
  666. * outPart:
  667. * The part hit by inPoint.
  668. *
  669. * Result:
  670. * An operating system result code.
  671. *
  672. * Availability:
  673. * Non-Carbon CFM: not available
  674. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  675. * Mac OS X: in version 10.2 and later
  676. */
  677. EXTERN_API_C( OSStatus )
  678. HIViewGetPartHit(
  679. HIViewRef inView,
  680. const HIPoint * inPoint,
  681. HIViewPartCode * outPart);
  682. /*
  683. * HIViewGetSubviewHit()
  684. *
  685. * Discussion:
  686. * Returns the child of the given view hit by the point passed in.
  687. * This is more primitive than using HIViewGetViewForMouseEvent, and
  688. * should be used only in non-event-handling cases.
  689. *
  690. * Parameters:
  691. *
  692. * inView:
  693. * The view you wish to position.
  694. *
  695. * inPoint:
  696. * The mouse coordinate to use. This is passed in the local
  697. * coordinate system of inView.
  698. *
  699. * inDeep:
  700. * Pass true to find the deepest child hit, false to go only one
  701. * level deep (just check direct children of inView).
  702. *
  703. * outView:
  704. * The view hit by inPoint, or NULL if no subview was hit.
  705. *
  706. * Result:
  707. * An operating system result code.
  708. *
  709. * Availability:
  710. * Non-Carbon CFM: not available
  711. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  712. * Mac OS X: in version 10.2 and later
  713. */
  714. EXTERN_API_C( OSStatus )
  715. HIViewGetSubviewHit(
  716. HIViewRef inView,
  717. const HIPoint * inPoint,
  718. Boolean inDeep,
  719. HIViewRef * outView);
  720. /*==============================================================================*/
  721. /* DISPLAY */
  722. /*==============================================================================*/
  723. /*
  724. * HIViewGetNeedsDisplay()
  725. *
  726. * Discussion:
  727. * Returns true if the view passed in or any subview of it requires
  728. * redrawing (i.e. part of it has been invalidated).
  729. *
  730. * Parameters:
  731. *
  732. * inView:
  733. * The view to inspect.
  734. *
  735. * Result:
  736. * A boolean result code.
  737. *
  738. * Availability:
  739. * Non-Carbon CFM: not available
  740. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  741. * Mac OS X: in version 10.2 and later
  742. */
  743. EXTERN_API_C( Boolean )
  744. HIViewGetNeedsDisplay(HIViewRef inView);
  745. /*
  746. * HIViewSetNeedsDisplay()
  747. *
  748. * Discussion:
  749. * Marks a view as needing to be completely redrawn, or completely
  750. * valid.
  751. *
  752. * Parameters:
  753. *
  754. * inView:
  755. * The view to mark dirty.
  756. *
  757. * inNeedsDisplay:
  758. * A boolean which indicates whether inView needs to be redrawn or
  759. * not.
  760. *
  761. * Result:
  762. * An operating system result code.
  763. *
  764. * Availability:
  765. * Non-Carbon CFM: not available
  766. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  767. * Mac OS X: in version 10.2 and later
  768. */
  769. EXTERN_API_C( OSStatus )
  770. HIViewSetNeedsDisplay(
  771. HIViewRef inView,
  772. Boolean inNeedsDisplay);
  773. /*
  774. * HIViewSetNeedsDisplayInRegion()
  775. *
  776. * Discussion:
  777. * Marks a portion of a view as needing to be redrawn, or valid.
  778. *
  779. * Parameters:
  780. *
  781. * inView:
  782. * The view to mark dirty.
  783. *
  784. * inRgn:
  785. * The region to mark dirty or clean.
  786. *
  787. * inNeedsDisplay:
  788. * A boolean which indicates whether or not inRgn should be added
  789. * to the display region or removed from it.
  790. *
  791. * Result:
  792. * An operating system result code.
  793. *
  794. * Availability:
  795. * Non-Carbon CFM: not available
  796. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  797. * Mac OS X: in version 10.2 and later
  798. */
  799. EXTERN_API_C( OSStatus )
  800. HIViewSetNeedsDisplayInRegion(
  801. HIViewRef inView,
  802. RgnHandle inRgn,
  803. Boolean inNeedsDisplay);
  804. /*
  805. * HIViewFlashDirtyArea()
  806. *
  807. * Discussion:
  808. * Debugging aid. Flashes the region which would be redrawn at the
  809. * next draw time for an entire window.
  810. *
  811. * Parameters:
  812. *
  813. * inWindow:
  814. * The window to flash the dirty region for.
  815. *
  816. * Result:
  817. * An operating system result code.
  818. *
  819. * Availability:
  820. * Non-Carbon CFM: not available
  821. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  822. * Mac OS X: in version 10.2 and later
  823. */
  824. EXTERN_API_C( OSStatus )
  825. HIViewFlashDirtyArea(WindowRef inWindow);
  826. /*
  827. * HIViewGetSizeConstraints()
  828. *
  829. * Discussion:
  830. * Return the minimum and maximum size for a control. A control must
  831. * respond to this protocol to get meaningful results. These sizes
  832. * can be used to help autoposition subviews, for example.
  833. *
  834. * Parameters:
  835. *
  836. * inView:
  837. * The view to inspect.
  838. *
  839. * outMinSize:
  840. * The minimum size the view can be.
  841. *
  842. * outMaxSize:
  843. * The maximum size the view can be.
  844. *
  845. * Result:
  846. * An operating system result code.
  847. *
  848. * Availability:
  849. * Non-Carbon CFM: not available
  850. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  851. * Mac OS X: in version 10.2 and later
  852. */
  853. EXTERN_API_C( OSStatus )
  854. HIViewGetSizeConstraints(
  855. HIViewRef inView,
  856. HISize * outMinSize,
  857. HISize * outMaxSize);
  858. /*==============================================================================*/
  859. /* COORDINATE SYSTEM CONVERSION */
  860. /*==============================================================================*/
  861. /*
  862. * HIViewConvertPoint()
  863. *
  864. * Discussion:
  865. * Converts a point from one view to another. Both views must have a
  866. * common ancestor, i.e. they must both be in the same window.
  867. *
  868. * Parameters:
  869. *
  870. * ioPoint:
  871. * The point to convert.
  872. *
  873. * inSourceView:
  874. * The view whose coordinate system ioPoint is starting out in.
  875. * You can pass NULL to indicate that ioPoint is a window-relative
  876. * point.
  877. *
  878. * inDestView:
  879. * The view whose coordinate system ioPoint should end up in. You
  880. * can pass NULL to indicate that ioPoint is a window-relative
  881. * point.
  882. *
  883. * Result:
  884. * An operating system result code.
  885. *
  886. * Availability:
  887. * Non-Carbon CFM: not available
  888. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  889. * Mac OS X: in version 10.2 and later
  890. */
  891. EXTERN_API_C( OSStatus )
  892. HIViewConvertPoint(
  893. HIPoint * ioPoint,
  894. HIViewRef inSourceView,
  895. HIViewRef inDestView);
  896. /*
  897. * HIViewConvertRect()
  898. *
  899. * Discussion:
  900. * Converts a rectangle from one view to another. Both views must
  901. * have a common ancestor, i.e. they must both be in the same window.
  902. *
  903. * Parameters:
  904. *
  905. * ioRect:
  906. * The rectangle to convert.
  907. *
  908. * inSourceView:
  909. * The view whose coordinate system ioRect is starting out in. You
  910. * can pass NULL to indicate that ioRect is a window-relative
  911. * rectangle.
  912. *
  913. * inDestView:
  914. * The view whose coordinate system ioRect should end up in. You
  915. * can pass NULL to indicate that ioRect is a window-relative
  916. * rectangle.
  917. *
  918. * Result:
  919. * An operating system result code.
  920. *
  921. * Availability:
  922. * Non-Carbon CFM: not available
  923. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  924. * Mac OS X: in version 10.2 and later
  925. */
  926. EXTERN_API_C( OSStatus )
  927. HIViewConvertRect(
  928. HIRect * ioRect,
  929. HIViewRef inSourceView,
  930. HIViewRef inDestView);
  931. /*
  932. * HIViewConvertRegion()
  933. *
  934. * Discussion:
  935. * Converts a region from one view to another. Both views must have
  936. * a common ancestor, i.e. they must both be in the same window.
  937. *
  938. * Parameters:
  939. *
  940. * ioRgn:
  941. * The region to convert.
  942. *
  943. * inSourceView:
  944. * The view whose coordinate system ioRgn is starting out in. You
  945. * can pass NULL to indicate that ioRgn is a window-relative
  946. * region.
  947. *
  948. * inDestView:
  949. * The view whose coordinate system ioRgn should end up in. You
  950. * can pass NULL to indicate that ioRgn is a window-relative
  951. * region.
  952. *
  953. * Result:
  954. * An operating system result code.
  955. *
  956. * Availability:
  957. * Non-Carbon CFM: not available
  958. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  959. * Mac OS X: in version 10.2 and later
  960. */
  961. EXTERN_API_C( OSStatus )
  962. HIViewConvertRegion(
  963. RgnHandle ioRgn,
  964. HIViewRef inSourceView,
  965. HIViewRef inDestView);
  966. /*
  967. * HIViewSetDrawingEnabled()
  968. *
  969. * Discussion:
  970. * Turns control drawing on or off. You can use this to ensure that
  971. * no drawing occurs wrt to the control. Even Draw1Control will not
  972. * draw! HIViewSetNeedsDisplay is also rendered useless when drawing
  973. * is off.
  974. *
  975. * Parameters:
  976. *
  977. * inView:
  978. * The view to enable or disable drawing for.
  979. *
  980. * inEnabled:
  981. * A boolean value indicating whether drawing should be on (true)
  982. * or off (false).
  983. *
  984. * Result:
  985. * An operating system result code.
  986. *
  987. * Availability:
  988. * Non-Carbon CFM: not available
  989. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  990. * Mac OS X: in version 10.2 and later
  991. */
  992. EXTERN_API_C( OSStatus )
  993. HIViewSetDrawingEnabled(
  994. HIViewRef inView,
  995. Boolean inEnabled);
  996. /*
  997. * HIViewIsDrawingEnabled()
  998. *
  999. * Discussion:
  1000. * Determines if drawing is currently enabled for a control.
  1001. *
  1002. * Parameters:
  1003. *
  1004. * inView:
  1005. * The view to get the drawing state for.
  1006. *
  1007. * Result:
  1008. * A boolean value indicating whether drawing is on (true) or off
  1009. * (false).
  1010. *
  1011. * Availability:
  1012. * Non-Carbon CFM: not available
  1013. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1014. * Mac OS X: in version 10.2 and later
  1015. */
  1016. EXTERN_API_C( Boolean )
  1017. HIViewIsDrawingEnabled(HIViewRef inView);
  1018. /*
  1019. * HIViewScrollRect()
  1020. *
  1021. * Discussion:
  1022. * Scrolls a view's contents, or a portion thereof. This will
  1023. * actually blit the contents of the view as appropriate to scroll,
  1024. * and then invalidate those portions which need to be redrawn. Be
  1025. * warned that this is a raw bit scroll. Anything that might overlap
  1026. * the target view will get thrashed as well.
  1027. *
  1028. * Parameters:
  1029. *
  1030. * inView:
  1031. * The view to scroll.
  1032. *
  1033. * inRect:
  1034. * The rect to scroll. Pass NULL to mean the entire view. The rect
  1035. * passed cannot be bigger than the view's bounds. It must be in
  1036. * the local coordinate system of the view.
  1037. *
  1038. * inDX:
  1039. * The horizontal distance to scroll. Positive values shift to the
  1040. * right, negative values shift to the left.
  1041. *
  1042. * inDY:
  1043. * The vertical distance to scroll. Positive values shift
  1044. * downward, negative values shift upward.
  1045. *
  1046. * Result:
  1047. * An operating system result code.
  1048. *
  1049. * Availability:
  1050. * Non-Carbon CFM: not available
  1051. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1052. * Mac OS X: in version 10.2 and later
  1053. */
  1054. EXTERN_API_C( OSStatus )
  1055. HIViewScrollRect(
  1056. HIViewRef inView,
  1057. const HIRect * inRect, /* can be NULL */
  1058. float inDX,
  1059. float inDY);
  1060. /*
  1061. * HIViewSetBoundsOrigin()
  1062. *
  1063. * Discussion:
  1064. * This API sets the origin of the view. This effectively also moves
  1065. * all subcontrols of a view as well. This call will invalidate the
  1066. * view.
  1067. *
  1068. * Parameters:
  1069. *
  1070. * inView:
  1071. * The view whose origin you wish to adjust.
  1072. *
  1073. * inX:
  1074. * The X coordinate.
  1075. *
  1076. * inY:
  1077. * The Y coordinate.
  1078. *
  1079. * Result:
  1080. * An operating system result code.
  1081. *
  1082. * Availability:
  1083. * Non-Carbon CFM: not available
  1084. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1085. * Mac OS X: in version 10.2 and later
  1086. */
  1087. EXTERN_API_C( OSStatus )
  1088. HIViewSetBoundsOrigin(
  1089. HIViewRef inView,
  1090. float inX,
  1091. float inY);
  1092. /*==============================================================================*/
  1093. /* KEYBOARD FOCUS */
  1094. /*==============================================================================*/
  1095. /*
  1096. * HIViewAdvanceFocus()
  1097. *
  1098. * Discussion:
  1099. * Advances the focus to the next most appropriate view. Unless
  1100. * overriden in some fashion (either by overriding certain carbon
  1101. * events or using the HIViewSetNextFocus API), the Toolbox will use
  1102. * a spacially determinant method of focusing, attempting to focus
  1103. * left to right, top to bottom in a window, taking groups of
  1104. * controls into account.
  1105. *
  1106. * Parameters:
  1107. *
  1108. * inRootForFocus:
  1109. * The subtree to manipulate. The focus will never leave
  1110. * inRootToFocus. Typically you would pass the content of the
  1111. * window, or the root. If focused on the toolbar, for example,
  1112. * the focus is limited to the toolbar only. In this case, the
  1113. * Toolbox passes the toolbar view in as the focus root for
  1114. * example.
  1115. *
  1116. * inModifiers:
  1117. * The EventModifiers of the keyboard event that ultimately caused
  1118. * the call to HIViewAdvanceFocus. These modifiers are used to
  1119. * determine the focus direction as well as other alternate
  1120. * focusing behaviors.
  1121. *
  1122. * Result:
  1123. * An operating system result code.
  1124. *
  1125. * Availability:
  1126. * Non-Carbon CFM: not available
  1127. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1128. * Mac OS X: in version 10.2 and later
  1129. */
  1130. EXTERN_API_C( OSStatus )
  1131. HIViewAdvanceFocus(
  1132. HIViewRef inRootForFocus,
  1133. EventModifiers inModifiers);
  1134. /*
  1135. * HIViewGetFocusPart()
  1136. *
  1137. * Discussion:
  1138. * Returns the currently focused part of the given view.
  1139. *
  1140. * Parameters:
  1141. *
  1142. * inView:
  1143. * The view to inquire about.
  1144. *
  1145. * outFocusPart:
  1146. * The part currently focused.
  1147. *
  1148. * Result:
  1149. * An operating system result code.
  1150. *
  1151. * Availability:
  1152. * Non-Carbon CFM: not available
  1153. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1154. * Mac OS X: in version 10.2 and later
  1155. */
  1156. EXTERN_API_C( OSStatus )
  1157. HIViewGetFocusPart(
  1158. HIViewRef inView,
  1159. HIViewPartCode * outFocusPart);
  1160. /*
  1161. * HIViewSubtreeContainsFocus()
  1162. *
  1163. * Discussion:
  1164. * Given a view, this function checks to see if it or any of its
  1165. * children currently are the keyboard focus. If so, true is
  1166. * returned as the function result.
  1167. *
  1168. * Parameters:
  1169. *
  1170. * inSubtreeStart:
  1171. * The view to start searching at.
  1172. *
  1173. * Result:
  1174. * A boolean result.
  1175. *
  1176. * Availability:
  1177. * Non-Carbon CFM: not available
  1178. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1179. * Mac OS X: in version 10.2 and later
  1180. */
  1181. EXTERN_API_C( Boolean )
  1182. HIViewSubtreeContainsFocus(HIViewRef inSubtreeStart);
  1183. /*
  1184. * HIViewSetNextFocus()
  1185. *
  1186. * Discussion:
  1187. * This function hard-wires the next view to shift focus to whenever
  1188. * the keyboard focus is advanced.
  1189. *
  1190. * Parameters:
  1191. *
  1192. * inView:
  1193. * The view to set the next focus view for.
  1194. *
  1195. * inNextFocus:
  1196. * The view to set focus to next. Pass NULL to tell the view
  1197. * system to use the default rules.
  1198. *
  1199. * Result:
  1200. * An operating system result code.
  1201. *
  1202. * Availability:
  1203. * Non-Carbon CFM: not available
  1204. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1205. * Mac OS X: in version 10.2 and later
  1206. */
  1207. EXTERN_API_C( OSStatus )
  1208. HIViewSetNextFocus(
  1209. HIViewRef inView,
  1210. HIViewRef inNextFocus); /* can be NULL */
  1211. /*
  1212. * HIViewSetFirstSubViewFocus()
  1213. *
  1214. * Discussion:
  1215. * This function hard-wires the first subview to shift focus to
  1216. * whenever the keyboard focus is advanced and the container view is
  1217. * entered.
  1218. *
  1219. * Parameters:
  1220. *
  1221. * inParent:
  1222. * The parent view.
  1223. *
  1224. * inSubView:
  1225. * The first child which should receive focus. Pass NULL to tell
  1226. * the view system to use the default rules.
  1227. *
  1228. * Result:
  1229. * An operating system result code.
  1230. *
  1231. * Availability:
  1232. * Non-Carbon CFM: not available
  1233. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1234. * Mac OS X: in version 10.2 and later
  1235. */
  1236. EXTERN_API_C( OSStatus )
  1237. HIViewSetFirstSubViewFocus(
  1238. HIViewRef inParent,
  1239. HIViewRef inSubView); /* can be NULL */
  1240. /*==============================================================================*/
  1241. /* MISCELLANEOUS */
  1242. /*==============================================================================*/
  1243. /*
  1244. * HIViewFindByID()
  1245. *
  1246. * Discussion:
  1247. * Allows you to find a particular view by its ID. Currently, this
  1248. * call uses the ControlID type as its IDs.
  1249. *
  1250. * Parameters:
  1251. *
  1252. * inStartView:
  1253. * The view to start searching at.
  1254. *
  1255. * inID:
  1256. * The ID of the view you are looking for.
  1257. *
  1258. * outControl:
  1259. * Receives the control if found.
  1260. *
  1261. * Result:
  1262. * An operating system result code.
  1263. *
  1264. * Availability:
  1265. * Non-Carbon CFM: not available
  1266. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1267. * Mac OS X: in version 10.2 and later
  1268. */
  1269. EXTERN_API_C( OSStatus )
  1270. HIViewFindByID(
  1271. HIViewRef inStartView,
  1272. HIViewID inID,
  1273. HIViewRef * outControl);
  1274. /*
  1275. * HIViewGetAttributes()
  1276. *
  1277. * Discussion:
  1278. * Allows you to get the attributes of a view.
  1279. *
  1280. * Parameters:
  1281. *
  1282. * inView:
  1283. * The view to inspect.
  1284. *
  1285. * outAttrs:
  1286. * The attributes of the view.
  1287. *
  1288. * Result:
  1289. * An operating system result code.
  1290. *
  1291. * Availability:
  1292. * Non-Carbon CFM: not available
  1293. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1294. * Mac OS X: in version 10.2 and later
  1295. */
  1296. EXTERN_API_C( OSStatus )
  1297. HIViewGetAttributes(
  1298. HIViewRef inView,
  1299. OptionBits * outAttrs);
  1300. /*
  1301. * HIViewChangeAttributes()
  1302. *
  1303. * Discussion:
  1304. * Allows you to change the attributes of a view. You can
  1305. * simultaneously set and clear attributes.
  1306. *
  1307. * Parameters:
  1308. *
  1309. * inView:
  1310. * The view to muck with.
  1311. *
  1312. * inAttrsToSet:
  1313. * The attributes you wish to set.
  1314. *
  1315. * inAttrsToClear:
  1316. * The attributes you wish to clear.
  1317. *
  1318. * Result:
  1319. * An operating system result code.
  1320. *
  1321. * Availability:
  1322. * Non-Carbon CFM: not available
  1323. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1324. * Mac OS X: in version 10.2 and later
  1325. */
  1326. EXTERN_API_C( OSStatus )
  1327. HIViewChangeAttributes(
  1328. HIViewRef inView,
  1329. OptionBits inAttrsToSet,
  1330. OptionBits inAttrsToClear);
  1331. /*
  1332. * HIViewCreateOffscreenImage()
  1333. *
  1334. * Discussion:
  1335. * Creates an CGImageRef for the view passed in. The view and any
  1336. * children it has are rendered in the resultant image.
  1337. *
  1338. * Parameters:
  1339. *
  1340. * inView:
  1341. * The view you wish to create an image of.
  1342. *
  1343. * inOptions:
  1344. * Options. Currently you must pass 0.
  1345. *
  1346. * outFrame:
  1347. * The frame of the view within the resultant image. It is in the
  1348. * coordinate system of the image, where 0,0 is the top left
  1349. * corner of the image. This is so you can know exactly where the
  1350. * control lives in the image when the control draws outside its
  1351. * bounds for things such as shadows.
  1352. *
  1353. * outImage:
  1354. * The image of the view, including anything that would be drawn
  1355. * outside the view's frame.
  1356. *
  1357. * Result:
  1358. * An operating system status code.
  1359. *
  1360. * Availability:
  1361. * Non-Carbon CFM: not available
  1362. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1363. * Mac OS X: in version 10.2 and later
  1364. */
  1365. EXTERN_API_C( OSStatus )
  1366. HIViewCreateOffscreenImage(
  1367. HIViewRef inView,
  1368. OptionBits inOptions,
  1369. HIRect * outFrame, /* can be NULL */
  1370. CGImageRef * outImage);
  1371. /*
  1372. * HIViewDrawCGImage()
  1373. *
  1374. * Discussion:
  1375. * Draws an image in the right direction for an HIView. This is
  1376. * functionally the same as CGContextDrawImage, but it flips the
  1377. * context appropriately so that the image is drawn correctly.
  1378. * Because HIViews have their origin at the top, left, you are
  1379. * really drawing upside-down, so if you were to use the CG image
  1380. * drawing, you'd see what I mean! This call attempts to insulate
  1381. * you from that fact.
  1382. *
  1383. * Parameters:
  1384. *
  1385. * inContext:
  1386. * The context to draw in.
  1387. *
  1388. * inBounds:
  1389. * The bounds to draw the image into.
  1390. *
  1391. * inImage:
  1392. * The image to draw.
  1393. *
  1394. * Result:
  1395. * An operating system status code.
  1396. *
  1397. * Availability:
  1398. * Non-Carbon CFM: not available
  1399. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1400. * Mac OS X: in version 10.2 and later
  1401. */
  1402. EXTERN_API_C( OSStatus )
  1403. HIViewDrawCGImage(
  1404. CGContextRef inContext,
  1405. const HIRect * inBounds,
  1406. CGImageRef inImage);
  1407. /*==============================================================================*/
  1408. /* HIGrowBoxView */
  1409. /*==============================================================================*/
  1410. /* The HIObject class ID for the HIGrowBoxView class. */
  1411. #define kHIGrowBoxViewClassID CFSTR("com.apple.higrowboxview")
  1412. /* Currently there is no direct creation API for the grow box, so you must use */
  1413. /* HIObjectCreate if you wish to create one directly. Normally, a window will */
  1414. /* create one for you, so you should generally never need to do this. */
  1415. /*
  1416. * HIGrowBoxViewSetTransparent()
  1417. *
  1418. * Discussion:
  1419. * Sets a grow box view as transparent, meaning it will draw the
  1420. * grow box lines over any content below it. When not transparent,
  1421. * it's an opaque white square with the grow lines.
  1422. *
  1423. * Parameters:
  1424. *
  1425. * inGrowBoxView:
  1426. * The grow box view reference.
  1427. *
  1428. * inTransparent:
  1429. * Pass true to make the grow view use its transparent look, false
  1430. * to give it the opaque look.
  1431. *
  1432. * Result:
  1433. * An operating system result code.
  1434. *
  1435. * Availability:
  1436. * Non-Carbon CFM: not available
  1437. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1438. * Mac OS X: in version 10.2 and later
  1439. */
  1440. EXTERN_API_C( OSStatus )
  1441. HIGrowBoxViewSetTransparent(
  1442. HIViewRef inGrowBoxView,
  1443. Boolean inTransparent);
  1444. /*
  1445. * HIGrowBoxViewIsTransparent()
  1446. *
  1447. * Discussion:
  1448. * Returns true if a grow box view is set to be transparent.
  1449. *
  1450. * Parameters:
  1451. *
  1452. * inGrowBoxView:
  1453. * The grow box view reference.
  1454. *
  1455. * Result:
  1456. * A boolean result.
  1457. *
  1458. * Availability:
  1459. * Non-Carbon CFM: not available
  1460. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1461. * Mac OS X: in version 10.2 and later
  1462. */
  1463. EXTERN_API_C( Boolean )
  1464. HIGrowBoxViewIsTransparent(HIViewRef inGrowBoxView);
  1465. /*==============================================================================*/
  1466. /* HIScrollView */
  1467. /*==============================================================================*/
  1468. enum {
  1469. kEventClassScrollable = FOUR_CHAR_CODE('scrl')
  1470. };
  1471. enum {
  1472. kEventScrollableGetInfo = 1,
  1473. kEventScrollableInfoChanged = 2,
  1474. kEventScrollableScrollTo = 10
  1475. };
  1476. enum {
  1477. kEventParamImageSize = FOUR_CHAR_CODE('imsz'), /* type HISize*/
  1478. kEventParamViewSize = FOUR_CHAR_CODE('vwsz'), /* type HISize*/
  1479. kEventParamLineSize = FOUR_CHAR_CODE('lnsz'), /* type HISize*/
  1480. kEventParamOrigin = FOUR_CHAR_CODE('orgn') /* type HIPoint*/
  1481. };
  1482. /*
  1483. * Discussion:
  1484. * HIScrollView options
  1485. */
  1486. enum {
  1487. /*
  1488. * This indicates that a vertical scroll bar is desired.
  1489. */
  1490. kHIScrollViewOptionsVertScroll = (1 << 0),
  1491. /*
  1492. * This indicates that a horizontal scroll bar is desired.
  1493. */
  1494. kHIScrollViewOptionsHorizScroll = (1 << 1),
  1495. /*
  1496. * This indicates that space for a grow box should be taken into
  1497. * account when layout out scroll bars. If both the horizontal and
  1498. * vertical scroll bars are requested, this attribute is assumed.
  1499. */
  1500. kHIScrollViewOptionsAllowGrow = (1 << 2),
  1501. kHIScrollViewValidOptions = (kHIScrollViewOptionsVertScroll | kHIScrollViewOptionsHorizScroll | kHIScrollViewOptionsAllowGrow)
  1502. };
  1503. /*
  1504. * HIScrollViewCreate()
  1505. *
  1506. * Discussion:
  1507. * Creates a scroll view. This view has 3 parts, essentially. It can
  1508. * have one or two scroll bars (horizontal/vertical), and a view to
  1509. * be scrolled. The view to be scrolled is merely added via
  1510. * HIViewAddSubview. The scroll view will automatically connect it
  1511. * up appropriately. **** THIS MAY CHANGE
  1512. *
  1513. * Parameters:
  1514. *
  1515. * inOptions:
  1516. * Options for our scroll view. You must specify either a
  1517. * horizontal or a vertical scroll bar. If neither is passed, an
  1518. * error is returned.
  1519. *
  1520. * outView:
  1521. * The new scroll view.
  1522. *
  1523. * Result:
  1524. * An operating system result code.
  1525. *
  1526. * Availability:
  1527. * Non-Carbon CFM: not available
  1528. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1529. * Mac OS X: in version 10.2 and later
  1530. */
  1531. EXTERN_API_C( OSStatus )
  1532. HIScrollViewCreate(
  1533. OptionBits inOptions,
  1534. HIViewRef * outView);
  1535. /*
  1536. * HIScrollViewSetScrollBarAutoHide()
  1537. *
  1538. * Discussion:
  1539. * Sets a scroll view's scroll bars to auto-hide when the entire
  1540. * scrollable view it is managing can be fully displayed in its
  1541. * bounds. This is similar to the behavior you see in the Preview
  1542. * application.
  1543. *
  1544. * Parameters:
  1545. *
  1546. * inView:
  1547. * The view to affect.
  1548. *
  1549. * inAutoHide:
  1550. * The new auto-hide setting (true == auto-hide).
  1551. *
  1552. * Result:
  1553. * An operating system result code.
  1554. *
  1555. * Availability:
  1556. * Non-Carbon CFM: not available
  1557. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1558. * Mac OS X: in version 10.2 and later
  1559. */
  1560. EXTERN_API_C( OSStatus )
  1561. HIScrollViewSetScrollBarAutoHide(
  1562. HIViewRef inView,
  1563. Boolean inAutoHide);
  1564. /*
  1565. * HIScrollViewGetScrollBarAutoHide()
  1566. *
  1567. * Discussion:
  1568. * Gets a scroll view's current scroll bar auto-hide setting.
  1569. *
  1570. * Parameters:
  1571. *
  1572. * inView:
  1573. * The view to examine.
  1574. *
  1575. * Result:
  1576. * A boolean result.
  1577. *
  1578. * Availability:
  1579. * Non-Carbon CFM: not available
  1580. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1581. * Mac OS X: in version 10.2 and later
  1582. */
  1583. EXTERN_API_C( Boolean )
  1584. HIScrollViewGetScrollBarAutoHide(HIViewRef inView);
  1585. /*==============================================================================*/
  1586. /* HIImageView */
  1587. /*==============================================================================*/
  1588. /*
  1589. * HIImageViewCreate()
  1590. *
  1591. * Discussion:
  1592. * Creates an image view. The view responds to the scrollable
  1593. * interface and can be used in a scrolling view. You can pass an
  1594. * image initially, or set one later.
  1595. *
  1596. * Parameters:
  1597. *
  1598. * inImage:
  1599. * An initial image, or NULL. You can set the image later via
  1600. * SetControlData.
  1601. *
  1602. * outControl:
  1603. * The new image view.
  1604. *
  1605. * Result:
  1606. * An operating system result code.
  1607. *
  1608. * Availability:
  1609. * Non-Carbon CFM: not available
  1610. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1611. * Mac OS X: in version 10.2 and later
  1612. */
  1613. EXTERN_API_C( OSStatus )
  1614. HIImageViewCreate(
  1615. CGImageRef inImage, /* can be NULL */
  1616. ControlRef * outControl);
  1617. enum {
  1618. kHIImageViewImageTag = FOUR_CHAR_CODE('imag') /* CGImageRef (THIS TAG IS GOING AWAY!!! USE THE APIS BELOW!)*/
  1619. };
  1620. /*
  1621. * HIImageViewSetOpaque()
  1622. *
  1623. * Discussion:
  1624. * Allows you to set whether an image view should be treated as
  1625. * opaque. If this is set to true, the image view can make certain
  1626. * optimizations for compositing and scrolling. The alpha-related
  1627. * image view APIs are rendered useless if opacity it set to true.
  1628. * An image view, when created, is opaque by default. You must pass
  1629. * false to this function in order to change the alpha, etc. or if
  1630. * your image does not fill the full bounds of the view.
  1631. *
  1632. * Parameters:
  1633. *
  1634. * inView:
  1635. * The image view to affect.
  1636. *
  1637. * inOpaque:
  1638. * The new opacity setting. Pass true to indicate you want the
  1639. * image to be treated as opaque.
  1640. *
  1641. * Result:
  1642. * An operating system result code.
  1643. *
  1644. * Availability:
  1645. * Non-Carbon CFM: not available
  1646. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1647. * Mac OS X: in version 10.2 and later
  1648. */
  1649. EXTERN_API_C( OSStatus )
  1650. HIImageViewSetOpaque(
  1651. HIViewRef inView,
  1652. Boolean inOpaque);
  1653. /*
  1654. * HIImageViewIsOpaque()
  1655. *
  1656. * Discussion:
  1657. * Allows you to determine whether an image view is opaque or not.
  1658. *
  1659. * Parameters:
  1660. *
  1661. * inView:
  1662. * The image view to query.
  1663. *
  1664. * Result:
  1665. * A boolean result, where true indicates the image view is opaque.
  1666. *
  1667. * Availability:
  1668. * Non-Carbon CFM: not available
  1669. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1670. * Mac OS X: in version 10.2 and later
  1671. */
  1672. EXTERN_API_C( Boolean )
  1673. HIImageViewIsOpaque(HIViewRef inView);
  1674. /*
  1675. * HIImageViewSetAlpha()
  1676. *
  1677. * Discussion:
  1678. * Allows you to set the alpha for an image, making it more or less
  1679. * transparent. An alpha of 1.0 is fully opaque, and 0.0 is fully
  1680. * transparent. The default alpha for an image is 1.0.
  1681. *
  1682. * Parameters:
  1683. *
  1684. * inView:
  1685. * The image view to affect.
  1686. *
  1687. * inAlpha:
  1688. * The new alpha value.
  1689. *
  1690. * Result:
  1691. * An operating system result code.
  1692. *
  1693. * Availability:
  1694. * Non-Carbon CFM: not available
  1695. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1696. * Mac OS X: in version 10.2 and later
  1697. */
  1698. EXTERN_API_C( OSStatus )
  1699. HIImageViewSetAlpha(
  1700. HIViewRef inView,
  1701. float inAlpha);
  1702. /*
  1703. * HIImageViewGetAlpha()
  1704. *
  1705. * Discussion:
  1706. * Allows you to get the alpha for an image. An alpha of 1.0 is
  1707. * fully opaque, and 0.0 is fully transparent.
  1708. *
  1709. * Parameters:
  1710. *
  1711. * inView:
  1712. * The image view to query.
  1713. *
  1714. * Result:
  1715. * A floating point number representing the alpha from 0.0 through
  1716. * 1.0.
  1717. *
  1718. * Availability:
  1719. * Non-Carbon CFM: not available
  1720. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1721. * Mac OS X: in version 10.2 and later
  1722. */
  1723. EXTERN_API_C( float )
  1724. HIImageViewGetAlpha(HIViewRef inView);
  1725. /*
  1726. * HIImageViewSetScaleToFit()
  1727. *
  1728. * Discussion:
  1729. * Normally an image view will clip to the view's bounds. Using this
  1730. * API, you can instead tell the image view to size the image to fit
  1731. * into the view bounds specified.
  1732. *
  1733. * Parameters:
  1734. *
  1735. * inView:
  1736. * The image view to affect.
  1737. *
  1738. * inScaleToFit:
  1739. * A boolean indicating whether the image should be scaled to fit
  1740. * the view bounds (true) or merely clip to the view bounds
  1741. * (false).
  1742. *
  1743. * Result:
  1744. * An operating system status code.
  1745. *
  1746. * Availability:
  1747. * Non-Carbon CFM: not available
  1748. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1749. * Mac OS X: in version 10.2 and later
  1750. */
  1751. EXTERN_API_C( OSStatus )
  1752. HIImageViewSetScaleToFit(
  1753. HIViewRef inView,
  1754. Boolean inScaleToFit);
  1755. /*
  1756. * HIImageViewGetScaleToFit()
  1757. *
  1758. * Discussion:
  1759. * Returns whether or not an image view will scale the image it
  1760. * displays to the view bounds or merely clip to the view bounds. A
  1761. * true result means it scales.
  1762. *
  1763. * Parameters:
  1764. *
  1765. * inView:
  1766. * The image view to query.
  1767. *
  1768. * Result:
  1769. * A boolean result.
  1770. *
  1771. * Availability:
  1772. * Non-Carbon CFM: not available
  1773. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1774. * Mac OS X: in version 10.2 and later
  1775. */
  1776. EXTERN_API_C( Boolean )
  1777. HIImageViewGetScaleToFit(HIViewRef inView);
  1778. /*
  1779. * HIImageViewSetImage()
  1780. *
  1781. * Discussion:
  1782. * Sets the image to display in an image view. The image passed in
  1783. * is retained by the view, so you may release the image after
  1784. * calling this API if you no longer need to reference it.
  1785. *
  1786. * Parameters:
  1787. *
  1788. * inView:
  1789. * The image view to affect.
  1790. *
  1791. * inImage:
  1792. * The image to set.
  1793. *
  1794. * Result:
  1795. * An operating system status code.
  1796. *
  1797. * Availability:
  1798. * Non-Carbon CFM: not available
  1799. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1800. * Mac OS X: in version 10.2 and later
  1801. */
  1802. EXTERN_API_C( OSStatus )
  1803. HIImageViewSetImage(
  1804. HIViewRef inView,
  1805. CGImageRef inImage); /* can be NULL */
  1806. /*
  1807. * HIImageViewCopyImage()
  1808. *
  1809. * Discussion:
  1810. * Gets the image for an image view. If there is no image set on the
  1811. * view, or the view ref is invalid, NULL is returned. The image is
  1812. * retained, so you should take care to release it when you are
  1813. * finished with it.
  1814. *
  1815. * Parameters:
  1816. *
  1817. * inView:
  1818. * The image view to query.
  1819. *
  1820. * Result:
  1821. * A CoreGraphics (Quartz) image ref.
  1822. *
  1823. * Availability:
  1824. * Non-Carbon CFM: not available
  1825. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1826. * Mac OS X: in version 10.2 and later
  1827. */
  1828. EXTERN_API_C( CGImageRef )
  1829. HIImageViewCopyImage(HIViewRef inView);
  1830. /*==============================================================================*/
  1831. /* HIComboBox */
  1832. /*==============================================================================*/
  1833. /*
  1834. * Summary:
  1835. * ComboBox attributes
  1836. */
  1837. enum {
  1838. /*
  1839. * A constant with value zero; the lack of any attributes.
  1840. */
  1841. kHIComboBoxNoAttributes = 0L,
  1842. /*
  1843. * The control will attempt to auto complete the text the user is
  1844. * typing with an item in the ComboBox list that is the closest
  1845. * appropriate match.
  1846. */
  1847. kHIComboBoxAutoCompletionAttribute = (1L << 0),
  1848. /*
  1849. * The control will disclose the ComboBox list after the user enters
  1850. * text.
  1851. */
  1852. kHIComboBoxAutoDisclosureAttribute = (1L << 1),
  1853. /*
  1854. * The items in the ComboBox list will be automatically sorted in
  1855. * alphabetical order.
  1856. */
  1857. kHIComboBoxAutoSortAttribute = (1L << 2),
  1858. /*
  1859. * The ComboBox list will be automatically sized to fit the Human
  1860. * Interface Guidelines.
  1861. */
  1862. kHIComboBoxAutoSizeListAttribute = (1L << 3),
  1863. /*
  1864. * The minimum set of ComboBox attributes commonly used.
  1865. */
  1866. kHIComboBoxStandardAttributes = (kHIComboBoxAutoCompletionAttribute | kHIComboBoxAutoDisclosureAttribute | kHIComboBoxAutoSizeListAttribute)
  1867. };
  1868. /* ControlKind*/
  1869. enum {
  1870. kControlKindHIComboBox = FOUR_CHAR_CODE('cbbx')
  1871. };
  1872. /* ComboBox Part codes*/
  1873. enum {
  1874. kHIComboBoxEditTextPart = 5,
  1875. kHIComboBoxDisclosurePart = 28
  1876. };
  1877. /*
  1878. * Discussion:
  1879. * ComboBox ControlData tags available with Mac OS X 10.2 and later.
  1880. */
  1881. enum {
  1882. /*
  1883. * Extract the contents of the ComboBox list as a CFArray. The
  1884. * CFArray will be retained: if you get the array, you own it and
  1885. * will be required to release it; if you set it the toolbox makes a
  1886. * copy of it and you are free to release your reference.
  1887. */
  1888. kHIComboBoxListTag = FOUR_CHAR_CODE('cbls'), /* CFArrayRef; bumps the refCount on get/retains on set*/
  1889. /*
  1890. * The width of the ComboBox list. This can be customized. This
  1891. * disables the autosize attribute.
  1892. */
  1893. kHIComboBoxListPixelWidthTag = FOUR_CHAR_CODE('cblw'), /* UInt32 */
  1894. /*
  1895. * The height of the ComboBox list. This can be customized. This
  1896. * disables the autosize attribute.
  1897. */
  1898. kHIComboBoxListPixelHeightTag = FOUR_CHAR_CODE('cblh'), /* UInt32*/
  1899. /*
  1900. * The number of visible items in the list. This can be customized.
  1901. * This disables the autosize attribute.
  1902. */
  1903. kHIComboBoxNumVisibleItemsTag = FOUR_CHAR_CODE('cbni') /* UInt32*/
  1904. };
  1905. /*
  1906. * HIComboBoxCreate()
  1907. *
  1908. * Summary:
  1909. * Creates a combo box control.
  1910. *
  1911. * Parameters:
  1912. *
  1913. * boundsRect:
  1914. * The bounding box of the control.
  1915. *
  1916. * text:
  1917. * The default text in the editable portion of the control. Can be
  1918. * NULL.
  1919. *
  1920. * style:
  1921. * The font style of the both editable text and the text in the
  1922. * disclosure list. Can be NULL.
  1923. *
  1924. * list:
  1925. * The default values available in the disclosure list. Can be
  1926. * NULL.
  1927. *
  1928. * inAttributes:
  1929. * The default attributes of the combo box.
  1930. *
  1931. * outComboBox:
  1932. * On exit, contains the new control.
  1933. *
  1934. * Availability:
  1935. * Non-Carbon CFM: not available
  1936. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1937. * Mac OS X: in version 10.2 and later
  1938. */
  1939. EXTERN_API_C( OSStatus )
  1940. HIComboBoxCreate(
  1941. const HIRect * boundsRect,
  1942. CFStringRef text, /* can be NULL */
  1943. const ControlFontStyleRec * style, /* can be NULL */
  1944. CFArrayRef list, /* can be NULL */
  1945. OptionBits inAttributes,
  1946. HIViewRef * outComboBox);
  1947. /*
  1948. * HIComboBoxGetItemCount()
  1949. *
  1950. * Summary:
  1951. * Get the number of items in the combo box disclosure list.
  1952. *
  1953. * Parameters:
  1954. *
  1955. * inComboBox:
  1956. * The combo box.
  1957. *
  1958. * Result:
  1959. * The number of items in the combo box disclosure list.
  1960. *
  1961. * Availability:
  1962. * Non-Carbon CFM: not available
  1963. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1964. * Mac OS X: in version 10.2 and later
  1965. */
  1966. EXTERN_API_C( ItemCount )
  1967. HIComboBoxGetItemCount(HIViewRef inComboBox);
  1968. /*
  1969. * HIComboBoxInsertTextItemAtIndex()
  1970. *
  1971. * Summary:
  1972. * Inserts a CFString in the disclosure list
  1973. *
  1974. * Parameters:
  1975. *
  1976. * inComboBox:
  1977. * The combo box whose disclosure list the text will be inserted
  1978. * in.
  1979. *
  1980. * inIndex:
  1981. * The index that the text should be inserted in. If the index
  1982. * does not fall within the number of items in the combo box list,
  1983. * it will be appended to the end of the list.
  1984. *
  1985. * inText:
  1986. * The text item to be inserted in the combo box disclosure list.
  1987. *
  1988. * Result:
  1989. * An operating system status code.
  1990. *
  1991. * Availability:
  1992. * Non-Carbon CFM: not available
  1993. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1994. * Mac OS X: in version 10.2 and later
  1995. */
  1996. EXTERN_API_C( OSStatus )
  1997. HIComboBoxInsertTextItemAtIndex(
  1998. HIViewRef inComboBox,
  1999. CFIndex inIndex,
  2000. CFStringRef inText);
  2001. /*
  2002. * HIComboBoxAppendTextItem()
  2003. *
  2004. * Summary:
  2005. * Appends a text item to the combo box disclosure list.
  2006. *
  2007. * Parameters:
  2008. *
  2009. * inComboBox:
  2010. * The combo box whose disclosure list the text will be appended
  2011. * to.
  2012. *
  2013. * inText:
  2014. * The text item to be appended to the combo box disclosure list.
  2015. *
  2016. * outIndex:
  2017. * On exit, the index of the new item. Can be NULL if the caller
  2018. * does not require this information.
  2019. *
  2020. * Result:
  2021. * An operating system status code.
  2022. *
  2023. * Availability:
  2024. * Non-Carbon CFM: not available
  2025. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2026. * Mac OS X: in version 10.2 and later
  2027. */
  2028. EXTERN_API_C( OSStatus )
  2029. HIComboBoxAppendTextItem(
  2030. HIViewRef inComboBox,
  2031. CFStringRef inText,
  2032. CFIndex * outIndex); /* can be NULL */
  2033. /*
  2034. * HIComboBoxCopyTextItemAtIndex()
  2035. *
  2036. * Summary:
  2037. * Copy the text from the combo box disclosure list
  2038. *
  2039. * Parameters:
  2040. *
  2041. * inComboBox:
  2042. * The combo box that contains the text item you would like to
  2043. * copy.
  2044. *
  2045. * inIndex:
  2046. * The index of the text item. Will return paramErr if the index
  2047. * is out of bounds of the combo box list.
  2048. *
  2049. * outString:
  2050. * A copy of the string at the given index. Remember this is now
  2051. * your copy that you will need to release.
  2052. *
  2053. * Result:
  2054. * An operating system status code.
  2055. *
  2056. * Availability:
  2057. * Non-Carbon CFM: not available
  2058. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2059. * Mac OS X: in version 10.2 and later
  2060. */
  2061. EXTERN_API_C( OSStatus )
  2062. HIComboBoxCopyTextItemAtIndex(
  2063. HIViewRef inComboBox,
  2064. CFIndex inIndex,
  2065. CFStringRef * outString);
  2066. /*
  2067. * HIComboBoxRemoveItemAtIndex()
  2068. *
  2069. * Summary:
  2070. * Remove an item from a combo box disclosure list.
  2071. *
  2072. * Parameters:
  2073. *
  2074. * inComboBox:
  2075. * The combo box that contains the disclosure list that you would
  2076. * like to remove an item from.
  2077. *
  2078. * inIndex:
  2079. * The index of the item to remove.
  2080. *
  2081. * Result:
  2082. * An operating system status code.
  2083. *
  2084. * Availability:
  2085. * Non-Carbon CFM: not available
  2086. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2087. * Mac OS X: in version 10.2 and later
  2088. */
  2089. EXTERN_API_C( OSStatus )
  2090. HIComboBoxRemoveItemAtIndex(
  2091. HIViewRef inComboBox,
  2092. CFIndex inIndex);
  2093. /*
  2094. * HIComboBoxChangeAttributes()
  2095. *
  2096. * Summary:
  2097. * Change the attributes of a combo box
  2098. *
  2099. * Parameters:
  2100. *
  2101. * inComboBox:
  2102. * The combo box whose attributes you would like to change.
  2103. *
  2104. * inAttributesToSet:
  2105. * The attributes to set.
  2106. *
  2107. * inAttributesToClear:
  2108. * The attributes to clear.
  2109. *
  2110. * Result:
  2111. * An operating system status code.
  2112. *
  2113. * Availability:
  2114. * Non-Carbon CFM: not available
  2115. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2116. * Mac OS X: in version 10.2 and later
  2117. */
  2118. EXTERN_API_C( OSStatus )
  2119. HIComboBoxChangeAttributes(
  2120. HIViewRef inComboBox,
  2121. OptionBits inAttributesToSet,
  2122. OptionBits inAttributesToClear);
  2123. /*
  2124. * HIComboBoxGetAttributes()
  2125. *
  2126. * Summary:
  2127. * Get the attributes of a combo box.
  2128. *
  2129. * Parameters:
  2130. *
  2131. * inComboBox:
  2132. * The combo box whose attributes you would like to obtain.
  2133. *
  2134. * outAttributes:
  2135. * The attributes of the combo box.
  2136. *
  2137. * Result:
  2138. * An operating system status code.
  2139. *
  2140. * Availability:
  2141. * Non-Carbon CFM: not available
  2142. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2143. * Mac OS X: in version 10.2 and later
  2144. */
  2145. EXTERN_API_C( OSStatus )
  2146. HIComboBoxGetAttributes(
  2147. HIViewRef inComboBox,
  2148. OptionBits * outAttributes);
  2149. #if PRAGMA_STRUCT_ALIGN
  2150. #pragma options align=reset
  2151. #elif PRAGMA_STRUCT_PACKPUSH
  2152. #pragma pack(pop)
  2153. #elif PRAGMA_STRUCT_PACK
  2154. #pragma pack()
  2155. #endif
  2156. #ifdef PRAGMA_IMPORT_OFF
  2157. #pragma import off
  2158. #elif PRAGMA_IMPORT
  2159. #pragma import reset
  2160. #endif
  2161. #ifdef __cplusplus
  2162. }
  2163. #endif
  2164. #endif /* __HIVIEW__ */