/packages/univint/src/HIDataBrowser.pas

https://github.com/slibre/freepascal · Pascal · 3927 lines · 552 code · 414 blank · 2961 comment · 0 complexity · 41ae207593f8851d27d36822a1399985 MD5 · raw file

Large files are truncated click here to view the full file

  1. {
  2. File: HIToolbox/HIDataBrowser.h
  3. Contains: API and type definitions related to Data Browser.
  4. Version: HIToolbox-624~3
  5. Copyright: © 1999-2008 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. { Initial Pascal Translation: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
  11. { Pascal Translation Updated: Gorazd Krosl, <gorazd_1957@yahoo.ca>, October 2009 }
  12. { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
  13. {
  14. Modified for use with Free Pascal
  15. Version 308
  16. Please report any bugs to <gpc@microbizz.nl>
  17. }
  18. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  19. {$mode macpas}
  20. {$packenum 1}
  21. {$macro on}
  22. {$inline on}
  23. {$calling mwpascal}
  24. unit HIDataBrowser;
  25. interface
  26. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  27. {$setc GAP_INTERFACES_VERSION := $0308}
  28. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  29. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  30. {$endc}
  31. {$ifc defined CPUPOWERPC and defined CPUI386}
  32. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  33. {$endc}
  34. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  35. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  36. {$endc}
  37. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  38. {$setc __ppc__ := 1}
  39. {$elsec}
  40. {$setc __ppc__ := 0}
  41. {$endc}
  42. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  43. {$setc __ppc64__ := 1}
  44. {$elsec}
  45. {$setc __ppc64__ := 0}
  46. {$endc}
  47. {$ifc not defined __i386__ and defined CPUI386}
  48. {$setc __i386__ := 1}
  49. {$elsec}
  50. {$setc __i386__ := 0}
  51. {$endc}
  52. {$ifc not defined __x86_64__ and defined CPUX86_64}
  53. {$setc __x86_64__ := 1}
  54. {$elsec}
  55. {$setc __x86_64__ := 0}
  56. {$endc}
  57. {$ifc not defined __arm__ and defined CPUARM}
  58. {$setc __arm__ := 1}
  59. {$elsec}
  60. {$setc __arm__ := 0}
  61. {$endc}
  62. {$ifc defined cpu64}
  63. {$setc __LP64__ := 1}
  64. {$elsec}
  65. {$setc __LP64__ := 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_PPC64 := FALSE}
  73. {$setc TARGET_CPU_X86 := FALSE}
  74. {$setc TARGET_CPU_X86_64 := FALSE}
  75. {$setc TARGET_CPU_ARM := FALSE}
  76. {$setc TARGET_OS_MAC := TRUE}
  77. {$setc TARGET_OS_IPHONE := FALSE}
  78. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  79. {$setc TARGET_OS_EMBEDDED := FALSE}
  80. {$elifc defined __ppc64__ and __ppc64__}
  81. {$setc TARGET_CPU_PPC := FALSE}
  82. {$setc TARGET_CPU_PPC64 := TRUE}
  83. {$setc TARGET_CPU_X86 := FALSE}
  84. {$setc TARGET_CPU_X86_64 := FALSE}
  85. {$setc TARGET_CPU_ARM := FALSE}
  86. {$setc TARGET_OS_MAC := TRUE}
  87. {$setc TARGET_OS_IPHONE := FALSE}
  88. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  89. {$setc TARGET_OS_EMBEDDED := FALSE}
  90. {$elifc defined __i386__ and __i386__}
  91. {$setc TARGET_CPU_PPC := FALSE}
  92. {$setc TARGET_CPU_PPC64 := FALSE}
  93. {$setc TARGET_CPU_X86 := TRUE}
  94. {$setc TARGET_CPU_X86_64 := FALSE}
  95. {$setc TARGET_CPU_ARM := FALSE}
  96. {$ifc defined(iphonesim)}
  97. {$setc TARGET_OS_MAC := FALSE}
  98. {$setc TARGET_OS_IPHONE := TRUE}
  99. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  100. {$elsec}
  101. {$setc TARGET_OS_MAC := TRUE}
  102. {$setc TARGET_OS_IPHONE := FALSE}
  103. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  104. {$endc}
  105. {$setc TARGET_OS_EMBEDDED := FALSE}
  106. {$elifc defined __x86_64__ and __x86_64__}
  107. {$setc TARGET_CPU_PPC := FALSE}
  108. {$setc TARGET_CPU_PPC64 := FALSE}
  109. {$setc TARGET_CPU_X86 := FALSE}
  110. {$setc TARGET_CPU_X86_64 := TRUE}
  111. {$setc TARGET_CPU_ARM := FALSE}
  112. {$setc TARGET_OS_MAC := TRUE}
  113. {$setc TARGET_OS_IPHONE := FALSE}
  114. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  115. {$setc TARGET_OS_EMBEDDED := FALSE}
  116. {$elifc defined __arm__ and __arm__}
  117. {$setc TARGET_CPU_PPC := FALSE}
  118. {$setc TARGET_CPU_PPC64 := FALSE}
  119. {$setc TARGET_CPU_X86 := FALSE}
  120. {$setc TARGET_CPU_X86_64 := FALSE}
  121. {$setc TARGET_CPU_ARM := TRUE}
  122. { will require compiler define when/if other Apple devices with ARM cpus ship }
  123. {$setc TARGET_OS_MAC := FALSE}
  124. {$setc TARGET_OS_IPHONE := TRUE}
  125. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  126. {$setc TARGET_OS_EMBEDDED := TRUE}
  127. {$elsec}
  128. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  129. {$endc}
  130. {$ifc defined __LP64__ and __LP64__ }
  131. {$setc TARGET_CPU_64 := TRUE}
  132. {$elsec}
  133. {$setc TARGET_CPU_64 := FALSE}
  134. {$endc}
  135. {$ifc defined FPC_BIG_ENDIAN}
  136. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  137. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  138. {$elifc defined FPC_LITTLE_ENDIAN}
  139. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  140. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  141. {$elsec}
  142. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  143. {$endc}
  144. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  145. {$setc CALL_NOT_IN_CARBON := FALSE}
  146. {$setc OLDROUTINENAMES := FALSE}
  147. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  148. {$setc OPAQUE_UPP_TYPES := TRUE}
  149. {$setc OTCARBONAPPLICATION := TRUE}
  150. {$setc OTKERNEL := FALSE}
  151. {$setc PM_USE_SESSION_APIS := TRUE}
  152. {$setc TARGET_API_MAC_CARBON := TRUE}
  153. {$setc TARGET_API_MAC_OS8 := FALSE}
  154. {$setc TARGET_API_MAC_OSX := TRUE}
  155. {$setc TARGET_CARBON := TRUE}
  156. {$setc TARGET_CPU_68K := FALSE}
  157. {$setc TARGET_CPU_MIPS := FALSE}
  158. {$setc TARGET_CPU_SPARC := FALSE}
  159. {$setc TARGET_OS_UNIX := FALSE}
  160. {$setc TARGET_OS_WIN32 := FALSE}
  161. {$setc TARGET_RT_MAC_68881 := FALSE}
  162. {$setc TARGET_RT_MAC_CFM := FALSE}
  163. {$setc TARGET_RT_MAC_MACHO := TRUE}
  164. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  165. {$setc TYPE_BOOL := FALSE}
  166. {$setc TYPE_EXTENDED := FALSE}
  167. {$setc TYPE_LONGLONG := TRUE}
  168. uses MacTypes,TextEdit,AXUIElement,AEDataModel,CFBase,Events,QuickdrawTypes,IconsCore,Icons,CFData,CFDictionary,DateTimeUtils,Drag,TextCommon,Appearance,CarbonEvents,Controls,Lists,MacHelp,Menus,CFString,CGBase,HIObject;
  169. {$endc} {not MACOSALLINCLUDE}
  170. {$ifc TARGET_OS_MAC}
  171. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  172. { ¥ DATA BROWSER }
  173. { (CDEF 29) }
  174. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  175. { This control implements a user interface component for browsing (optionally) }
  176. { hiearchical data structures. The browser supports multiple presentation styles }
  177. { including, but not limited to: }
  178. { kDataBrowserListView - items and item properties in }
  179. { multi-column (optionally outline) format }
  180. { kDataBrowserColumnView - in-place browsing using fixed navigation columns }
  181. { The browser manages all view styles through a single high-level interface. }
  182. { The high-level interface makes the following assumptions: }
  183. { - Items have unique 32-bit identifiers (0 is reserved) }
  184. { - Items have two kinds of named and typed properties: }
  185. { - Predefined attribute properties ( < 1024 ) }
  186. { (including some display properties) }
  187. { - Client-defined display properties ( >= 1024 ) }
  188. { - Some items are containers of other items }
  189. { - Items may be sorted by any property }
  190. { Because a browser doesn't know all details about the type of objects it manages, }
  191. { some implementation responsibility is best handled by its client. The client must }
  192. { provide a set of callback routines which define the item hierarchy and help to }
  193. { populate the browser with items. The client may also provide callbacks for handling }
  194. { custom data types and doing low-level event management. }
  195. { The API is subdivided into a "universal" set of routines that applies to all view }
  196. { styles, and a set of routines unique to each view style. kDataBrowserListView and }
  197. { kDataBrowserColumnView share an (internal) TableView abstract base class. The }
  198. { TableView formatting options and API applies to both of these view styles. }
  199. { NOTE: This control is only available with CarbonLib 1.1. }
  200. { NOTE: This control must be created with the CreateDataBrowserControl API in }
  201. { CarbonLib 1.1 through 1.4. In Mac OS X and CarbonLib 1.5 and later, you }
  202. { may use the control's procID (29) to create the control with NewControl }
  203. { or with a 'CNTL' resource. }
  204. { The HIObject class ID for the HIDataBrowser class. }
  205. {$ALIGN MAC68K}
  206. {$ifc USE_CFSTR_CONSTANT_MACROS}
  207. {$definec kHIDataBrowserClassID CFSTRP('com.apple.HIDataBrowser')}
  208. {$endc}
  209. { Control Kind Tag }
  210. const
  211. kControlKindDataBrowser = FourCharCode('datb');
  212. { Error Codes }
  213. const
  214. errDataBrowserNotConfigured = -4970;
  215. errDataBrowserItemNotFound = -4971;
  216. errDataBrowserItemNotAdded = -4975;
  217. errDataBrowserPropertyNotFound = -4972;
  218. errDataBrowserInvalidPropertyPart = -4973;
  219. errDataBrowserInvalidPropertyData = -4974;
  220. errDataBrowserPropertyNotSupported = -4979; { Return from DataBrowserGetSetItemDataProc }
  221. const
  222. { Generic Control Tags }
  223. kControlDataBrowserIncludesFrameAndFocusTag = FourCharCode('brdr'); { Boolean }
  224. kControlDataBrowserKeyFilterTag = kControlKeyFilterTag;
  225. kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag;
  226. kControlDataBrowserEditTextValidationProcTag = FourCharCode('vali'); { ControlEditTextValidationUPP. Called when a key filter can't be: after cut, paste, etc.}
  227. { Data Browser View Styles }
  228. type
  229. DataBrowserViewStyle = OSType;
  230. const
  231. kDataBrowserNoView = $3F3F3F3F; { Error State }
  232. kDataBrowserListView = FourCharCode('lstv');
  233. kDataBrowserColumnView = FourCharCode('clmv');
  234. { Selection Flags }
  235. type
  236. DataBrowserSelectionFlags = UInt32;
  237. const
  238. kDataBrowserDragSelect = 1 shl 0; { Å ListMgr lNoRect }
  239. kDataBrowserSelectOnlyOne = 1 shl 1; { Å ListMgr lOnlyOne }
  240. kDataBrowserResetSelection = 1 shl 2; { Å ListMgr lNoExtend }
  241. kDataBrowserCmdTogglesSelection = 1 shl 3; { Å ListMgr lUseSense }
  242. kDataBrowserNoDisjointSelection = 1 shl 4; { Å ListMgr lNoDisjoint }
  243. kDataBrowserAlwaysExtendSelection = 1 shl 5; { Å ListMgr lExtendDrag }
  244. kDataBrowserNeverEmptySelectionSet = 1 shl 6; { Å ListMgr lNoNilHilite }
  245. { Data Browser Sorting }
  246. type
  247. DataBrowserSortOrder = UInt16;
  248. const
  249. kDataBrowserOrderUndefined = 0; { Not currently supported }
  250. kDataBrowserOrderIncreasing = 1;
  251. kDataBrowserOrderDecreasing = 2;
  252. { Data Browser Item Management }
  253. type
  254. DataBrowserItemID = UNSIGNEDLONG;
  255. DataBrowserItemIDPtr = ^DataBrowserItemID;
  256. const
  257. kDataBrowserNoItem = 0; { Reserved DataBrowserItemID }
  258. type
  259. DataBrowserItemState = UInt32;
  260. const
  261. kDataBrowserItemNoState = 0;
  262. kDataBrowserItemAnyState = $FFFFFFFF;
  263. kDataBrowserItemIsSelected = 1 shl 0;
  264. kDataBrowserContainerIsOpen = 1 shl 1;
  265. kDataBrowserItemIsDragTarget = 1 shl 2; { During a drag operation }
  266. { Options for use with RevealDataBrowserItem }
  267. type
  268. DataBrowserRevealOptions = UInt8;
  269. const
  270. kDataBrowserRevealOnly = 0;
  271. kDataBrowserRevealAndCenterInView = 1 shl 0;
  272. kDataBrowserRevealWithoutSelecting = 1 shl 1;
  273. { Set operations for use with SetDataBrowserSelectedItems }
  274. type
  275. DataBrowserSetOption = UInt32;
  276. const
  277. kDataBrowserItemsAdd = 0; { add specified items to existing set }
  278. kDataBrowserItemsAssign = 1; { assign destination set to specified items }
  279. kDataBrowserItemsToggle = 2; { toggle membership state of specified items }
  280. kDataBrowserItemsRemove = 3; { remove specified items from existing set }
  281. { Commands for use with MoveDataBrowserSelectionAnchor }
  282. type
  283. DataBrowserSelectionAnchorDirection = UInt32;
  284. const
  285. kDataBrowserSelectionAnchorUp = 0;
  286. kDataBrowserSelectionAnchorDown = 1;
  287. kDataBrowserSelectionAnchorLeft = 2;
  288. kDataBrowserSelectionAnchorRight = 3;
  289. { Edit menu command IDs for use with Enable/ExecuteDataBrowserEditCommand }
  290. type
  291. DataBrowserEditCommand = UInt32;
  292. const
  293. kDataBrowserEditMsgUndo = kHICommandUndo;
  294. kDataBrowserEditMsgRedo = kHICommandRedo;
  295. kDataBrowserEditMsgCut = kHICommandCut;
  296. kDataBrowserEditMsgCopy = kHICommandCopy;
  297. kDataBrowserEditMsgPaste = kHICommandPaste;
  298. kDataBrowserEditMsgClear = kHICommandClear;
  299. kDataBrowserEditMsgSelectAll = kHICommandSelectAll;
  300. { Notifications used in DataBrowserItemNotificationProcPtr }
  301. type
  302. DataBrowserItemNotification = UInt32;
  303. const
  304. kDataBrowserItemAdded = 1; { The specified item has been added to the browser }
  305. kDataBrowserItemRemoved = 2; { The specified item has been removed from the browser }
  306. kDataBrowserEditStarted = 3; { Starting an EditText session for specified item }
  307. kDataBrowserEditStopped = 4; { Stopping an EditText session for specified item }
  308. kDataBrowserItemSelected = 5; { Item has just been added to the selection set }
  309. kDataBrowserItemDeselected = 6; { Item has just been removed from the selection set }
  310. kDataBrowserItemDoubleClicked = 7;
  311. kDataBrowserContainerOpened = 8; { Container is open }
  312. kDataBrowserContainerClosing = 9; { Container is about to close (and will real soon now, y'all) }
  313. kDataBrowserContainerClosed = 10; { Container is closed (y'all come back now!) }
  314. kDataBrowserContainerSorting = 11; { Container is about to be sorted (lock any volatile properties) }
  315. kDataBrowserContainerSorted = 12; { Container has been sorted (you may release any property locks) }
  316. kDataBrowserUserToggledContainer = 16; { _User_ requested container open/close state to be toggled }
  317. kDataBrowserTargetChanged = 15; { The target has changed to the specified item }
  318. kDataBrowserUserStateChanged = 13; { The user has reformatted the view for the target }
  319. kDataBrowserSelectionSetChanged = 14; { The selection set has been modified (net result may be the same) }
  320. {
  321. * DataBrowserPropertyID
  322. *
  323. * Discussion:
  324. * Properties with values 0 through 1023 are reserved for Apple's
  325. * use. Values greater than or equal to 1024 are for client use.
  326. }
  327. const
  328. { Predefined attribute properties, optional & non-display unless otherwise stated }
  329. kDataBrowserItemNoProperty = 0; { The anti-property (no associated data) }
  330. kDataBrowserItemIsActiveProperty = 1; { Boolean typed data (defaults to true) }
  331. kDataBrowserItemIsSelectableProperty = 2; { Boolean typed data (defaults to true) }
  332. kDataBrowserItemIsEditableProperty = 3; { Boolean typed data (defaults to false, used for editable properties) }
  333. kDataBrowserItemIsContainerProperty = 4; { Boolean typed data (defaults to false) }
  334. kDataBrowserContainerIsOpenableProperty = 5; { Boolean typed data (defaults to true) }
  335. kDataBrowserContainerIsClosableProperty = 6; { Boolean typed data (defaults to true) }
  336. kDataBrowserContainerIsSortableProperty = 7; { Boolean typed data (defaults to true) }
  337. kDataBrowserItemSelfIdentityProperty = 8; { kDataBrowserIconAndTextType (display property; ColumnView only) }
  338. {
  339. * kDataBrowserContainerAliasIDProperty is sent to your
  340. * DataBrowserItemDataProcPtr callback to give you a chance to follow
  341. * an alias or symlink that the item might represent. If the incoming
  342. * item is an alias to another item, you can call
  343. * SetDataBrowserItemDataItemID to let Data Browser know which other
  344. * item the incoming item points to.
  345. *
  346. * This is only sent from column view, and your support for it is
  347. * optional. It allows Data Browser to be more memory efficient with
  348. * its internal storage. If a given container item is an alias to an
  349. * item whose contents are already displayed in an existing column
  350. * view column, the contents can be shared between those two columns.
  351. }
  352. kDataBrowserContainerAliasIDProperty = 9; { DataBrowserItemID (alias/symlink an item to a container item) }
  353. {
  354. * kDataBrowserColumnViewPreviewProperty is sent to various callbacks
  355. * to give you a chance to draw or track in the preview column of
  356. * column view.
  357. *
  358. * You can also pass kDataBrowserColumnViewPreviewProperty in the
  359. * property parameter of RevealDataBrowserItem in conjunction with
  360. * the appropriate DataBrowserItemID of the item whose preview is
  361. * being displayed when you want to make sure the preview column is
  362. * visible to the user.
  363. *
  364. * kDataBrowserColumnViewPreviewProperty is only supported in column
  365. * view.
  366. }
  367. kDataBrowserColumnViewPreviewProperty = 10; { kDataBrowserCustomType (display property; ColumnView only) }
  368. {
  369. * kDataBrowserItemParentContainerProperty is sent to your
  370. * DataBrowserItemDataProcPtr callback when Data Browser needs to
  371. * know the parent container item for a given item.
  372. *
  373. * In column view, this allows the internals of SetDataBrowserTarget
  374. * to work. The target is the container whose contents you wish to
  375. * display, which is the rightmost column in column view. However,
  376. * unlike SetDataBrowserColumnViewPath, SetDataBrowserTarget doesn't
  377. * offer a way for you to communicate the DataBrowserItemIDs of the
  378. * rest of the column containers, so SetDataBrowserTarget needs to
  379. * ask for them explicitly by asking for the container's parent, then
  380. * the container's parent's parent, and so on.
  381. *
  382. * In list view, this allows you to pass a non-container to
  383. * SetDataBrowserTarget. In this situation, Data Browser will ask you
  384. * for the parent of the target so it knows which container to
  385. * display the contents of in the list view.
  386. *
  387. * In both list and column views, your DataBrowserItemDataProcPtr
  388. * callback might be called with
  389. * kDataBrowserItemParentContainerProperty at a variety of other
  390. * times, so you should be sure to support this property if your Data
  391. * Browser displays a containment hierarchy.
  392. }
  393. kDataBrowserItemParentContainerProperty = 11; { DataBrowserItemID (the parent of the specified item, used by ColumnView) }
  394. type
  395. DataBrowserPropertyID = UNSIGNEDLONG;
  396. { DataBrowser Property Types (for display properties; i.e. ListView columns) }
  397. { These are primarily presentation types (or styles) although }
  398. { they also imply a particular set of primitive types or structures. }
  399. type
  400. DataBrowserPropertyType = OSType;
  401. const
  402. { == Corresponding data type or structure == }
  403. kDataBrowserCustomType = $3F3F3F3F; { No associated data, custom callbacks used }
  404. kDataBrowserIconType = FourCharCode('icnr'); { IconRef, IconTransformType, RGBColor }
  405. kDataBrowserTextType = FourCharCode('text'); { CFStringRef }
  406. kDataBrowserDateTimeType = FourCharCode('date'); { DateTime or LongDateTime }
  407. kDataBrowserSliderType = FourCharCode('sldr'); { Min, Max, Value }
  408. kDataBrowserCheckboxType = FourCharCode('chbx'); { ThemeButtonValue }
  409. kDataBrowserProgressBarType = FourCharCode('prog'); { Min, Max, Value }
  410. kDataBrowserRelevanceRankType = FourCharCode('rank'); { Min, Max, Value }
  411. kDataBrowserPopupMenuType = FourCharCode('menu'); { MenuRef, Value }
  412. kDataBrowserIconAndTextType = FourCharCode('ticn'); { IconRef, CFStringRef, etc }
  413. { DataBrowser Property Parts }
  414. { Visual components of a property type. }
  415. { For use with GetDataBrowserItemPartBounds. }
  416. type
  417. DataBrowserPropertyPart = OSType;
  418. const
  419. kDataBrowserPropertyEnclosingPart = 0;
  420. kDataBrowserPropertyContentPart = FourCharCode('----');
  421. kDataBrowserPropertyDisclosurePart = FourCharCode('disc');
  422. kDataBrowserPropertyTextPart = kDataBrowserTextType;
  423. kDataBrowserPropertyIconPart = kDataBrowserIconType;
  424. kDataBrowserPropertySliderPart = kDataBrowserSliderType;
  425. kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType;
  426. kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType;
  427. kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType;
  428. { Modify appearance/behavior of display properties }
  429. type
  430. DataBrowserPropertyFlags = UInt32;
  431. { Low 8 bits apply to all property types }
  432. const
  433. kDataBrowserUniversalPropertyFlagsMask = $FF;
  434. kDataBrowserPropertyIsMutable = 1 shl 0;
  435. kDataBrowserDefaultPropertyFlags = 0 shl 0;
  436. kDataBrowserUniversalPropertyFlags = kDataBrowserUniversalPropertyFlagsMask; { support for an old name}
  437. kDataBrowserPropertyIsEditable = kDataBrowserPropertyIsMutable; { support for an old name}
  438. { Next 8 bits contain property-specific modifiers }
  439. {
  440. * Summary:
  441. * Data Browser Property Flags
  442. }
  443. const
  444. kDataBrowserPropertyFlagsOffset = 8;
  445. kDataBrowserPropertyFlagsMask = $FF shl kDataBrowserPropertyFlagsOffset;
  446. kDataBrowserCheckboxTriState = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserCheckboxType}
  447. kDataBrowserDateTimeRelative = 1 shl (kDataBrowserPropertyFlagsOffset); { kDataBrowserDateTimeType }
  448. kDataBrowserDateTimeDateOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 1); { kDataBrowserDateTimeType }
  449. kDataBrowserDateTimeTimeOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 2); { kDataBrowserDateTimeType }
  450. kDataBrowserDateTimeSecondsToo = 1 shl (kDataBrowserPropertyFlagsOffset + 3); { kDataBrowserDateTimeType }
  451. kDataBrowserSliderPlainThumb = kThemeThumbPlain shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
  452. kDataBrowserSliderUpwardThumb = kThemeThumbUpward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
  453. kDataBrowserSliderDownwardThumb = kThemeThumbDownward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
  454. kDataBrowserDoNotTruncateText = 3 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  455. kDataBrowserTruncateTextAtEnd = 2 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  456. kDataBrowserTruncateTextMiddle = 0 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  457. kDataBrowserTruncateTextAtStart = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  458. {
  459. * This flag is only for use with columns of type
  460. * kDataBrowserPopupMenuType. This flag indicates that the popup be
  461. * drawn in a sleek buttonless fashion. The text will be drawn next
  462. * to a popup glyph, and the whole cell will be clickable. Available
  463. * on 10.4 and later.
  464. }
  465. kDataBrowserPopupMenuButtonless = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserPopupMenuType}
  466. kDataBrowserPropertyModificationFlags = kDataBrowserPropertyFlagsMask; { support for an old name}
  467. kDataBrowserRelativeDateTime = kDataBrowserDateTimeRelative; { support for an old name}
  468. {
  469. Next 8 bits contain viewStyle-specific modifiers
  470. See individual ViewStyle sections below for flag definitions
  471. }
  472. const
  473. kDataBrowserViewSpecificFlagsOffset = 16;
  474. kDataBrowserViewSpecificFlagsMask = $FF shl kDataBrowserViewSpecificFlagsOffset;
  475. kDataBrowserViewSpecificPropertyFlags = kDataBrowserViewSpecificFlagsMask; { support for an old name}
  476. { High 8 bits are reserved for client application use }
  477. const
  478. kDataBrowserClientPropertyFlagsOffset = 24;
  479. kDataBrowserClientPropertyFlagsMask = $FF shl kDataBrowserClientPropertyFlagsOffset;
  480. { Client defined property description }
  481. type
  482. DataBrowserPropertyDescPtr = ^DataBrowserPropertyDesc;
  483. DataBrowserPropertyDesc = record
  484. propertyID: DataBrowserPropertyID;
  485. propertyType: DataBrowserPropertyType;
  486. propertyFlags: DataBrowserPropertyFlags;
  487. end;
  488. { Callback definition for use with ForEachDataBrowserItem }
  489. type
  490. DataBrowserItemProcPtr = procedure( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr );
  491. DataBrowserItemUPP = DataBrowserItemProcPtr;
  492. {
  493. * NewDataBrowserItemUPP()
  494. *
  495. * Availability:
  496. * Mac OS X: in version 10.0 and later in Carbon.framework
  497. * CarbonLib: in CarbonLib 1.1 and later
  498. * Non-Carbon CFM: not available
  499. }
  500. function NewDataBrowserItemUPP( userRoutine: DataBrowserItemProcPtr ): DataBrowserItemUPP; external name '_NewDataBrowserItemUPP';
  501. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  502. {
  503. * DisposeDataBrowserItemUPP()
  504. *
  505. * Availability:
  506. * Mac OS X: in version 10.0 and later in Carbon.framework
  507. * CarbonLib: in CarbonLib 1.1 and later
  508. * Non-Carbon CFM: not available
  509. }
  510. procedure DisposeDataBrowserItemUPP( userUPP: DataBrowserItemUPP ); external name '_DisposeDataBrowserItemUPP';
  511. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  512. {
  513. * InvokeDataBrowserItemUPP()
  514. *
  515. * Availability:
  516. * Mac OS X: in version 10.0 and later in Carbon.framework
  517. * CarbonLib: in CarbonLib 1.1 and later
  518. * Non-Carbon CFM: not available
  519. }
  520. procedure InvokeDataBrowserItemUPP( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr; userUPP: DataBrowserItemUPP ); external name '_InvokeDataBrowserItemUPP';
  521. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  522. { Creation/Configuration }
  523. {$ifc not TARGET_CPU_64}
  524. {
  525. * CreateDataBrowserControl()
  526. *
  527. * Mac OS X threading:
  528. * Not thread safe
  529. *
  530. * Availability:
  531. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  532. * CarbonLib: in CarbonLib 1.1 and later
  533. * Non-Carbon CFM: not available
  534. }
  535. function CreateDataBrowserControl( window: WindowRef; const (*var*) boundsRect: Rect; style: DataBrowserViewStyle; var outControl: ControlRef ): OSStatus; external name '_CreateDataBrowserControl';
  536. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  537. {
  538. * GetDataBrowserViewStyle()
  539. *
  540. * Mac OS X threading:
  541. * Not thread safe
  542. *
  543. * Availability:
  544. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  545. * CarbonLib: in CarbonLib 1.1 and later
  546. * Non-Carbon CFM: not available
  547. }
  548. function GetDataBrowserViewStyle( browser: ControlRef; var style: DataBrowserViewStyle ): OSStatus; external name '_GetDataBrowserViewStyle';
  549. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  550. {
  551. * SetDataBrowserViewStyle()
  552. *
  553. * Mac OS X threading:
  554. * Not thread safe
  555. *
  556. * Availability:
  557. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  558. * CarbonLib: in CarbonLib 1.1 and later
  559. * Non-Carbon CFM: not available
  560. }
  561. function SetDataBrowserViewStyle( browser: ControlRef; style: DataBrowserViewStyle ): OSStatus; external name '_SetDataBrowserViewStyle';
  562. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  563. {$endc} {not TARGET_CPU_64}
  564. {
  565. * Summary:
  566. * Data Browser attributes
  567. *
  568. * Discussion:
  569. * For use with DataBrowserChangeAttributes and
  570. * DataBrowserGetAttributes. Available in Mac OS X 10.4 and later.
  571. }
  572. const
  573. {
  574. * A constant with value zero; the lack of any attributes.
  575. }
  576. kDataBrowserAttributeNone = 0;
  577. {
  578. * In Column View, this Data Browser is allowed to resize the owning
  579. * window whenever necessary. This includes, but is not necessarily
  580. * limited to, situations where column resize operations need more
  581. * visible space in the window. If you turn this attribute on, your
  582. * window must tolerate being resized behind your app's back. If your
  583. * window needs to react to bounds changes, use a
  584. * kEventWindowBoundsChanged event handler. If you need to constrain
  585. * your window's minimum and maximum bounds, use
  586. * kEventWindowGetMinimum/MaximumSize handlers, the
  587. * SetWindowResizeLimits API, or something similar.
  588. }
  589. kDataBrowserAttributeColumnViewResizeWindow = 1 shl 0;
  590. {
  591. * In List View, this Data Browser should draw alternating row
  592. * background colors.
  593. }
  594. kDataBrowserAttributeListViewAlternatingRowColors = 1 shl 1;
  595. {
  596. * In List View, this Data Browser should draw a vertical line
  597. * between the columns.
  598. }
  599. kDataBrowserAttributeListViewDrawColumnDividers = 1 shl 2;
  600. {
  601. * Whether the Data Browser should hide scroll bar when they are not
  602. * necessary, and use the additional space to draw more content. By
  603. * default this attribute is turned off. This attribute is available
  604. * on Mac OS X 10.5 and later.
  605. * As of Mac OS X 10.5, this is only respected in list view, but it
  606. * may be respected in column view in the future. If you set this now
  607. * for a Data Browser instance that uses column view, you must be
  608. * prepared for the scroll bars to auto hide in the future. This
  609. * attribute is only respected in compositing mode; it will be
  610. * ignored in non-compositing mode.
  611. * When this attribute is turned on for a Data Browser instance that
  612. * is allowed to use both horizontal and vertical scroll bars (see
  613. * SetDataBrowserHasScrollBars), the Data Browser will attempt to use
  614. * the square space at the bottom right of the scroll bar area
  615. * whenever necessary. In other words, when the vertical scroll bar
  616. * is not necessary, the Data Browser will stretch the horizontal
  617. * scroll bar across the entire width. If your code needs Data
  618. * Browser to *not* use that square space - possibly because your
  619. * window's grow box will overlap that area - you should also turn on
  620. * the kDataBrowserAttributeReserveGrowBoxSpace attribute whenever
  621. * you turn on scroll bar auto hiding.
  622. }
  623. kDataBrowserAttributeAutoHideScrollBars = 1 shl 3;
  624. {
  625. * Whether the Data Browser should avoid positioning either of its
  626. * scroll bars such that they overlap the very bottom right of the
  627. * content area, where you'd typically have a grow box. By default,
  628. * this attribute is turned off. This attribute is available on Mac
  629. * OS X 10.5 and later.
  630. }
  631. kDataBrowserAttributeReserveGrowBoxSpace = 1 shl 4;
  632. {$ifc not TARGET_CPU_64}
  633. {
  634. * DataBrowserChangeAttributes()
  635. *
  636. * Summary:
  637. * Set the attributes for the given Data Browser.
  638. *
  639. * Mac OS X threading:
  640. * Not thread safe
  641. *
  642. * Parameters:
  643. *
  644. * inDataBrowser:
  645. * The Data Browser whose attributes to change.
  646. *
  647. * inAttributesToSet:
  648. * The attributes to set.
  649. *
  650. * inAttributesToClear:
  651. * The attributes to clear.
  652. *
  653. * Result:
  654. * An operating system status code.
  655. *
  656. * Availability:
  657. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  658. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  659. * Non-Carbon CFM: not available
  660. }
  661. function DataBrowserChangeAttributes( inDataBrowser: ControlRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_DataBrowserChangeAttributes';
  662. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  663. {
  664. * DataBrowserGetAttributes()
  665. *
  666. * Summary:
  667. * Returns the attributes of a given Data Browser.
  668. *
  669. * Mac OS X threading:
  670. * Not thread safe
  671. *
  672. * Parameters:
  673. *
  674. * inDataBrowser:
  675. * The Data Browser whose attributes to query.
  676. *
  677. * outAttributes:
  678. * On exit, will contain the attributes of the Data Browser. This
  679. * parameter cannot be NULL.
  680. *
  681. * Result:
  682. * An operating system status code.
  683. *
  684. * Availability:
  685. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  686. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  687. * Non-Carbon CFM: not available
  688. }
  689. function DataBrowserGetAttributes( inDataBrowser: ControlRef; var outAttributes: OptionBits ): OSStatus; external name '_DataBrowserGetAttributes';
  690. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  691. {$endc} {not TARGET_CPU_64}
  692. {
  693. * Summary:
  694. * DataBrowserMetric values
  695. *
  696. * Discussion:
  697. * For use with DataBrowserSetMetric.
  698. }
  699. const
  700. {
  701. * The content (icon, text, etc.) within a cell is drawn a certain
  702. * amount in from the left & right edges of the cell. This metric
  703. * governs the amount of inset.
  704. }
  705. kDataBrowserMetricCellContentInset = 1;
  706. {
  707. * This metric controls the space between the icon and text within a
  708. * column of type kDataBrowserIconAndTextType.
  709. }
  710. kDataBrowserMetricIconAndTextGap = 2;
  711. {
  712. * In List View only, this metric is similar to
  713. * kDataBrowserMetricCellContentInset, but it only affects the
  714. * disclosure column and it only affects the side of the cell that
  715. * displays the disclosure triangle. In other words, this metric is
  716. * used instead of (not in addition to)
  717. * DataBrowserMetricCellContentInset for one side of the disclosure
  718. * column.
  719. }
  720. kDataBrowserMetricDisclosureColumnEdgeInset = 3;
  721. {
  722. * In List View only, this metric controls the amount of space
  723. * between the disclosure triangle and the cell's content.
  724. }
  725. kDataBrowserMetricDisclosureTriangleAndContentGap = 4;
  726. {
  727. * In List View only, this metric controls the amount of space in the
  728. * disclosure column for each level of indentation in progressively
  729. * deeper hierarchies of disclosed items.
  730. }
  731. kDataBrowserMetricDisclosureColumnPerDepthGap = 5;
  732. kDataBrowserMetricLast = kDataBrowserMetricDisclosureColumnPerDepthGap;
  733. type
  734. DataBrowserMetric = UInt32;
  735. {$ifc not TARGET_CPU_64}
  736. {
  737. * DataBrowserSetMetric()
  738. *
  739. * Summary:
  740. * Sets a value for a specified Data Browser metric.
  741. *
  742. * Mac OS X threading:
  743. * Not thread safe
  744. *
  745. * Parameters:
  746. *
  747. * inDataBrowser:
  748. * The Data Browser instance whose metric is being changed.
  749. *
  750. * inMetric:
  751. * The DataBrowserMetric whose value is being changed.
  752. *
  753. * inUseDefaultValue:
  754. * A Boolean indicating whether you want the Data Browser instance
  755. * to revert to the default value for the metric. If you pass
  756. * true, inValue will be ignored and a suitable default value will
  757. * be used. If you pass false, inValue will be used as the value
  758. * of the metric.
  759. *
  760. * inValue:
  761. * When you pass false for inUseDefaultValue, this parameter is
  762. * the value to use for the metric.
  763. *
  764. * Result:
  765. * An operating system status code. If the incoming ControlRef isn't
  766. * a Data Browser instance, or if the incoming metric isn't known,
  767. * this function will return paramErr.
  768. *
  769. * Availability:
  770. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  771. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  772. * Non-Carbon CFM: not available
  773. }
  774. function DataBrowserSetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; inUseDefaultValue: Boolean; inValue: CGFloat ): OSStatus; external name '_DataBrowserSetMetric';
  775. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  776. {
  777. * DataBrowserGetMetric()
  778. *
  779. * Summary:
  780. * Gets the value for a specified Data Browser metric.
  781. *
  782. * Mac OS X threading:
  783. * Not thread safe
  784. *
  785. * Parameters:
  786. *
  787. * inDataBrowser:
  788. * The Data Browser instance whose metric value to get.
  789. *
  790. * inMetric:
  791. * The DataBrowserMetric value to get.
  792. *
  793. * outUsingDefaultValue:
  794. * On exit, this is a Boolean indicating whether the metric's
  795. * value is determined by Data Browser's default values. You may
  796. * pass NULL if you don't need this information.
  797. *
  798. * outValue:
  799. * On exit, this is the value of the metric.
  800. *
  801. * Result:
  802. * An operating system status code. If the incoming ControlRef isn't
  803. * a Data Browser instance, or if the incoming metric isn't known,
  804. * this function will return paramErr.
  805. *
  806. * Availability:
  807. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  808. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  809. * Non-Carbon CFM: not available
  810. }
  811. function DataBrowserGetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; outUsingDefaultValue: BooleanPtr { can be NULL }; var outValue: CGFloat ): OSStatus; external name '_DataBrowserGetMetric';
  812. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  813. { Item Manipulation }
  814. { Passing NULL for "items" argument to RemoveDataBrowserItems and }
  815. { UpdateDataBrowserItems refers to all items in the specified container. }
  816. { Passing NULL for "items" argument to AddDataBrowserItems means }
  817. { "generate IDs starting from 1." }
  818. {
  819. * AddDataBrowserItems()
  820. *
  821. * Mac OS X threading:
  822. * Not thread safe
  823. *
  824. * Availability:
  825. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  826. * CarbonLib: in CarbonLib 1.1 and later
  827. * Non-Carbon CFM: not available
  828. }
  829. function AddDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: ItemCount; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_AddDataBrowserItems';
  830. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  831. {
  832. * RemoveDataBrowserItems()
  833. *
  834. * Mac OS X threading:
  835. * Not thread safe
  836. *
  837. * Availability:
  838. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  839. * CarbonLib: in CarbonLib 1.1 and later
  840. * Non-Carbon CFM: not available
  841. }
  842. function RemoveDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: ItemCount; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_RemoveDataBrowserItems';
  843. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  844. {
  845. * UpdateDataBrowserItems()
  846. *
  847. * Mac OS X threading:
  848. * Not thread safe
  849. *
  850. * Availability:
  851. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  852. * CarbonLib: in CarbonLib 1.1 and later
  853. * Non-Carbon CFM: not available
  854. }
  855. function UpdateDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: ItemCount; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID; propertyID: DataBrowserPropertyID ): OSStatus; external name '_UpdateDataBrowserItems';
  856. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  857. { Edit Menu Enabling and Handling }
  858. {
  859. * EnableDataBrowserEditCommand()
  860. *
  861. * Mac OS X threading:
  862. * Not thread safe
  863. *
  864. * Availability:
  865. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  866. * CarbonLib: in CarbonLib 1.1 and later
  867. * Non-Carbon CFM: not available
  868. }
  869. function EnableDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): Boolean; external name '_EnableDataBrowserEditCommand';
  870. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  871. {
  872. * ExecuteDataBrowserEditCommand()
  873. *
  874. * Mac OS X threading:
  875. * Not thread safe
  876. *
  877. * Availability:
  878. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  879. * CarbonLib: in CarbonLib 1.1 and later
  880. * Non-Carbon CFM: not available
  881. }
  882. function ExecuteDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): OSStatus; external name '_ExecuteDataBrowserEditCommand';
  883. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  884. {
  885. * GetDataBrowserSelectionAnchor()
  886. *
  887. * Mac OS X threading:
  888. * Not thread safe
  889. *
  890. * Availability:
  891. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  892. * CarbonLib: in CarbonLib 1.1 and later
  893. * Non-Carbon CFM: not available
  894. }
  895. function GetDataBrowserSelectionAnchor( browser: ControlRef; var first: DataBrowserItemID; var last: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserSelectionAnchor';
  896. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  897. {
  898. * MoveDataBrowserSelectionAnchor()
  899. *
  900. * Mac OS X threading:
  901. * Not thread safe
  902. *
  903. * Availability:
  904. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  905. * CarbonLib: in CarbonLib 1.1 and later
  906. * Non-Carbon CFM: not available
  907. }
  908. function MoveDataBrowserSelectionAnchor( browser: ControlRef; direction: DataBrowserSelectionAnchorDirection; extendSelection: Boolean ): OSStatus; external name '_MoveDataBrowserSelectionAnchor';
  909. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  910. { Container Manipulation }
  911. {
  912. * OpenDataBrowserContainer()
  913. *
  914. * Mac OS X threading:
  915. * Not thread safe
  916. *
  917. * Availability:
  918. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  919. * CarbonLib: in CarbonLib 1.1 and later
  920. * Non-Carbon CFM: not available
  921. }
  922. function OpenDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_OpenDataBrowserContainer';
  923. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  924. {
  925. * CloseDataBrowserContainer()
  926. *
  927. * Mac OS X threading:
  928. * Not thread safe
  929. *
  930. * Availability:
  931. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  932. * CarbonLib: in CarbonLib 1.1 and later
  933. * Non-Carbon CFM: not available
  934. }
  935. function CloseDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_CloseDataBrowserContainer';
  936. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  937. {
  938. * SortDataBrowserContainer()
  939. *
  940. * Mac OS X threading:
  941. * Not thread safe
  942. *
  943. * Availability:
  944. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  945. * CarbonLib: in CarbonLib 1.1 and later
  946. * Non-Carbon CFM: not available
  947. }
  948. function SortDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID; sortChildren: Boolean ): OSStatus; external name '_SortDataBrowserContainer';
  949. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  950. { Aggregate Item Access and Iteration }
  951. {
  952. * GetDataBrowserItems()
  953. *
  954. * Mac OS X threading:
  955. * Not thread safe
  956. *
  957. * Availability:
  958. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  959. * CarbonLib: in CarbonLib 1.1 and later
  960. * Non-Carbon CFM: not available
  961. }
  962. function GetDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; items: Handle ): OSStatus; external name '_GetDataBrowserItems';
  963. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  964. {
  965. * GetDataBrowserItemCount()
  966. *
  967. * Mac OS X threading:
  968. * Not thread safe
  969. *
  970. * Availability:
  971. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  972. * CarbonLib: in CarbonLib 1.1 and later
  973. * Non-Carbon CFM: not available
  974. }
  975. function GetDataBrowserItemCount( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; var numItems: ItemCount ): OSStatus; external name '_GetDataBrowserItemCount';
  976. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  977. {
  978. * ForEachDataBrowserItem()
  979. *
  980. * Mac OS X threading:
  981. * Not thread safe
  982. *
  983. * Availability:
  984. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  985. * CarbonLib: in CarbonLib 1.1 and later
  986. * Non-Carbon CFM: not available
  987. }
  988. function ForEachDataBrowserItem( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; callback: DataBrowserItemUPP; clientData: UnivPtr ): OSStatus; external name '_ForEachDataBrowserItem';
  989. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  990. { Individual Item Access and Display }
  991. {
  992. * IsDataBrowserItemSelected()
  993. *
  994. * Mac OS X threading:
  995. * Not thread safe
  996. *
  997. * Availability:
  998. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  999. * CarbonLib: in CarbonLib 1.1 and later
  1000. * Non-Carbon CFM: not available
  1001. }
  1002. function IsDataBrowserItemSelected( browser: ControlRef; item: DataBrowserItemID ): Boolean; external name '_IsDataBrowserItemSelected';
  1003. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1004. {
  1005. * GetDataBrowserItemState()
  1006. *
  1007. * Mac OS X threading:
  1008. * Not thread safe
  1009. *
  1010. * Availability:
  1011. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1012. * CarbonLib: in CarbonLib 1.1 and later
  1013. * Non-Carbon CFM: not available
  1014. }
  1015. function GetDataBrowserItemState( browser: ControlRef; item: DataBrowserItemID; var state: DataBrowserItemState ): OSStatus; external name '_GetDataBrowserItemState';
  1016. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1017. {
  1018. * RevealDataBrowserItem()
  1019. *
  1020. * Mac OS X threading:
  1021. * Not thread safe
  1022. *
  1023. * Availability:
  1024. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1025. * CarbonLib: in CarbonLib 1.1 and later
  1026. * Non-Carbon CFM: not available
  1027. }
  1028. function RevealDataBrowserItem( browser: ControlRef; item: DataBrowserItemID; propertyID: DataBrowserPropertyID; options: DataBrowserRevealOptions ): OSStatus; external name '_RevealDataBrowserItem';
  1029. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1030. { Selection Set Manipulation }
  1031. {
  1032. * SetDataBrowserSelectedItems()
  1033. *
  1034. * Mac OS X threading:
  1035. * Not thread safe
  1036. *
  1037. * Availability:
  1038. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1039. * CarbonLib: in CarbonLib 1.1 and later
  1040. * Non-Carbon CFM: not available
  1041. }
  1042. function SetDataBrowserSelectedItems( browser: ControlRef; numItems: ItemCount; items: DataBrowserItemIDPtr; operation: DataBrowserSetOption ): OSStatus; external name '_SetDataBrowserSelectedItems';
  1043. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1044. { DataBrowser Attribute Manipulation }
  1045. { The user customizable portion of the current view style settings }
  1046. {
  1047. * SetDataBrowserUserState()
  1048. *
  1049. * Mac OS X threading:
  1050. * Not thread safe
  1051. *
  1052. * Availability:
  1053. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1054. * CarbonLib: in CarbonLib 1.1 and later
  1055. * Non-Carbon CFM: not available
  1056. }
  1057. function SetDataBrowserUserState( browser: ControlRef; stateInfo: CFDictionaryRef ): OSStatus; external name '_SetDataBrowserUserState';
  1058. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1059. {
  1060. * GetDataBrowserUserState()
  1061. *
  1062. * Mac OS X threading:
  1063. * Not thread safe
  1064. *
  1065. * Availability:
  1066. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1067. * CarbonLib: in CarbonLib 1.1 and later
  1068. * Non-Carbon CFM: not available
  1069. }
  1070. function GetDataBrowserUserState( browser: ControlRef; var stateInfo: CFDictionaryRef ): OSStatus; external name '_GetDataBrowserUserState';
  1071. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1072. { All items are active/enabled or not }
  1073. {
  1074. * SetDataBrowserActiveItems()
  1075. *
  1076. * Mac OS X threading:
  1077. * Not thread safe
  1078. *
  1079. * Availability:
  1080. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1081. * CarbonLib: in CarbonLib 1.1 and later
  1082. * Non-Carbon CFM: not available
  1083. }
  1084. function SetDataBrowserActiveItems( browser: ControlRef; active: Boolean ): OSStatus; external name '_SetDataBrowserActiveItems';
  1085. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1086. {
  1087. * GetDataBrowserActiveItems()
  1088. *
  1089. * Mac OS X threading:
  1090. * Not thread safe
  1091. *
  1092. * Availability:
  1093. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1094. * CarbonLib: in CarbonLib 1.1 and later
  1095. * Non-Carbon CFM: not available
  1096. }
  1097. function GetDataBrowserActiveItems( browser: ControlRef; var active: Boolean ): OSStatus; external name '_GetDataBrowserActiveItems';
  1098. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1099. { Inset the scrollbars within the DataBrowser bounds }
  1100. {
  1101. * SetDataBrowserScrollBarInset()
  1102. *
  1103. * Mac OS X threading:
  1104. * Not thread safe
  1105. *
  1106. * Availability:
  1107. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1108. * CarbonLib: in CarbonLib 1.1 and later
  1109. * Non-Carbon CFM: not available
  1110. }
  1111. function SetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_SetDataBrowserScrollBarInset';
  1112. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1113. {
  1114. * GetDataBrowserScrollBarInset()
  1115. *
  1116. * Mac OS X threading:
  1117. * Not thread safe
  1118. *
  1119. * Availability:
  1120. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1121. * CarbonLib: in CarbonLib 1.1 and later
  1122. * Non-Carbon CFM: not available
  1123. }
  1124. function GetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_GetDataBrowserScrollBarInset';
  1125. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1126. { The "user focused" item }
  1127. { For the ListView, this means the root container }
  1128. { For the ColumnView, this means the rightmost container column }
  1129. {
  1130. * SetDataBrowserTarget()
  1131. *
  1132. * Mac OS X threading:
  1133. * Not thread safe
  1134. *
  1135. * Availability:
  1136. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1137. * CarbonLib: in CarbonLib 1.1 and later
  1138. * Non-Carbon CFM: not available
  1139. }
  1140. function SetDataBrowserTarget( browser: ControlRef; target: DataBrowserItemID ): OSStatus; external name '_SetDataBrowserTarget';
  1141. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1142. {
  1143. * GetDataBrowserTarget()
  1144. *
  1145. * Mac OS X threading:
  1146. * Not thread safe
  1147. *
  1148. * Availability:
  1149. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1150. * CarbonLib: in CarbonLib 1.1 and later
  1151. * Non-Carbon CFM: not available
  1152. }
  1153. function GetDataBrowserTarget( browser: ControlRef; var target: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserTarget';
  1154. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1155. { Current sort ordering }
  1156. { ListView tracks this per-column }
  1157. {
  1158. * SetDataBrowserSortOrder()
  1159. *
  1160. * Mac OS X threading:
  1161. * Not thread safe
  1162. *
  1163. * Availability:
  1164. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1165. * CarbonLib: in CarbonLib 1.1 and later
  1166. * Non-Carbon CFM: not available
  1167. }
  1168. function SetDataBrowserSortOrder( browser: ControlRef; order: DataBrowserSortOrder ): OSStatus; external name '_SetDataBrowserSortOrder';
  1169. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1170. {
  1171. * GetDataBrowserSortOrder()
  1172. *
  1173. * Mac OS X threading:
  1174. * Not thread safe
  1175. *
  1176. * Availability:
  1177. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1178. * CarbonLib: in CarbonLib 1.1 and later
  1179. * Non-Carbon CFM: not available
  1180. }
  1181. function Ge…