HISearchField.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. {
  2. File: HIToolbox/HISearchField.h
  3. Contains: Definition of the search field view provided by HIToolbox.
  4. Version: HIToolbox-624~3
  5. Copyright: © 2006-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://bugs.freepascal.org
  9. }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 308
  15. Please report any bugs to <[email protected]>
  16. }
  17. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  18. {$mode macpas}
  19. {$modeswitch cblocks}
  20. {$packenum 1}
  21. {$macro on}
  22. {$inline on}
  23. {$calling mwpascal}
  24. unit HISearchField;
  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 not defined __arm64__ and defined CPUAARCH64}
  63. {$setc __arm64__ := 1}
  64. {$elsec}
  65. {$setc __arm64__ := 0}
  66. {$endc}
  67. {$ifc defined cpu64}
  68. {$setc __LP64__ := 1}
  69. {$elsec}
  70. {$setc __LP64__ := 0}
  71. {$endc}
  72. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  73. {$error Conflicting definitions for __ppc__ and __i386__}
  74. {$endc}
  75. {$ifc defined __ppc__ and __ppc__}
  76. {$setc TARGET_CPU_PPC := TRUE}
  77. {$setc TARGET_CPU_PPC64 := FALSE}
  78. {$setc TARGET_CPU_X86 := FALSE}
  79. {$setc TARGET_CPU_X86_64 := FALSE}
  80. {$setc TARGET_CPU_ARM := FALSE}
  81. {$setc TARGET_CPU_ARM64 := FALSE}
  82. {$setc TARGET_OS_MAC := TRUE}
  83. {$setc TARGET_OS_IPHONE := FALSE}
  84. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  85. {$setc TARGET_OS_EMBEDDED := FALSE}
  86. {$elifc defined __ppc64__ and __ppc64__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := TRUE}
  89. {$setc TARGET_CPU_X86 := FALSE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$setc TARGET_CPU_ARM64 := FALSE}
  93. {$setc TARGET_OS_MAC := TRUE}
  94. {$setc TARGET_OS_IPHONE := FALSE}
  95. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  96. {$setc TARGET_OS_EMBEDDED := FALSE}
  97. {$elifc defined __i386__ and __i386__}
  98. {$setc TARGET_CPU_PPC := FALSE}
  99. {$setc TARGET_CPU_PPC64 := FALSE}
  100. {$setc TARGET_CPU_X86 := TRUE}
  101. {$setc TARGET_CPU_X86_64 := FALSE}
  102. {$setc TARGET_CPU_ARM := FALSE}
  103. {$setc TARGET_CPU_ARM64 := FALSE}
  104. {$ifc defined iphonesim}
  105. {$setc TARGET_OS_MAC := FALSE}
  106. {$setc TARGET_OS_IPHONE := TRUE}
  107. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  108. {$elsec}
  109. {$setc TARGET_OS_MAC := TRUE}
  110. {$setc TARGET_OS_IPHONE := FALSE}
  111. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  112. {$endc}
  113. {$setc TARGET_OS_EMBEDDED := FALSE}
  114. {$elifc defined __x86_64__ and __x86_64__}
  115. {$setc TARGET_CPU_PPC := FALSE}
  116. {$setc TARGET_CPU_PPC64 := FALSE}
  117. {$setc TARGET_CPU_X86 := FALSE}
  118. {$setc TARGET_CPU_X86_64 := TRUE}
  119. {$setc TARGET_CPU_ARM := FALSE}
  120. {$setc TARGET_CPU_ARM64 := FALSE}
  121. {$ifc defined iphonesim}
  122. {$setc TARGET_OS_MAC := FALSE}
  123. {$setc TARGET_OS_IPHONE := TRUE}
  124. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  125. {$elsec}
  126. {$setc TARGET_OS_MAC := TRUE}
  127. {$setc TARGET_OS_IPHONE := FALSE}
  128. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  129. {$endc}
  130. {$setc TARGET_OS_EMBEDDED := FALSE}
  131. {$elifc defined __arm__ and __arm__}
  132. {$setc TARGET_CPU_PPC := FALSE}
  133. {$setc TARGET_CPU_PPC64 := FALSE}
  134. {$setc TARGET_CPU_X86 := FALSE}
  135. {$setc TARGET_CPU_X86_64 := FALSE}
  136. {$setc TARGET_CPU_ARM := TRUE}
  137. {$setc TARGET_CPU_ARM64 := FALSE}
  138. {$setc TARGET_OS_MAC := FALSE}
  139. {$setc TARGET_OS_IPHONE := TRUE}
  140. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  141. {$setc TARGET_OS_EMBEDDED := TRUE}
  142. {$elifc defined __arm64__ and __arm64__}
  143. {$setc TARGET_CPU_PPC := FALSE}
  144. {$setc TARGET_CPU_PPC64 := FALSE}
  145. {$setc TARGET_CPU_X86 := FALSE}
  146. {$setc TARGET_CPU_X86_64 := FALSE}
  147. {$setc TARGET_CPU_ARM := FALSE}
  148. {$setc TARGET_CPU_ARM64 := TRUE}
  149. {$ifc defined ios}
  150. {$setc TARGET_OS_MAC := FALSE}
  151. {$setc TARGET_OS_IPHONE := TRUE}
  152. {$setc TARGET_OS_EMBEDDED := TRUE}
  153. {$elsec}
  154. {$setc TARGET_OS_MAC := TRUE}
  155. {$setc TARGET_OS_IPHONE := FALSE}
  156. {$setc TARGET_OS_EMBEDDED := FALSE}
  157. {$endc}
  158. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  159. {$elsec}
  160. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  161. {$endc}
  162. {$ifc defined __LP64__ and __LP64__ }
  163. {$setc TARGET_CPU_64 := TRUE}
  164. {$elsec}
  165. {$setc TARGET_CPU_64 := FALSE}
  166. {$endc}
  167. {$ifc defined FPC_BIG_ENDIAN}
  168. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  169. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  170. {$elifc defined FPC_LITTLE_ENDIAN}
  171. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  172. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  173. {$elsec}
  174. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  175. {$endc}
  176. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  177. {$setc CALL_NOT_IN_CARBON := FALSE}
  178. {$setc OLDROUTINENAMES := FALSE}
  179. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  180. {$setc OPAQUE_UPP_TYPES := TRUE}
  181. {$setc OTCARBONAPPLICATION := TRUE}
  182. {$setc OTKERNEL := FALSE}
  183. {$setc PM_USE_SESSION_APIS := TRUE}
  184. {$setc TARGET_API_MAC_CARBON := TRUE}
  185. {$setc TARGET_API_MAC_OS8 := FALSE}
  186. {$setc TARGET_API_MAC_OSX := TRUE}
  187. {$setc TARGET_CARBON := TRUE}
  188. {$setc TARGET_CPU_68K := FALSE}
  189. {$setc TARGET_CPU_MIPS := FALSE}
  190. {$setc TARGET_CPU_SPARC := FALSE}
  191. {$setc TARGET_OS_UNIX := FALSE}
  192. {$setc TARGET_OS_WIN32 := FALSE}
  193. {$setc TARGET_RT_MAC_68881 := FALSE}
  194. {$setc TARGET_RT_MAC_CFM := FALSE}
  195. {$setc TARGET_RT_MAC_MACHO := TRUE}
  196. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  197. {$setc TYPE_BOOL := FALSE}
  198. {$setc TYPE_EXTENDED := FALSE}
  199. {$setc TYPE_LONGLONG := TRUE}
  200. uses MacTypes,Appearance,CarbonEvents,Controls,Menus,HIGeometry,HIObject,HIView,CFBase;
  201. {$endc} {not MACOSALLINCLUDE}
  202. {$ifc TARGET_OS_MAC}
  203. {$ALIGN POWER}
  204. {
  205. * HISearchField.h
  206. *
  207. * Discussion:
  208. * API definitions for the search field view.
  209. }
  210. {==============================================================================}
  211. { HISearchField }
  212. { HISearchField is a new view available in Mac OS X 10.3. }
  213. { This view is designed to be used for applications that provide searching }
  214. { functionality. Visually, it is a standard text field optionally adorned }
  215. { with a search icon on the left and/or a cancel image on the right. }
  216. { When the user has accepted the text by pressing the return or enter key }
  217. { a Carbon Event of kEventClassTextField / kEventTextAccepted will be sent }
  218. { to the view. This will be the indication that the search should begin. }
  219. { This view will also respond to all the standard control data tags that are }
  220. { used by the EditUnicodeText view. }
  221. {==============================================================================}
  222. { The HIObject class ID for the HISearchField class. }
  223. {$ifc USE_CFSTR_CONSTANT_MACROS}
  224. {$definec kHISearchFieldClassID CFSTRP('com.apple.HISearchField')}
  225. {$endc}
  226. { ControlKind}
  227. const
  228. kControlKindHISearchField = FourCharCode('srfd');
  229. { HISearchField part codes}
  230. const
  231. kControlSearchFieldCancelPart = 30;
  232. kControlSearchFieldMenuPart = 31;
  233. {
  234. The SearchField view supports those tags previously defined for the EditUnicodeText view.
  235. These tags are available through Get/SetControlData with ControlPartCode of kControlEditTextPart:
  236. kControlFontStyleTag
  237. kControlEditTextFixedTextTag
  238. kControlEditTextTextTag
  239. kControlEditTextKeyFilterTag
  240. kControlEditTextValidationProcTag
  241. kControlEditUnicodeTextPostUpdateProcTag
  242. kControlEditTextSelectionTag
  243. kControlEditTextKeyScriptBehaviorTag
  244. kControlEditTextCharCount
  245. kControlEditTextCFStringTag
  246. }
  247. {
  248. * Summary:
  249. * HISearchField attributes
  250. }
  251. const
  252. {
  253. * A constant with value zero; the lack of any attributes.
  254. }
  255. kHISearchFieldNoAttributes = 0;
  256. {
  257. * This view contains the cancel icon in the text field.
  258. }
  259. kHISearchFieldAttributesCancel = 1 shl 0;
  260. {
  261. * This view contains the search icon in the text field. If a menu is
  262. * associated with the search field, this attribute is implicitly set
  263. * and the search icon will display with a menu disclosure badge.
  264. * Available in Mac OS X 10.4 and later.
  265. }
  266. kHISearchFieldAttributesSearchIcon = 1 shl 1;
  267. { Event Classes}
  268. const
  269. kEventClassSearchField = FourCharCode('srfd');
  270. {
  271. * kEventClassSearchField / kEventSearchFieldCancelClicked
  272. *
  273. * Summary:
  274. * Notification that the cancel icon has been depressed.
  275. *
  276. * Discussion:
  277. * This event is sent by the HISearchField view if the cancel icon
  278. * is enabled (attribute of kHISearchFieldAtttributesCancel), and
  279. * the cancel has been clicked.
  280. *
  281. * Mac OS X threading:
  282. * Not thread safe
  283. *
  284. * Parameters:
  285. *
  286. * --> kEventParamDirectObject (in, typeControlRef)
  287. * The HISearchField that has sent the notification.
  288. *
  289. * Availability:
  290. * Mac OS X: in version 10.3 and later in Carbon.framework
  291. * CarbonLib: not available
  292. }
  293. const
  294. kEventSearchFieldCancelClicked = 1;
  295. {
  296. * kEventClassSearchField / kEventSearchFieldSearchClicked
  297. *
  298. * Summary:
  299. * Notification that the search icon has been depressed.
  300. *
  301. * Discussion:
  302. * This event is sent by the HISearchField view if the search icon
  303. * is enabled (attribute of kHISearchFieldAttributesSearchIcon or a
  304. * menu is associated with the search field), and the search icon
  305. * has been clicked. If a menu is associated with the search field,
  306. * the search field will handle the display and tracking of the menu
  307. * by default. This event is sent to the search field only, it will
  308. * not propagate.
  309. *
  310. * Mac OS X threading:
  311. * Not thread safe
  312. *
  313. * Parameters:
  314. *
  315. * --> kEventParamDirectObject (in, typeControlRef)
  316. * The HISearchField that has sent the notification.
  317. *
  318. * Availability:
  319. * Mac OS X: in version 10.4 and later in Carbon.framework
  320. * CarbonLib: not available
  321. }
  322. const
  323. kEventSearchFieldSearchClicked = 2;
  324. {$ifc not TARGET_CPU_64}
  325. {
  326. * HISearchFieldCreate()
  327. *
  328. * Summary:
  329. * Creates a search field view. The new view is initially invisible.
  330. *
  331. * Mac OS X threading:
  332. * Not thread safe
  333. *
  334. * Parameters:
  335. *
  336. * inBounds:
  337. * The initial bounds of the view. If this parameter is NULL, the
  338. * view defaults to have empty bounds ( 0, 0, 0, 0 ).
  339. *
  340. * inAttributes:
  341. * The initial attributes of the search field. Indicates whether
  342. * the field should contain the cancel icon.
  343. *
  344. * inSearchMenu:
  345. * The menu to be associated with this search field. If
  346. * inSearchMenu is non-NULL, it will be retained by the search
  347. * field and the search icon will be enabled in the left side of
  348. * the text field. If this parameter is NULL, the view will not
  349. * display the search icon in the left portion of the text field.
  350. * You are expected to install handlers on this menu to handle the
  351. * visual appearance of the menu (for example, to draw check marks
  352. * or enable items when the menu receives the
  353. * kEventMenuEnableItems Carbon Event), and to keep track of what
  354. * action should be performed by associating HICommands with each
  355. * menu item and installing a handler for the (
  356. * kEventClassCommand, kEventCommandProcess ) Carbon Event.
  357. *
  358. * inDescriptiveText:
  359. * The text to be displayed in the text field when the field does
  360. * not have focus and contains no user entered text. This is meant
  361. * to be an indication of what the search criteria is. For
  362. * example, you may wish to identify to the user that the search
  363. * will cover the "Subject" or "Contents" of a selected range of
  364. * items. If inDescriptiveText is non-NULL it will be retained by
  365. * the search field.
  366. *
  367. * outRef:
  368. * On exit, contains the new view.
  369. *
  370. * Result:
  371. * An operating system status code.
  372. *
  373. * Availability:
  374. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  375. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  376. * Non-Carbon CFM: not available
  377. }
  378. function HISearchFieldCreate( {const} inBounds: HIRectPtr { can be NULL }; inAttributes: OptionBits; inSearchMenu: MenuRef { can be NULL }; inDescriptiveText: CFStringRef { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISearchFieldCreate';
  379. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  380. {
  381. * HISearchFieldSetSearchMenu()
  382. *
  383. * Summary:
  384. * Set the search menu associated with the view.
  385. *
  386. * Mac OS X threading:
  387. * Not thread safe
  388. *
  389. * Parameters:
  390. *
  391. * inSearchField:
  392. * The search field to associate the search menu with.
  393. *
  394. * inSearchMenu:
  395. * The menu to associate with the search field. If there is
  396. * already a menu associated with the search field, that menu will
  397. * be released. If inSearchMenu is non-NULL, it will be retained
  398. * by the search field and the search icon will be enabled in the
  399. * left side of the text field. You are expected to install
  400. * handlers on this menu to handle the visual appearance of the
  401. * menu (for example, to draw check marks or enable items when the
  402. * menu receives the kEventMenuEnableItems Carbon Event), and to
  403. * keep track of what action should be performed by associating
  404. * HICommands with each menu item and installing a handler for the
  405. * ( kEventClassCommand, kEventCommandProcess ) Carbon Event. If
  406. * inSearchMenu is NULL, the search icon will be removed from the
  407. * left side of the text field and no menu will be associated with
  408. * this field.
  409. *
  410. * Result:
  411. * An operating system status code.
  412. *
  413. * Availability:
  414. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  415. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  416. * Non-Carbon CFM: not available
  417. }
  418. function HISearchFieldSetSearchMenu( inSearchField: HIViewRef; inSearchMenu: MenuRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetSearchMenu';
  419. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  420. {
  421. * HISearchFieldGetSearchMenu()
  422. *
  423. * Summary:
  424. * Get the menu that is associated with the search field
  425. *
  426. * Mac OS X threading:
  427. * Not thread safe
  428. *
  429. * Parameters:
  430. *
  431. * inSearchField:
  432. * The search field you wish to retrieve the search menu from.
  433. *
  434. * outSearchMenu:
  435. * On exit, will contain the menu that is associated with search
  436. * field. The menu will _not_ be retained on output and this
  437. * parameter cannot be NULL.
  438. *
  439. * Result:
  440. * An operating system status code.
  441. *
  442. * Availability:
  443. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  444. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  445. * Non-Carbon CFM: not available
  446. }
  447. function HISearchFieldGetSearchMenu( inSearchField: HIViewRef; var outSearchMenu: MenuRef ): OSStatus; external name '_HISearchFieldGetSearchMenu';
  448. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  449. {
  450. * HISearchFieldChangeAttributes()
  451. *
  452. * Summary:
  453. * Set the attributes for the given search field.
  454. *
  455. * Mac OS X threading:
  456. * Not thread safe
  457. *
  458. * Parameters:
  459. *
  460. * inSearchField:
  461. * The search field to change the attributes of.
  462. *
  463. * inAttributesToSet:
  464. * The attributes to set.
  465. *
  466. * inAttributesToClear:
  467. * The attributes to clear.
  468. *
  469. * Result:
  470. * An operating system status code.
  471. *
  472. * Availability:
  473. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  474. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  475. * Non-Carbon CFM: not available
  476. }
  477. function HISearchFieldChangeAttributes( inSearchField: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISearchFieldChangeAttributes';
  478. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  479. {
  480. * HISearchFieldGetAttributes()
  481. *
  482. * Summary:
  483. * Returns the attributes of the search field.
  484. *
  485. * Mac OS X threading:
  486. * Not thread safe
  487. *
  488. * Parameters:
  489. *
  490. * inSearchField:
  491. * The search field to get the attributes of.
  492. *
  493. * outAttributes:
  494. * On exit, will contain the attributes of the search field. This
  495. * parameter cannot be NULL.
  496. *
  497. * Result:
  498. * An operating system status code.
  499. *
  500. * Availability:
  501. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  502. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  503. * Non-Carbon CFM: not available
  504. }
  505. function HISearchFieldGetAttributes( inSearchField: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HISearchFieldGetAttributes';
  506. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  507. {
  508. * HISearchFieldSetDescriptiveText()
  509. *
  510. * Summary:
  511. * Set the description of the search action of the search field.
  512. *
  513. * Mac OS X threading:
  514. * Not thread safe
  515. *
  516. * Parameters:
  517. *
  518. * inSearchField:
  519. * The search field to change the description of.
  520. *
  521. * inDescription:
  522. * The new description for the search field. If the search field
  523. * contains a description, it will be released. If inDescription
  524. * is non-NULL, it will be retained by the search field. If it is
  525. * NULL, no description will be associated with the search field.
  526. *
  527. * Result:
  528. * An operating system status code.
  529. *
  530. * Availability:
  531. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  532. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  533. * Non-Carbon CFM: not available
  534. }
  535. function HISearchFieldSetDescriptiveText( inSearchField: HIViewRef; inDescription: CFStringRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetDescriptiveText';
  536. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  537. {
  538. * HISearchFieldCopyDescriptiveText()
  539. *
  540. * Summary:
  541. * Get the description that is associated with the search field.
  542. *
  543. * Mac OS X threading:
  544. * Not thread safe
  545. *
  546. * Parameters:
  547. *
  548. * inSearchField:
  549. * The search field you wish to retrieve the description from.
  550. *
  551. * outDescription:
  552. * On exit, will contain the description that is associated with
  553. * the search field. This parameter cannot be NULL. If there is no
  554. * description associated with the search field, outDescription
  555. * will be set to NULL. If there is a description, a CFStringRef
  556. * will be created that contains the contents of the description.
  557. * You posess ownership of this string and will need to release it
  558. * when you no longer need it.
  559. *
  560. * Result:
  561. * An operating system status code.
  562. *
  563. * Availability:
  564. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  565. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  566. * Non-Carbon CFM: not available
  567. }
  568. function HISearchFieldCopyDescriptiveText( inSearchField: HIViewRef; var outDescription: CFStringRef ): OSStatus; external name '_HISearchFieldCopyDescriptiveText';
  569. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  570. {$endc} {not TARGET_CPU_64}
  571. {$endc} {TARGET_OS_MAC}
  572. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  573. end.
  574. {$endc} {not MACOSALLINCLUDE}